Coder Social home page Coder Social logo

blenderimgui's Introduction

Dear Imgui for Blender

Use the infamous Dear ImGui library directly in your Blender scripts! This means custom GUI drawing in your operators:

Example of ImGui-based UI in Blender

Normally custom UI drawing in Blender is done using the binding of OpenGL from the bgl module as well as shader-related objects from the gpu module, but this is really low-level. Dear ImGui is a now traditional tool used for quick debugging UIs that provides a much more comfortable API.

This repository provides backend code and examples to run Dear ImGui within Blender. This may be used for constant overlays or interactively during modal operators.

Installation

Prior to using the code from this repository, we will install Dear ImGui's Python binding. Beware that it must be installed in Blender's Python, not in system's Python so you must call pip through Blender's python like so:

REM An example on Windows
cd "C:\Program Files\Blender Foundation\Blender 2.91\2.91\python\bin"
.\python.exe -m pip install imgui
# An example on linux
cd /usr/lib/blender/2.91/python/bin
./python3.7m -m pip install imgui

If this fails, start over using a cmd in administrator mode. You may have to adapt the path after "cd".

Examples

To quickly try out examples download ImguiExamples.zip from the last release, don't unzip it and install it as an add-on.

Find examples in the Gizmo dropdown

To go further, hack on operators.py and overlays.py and check out pyimgui's documentation!

To embed this into your add-on, you just have to include blender_imgui.py in your add-on's directory.

License

This project has a whole is distributed under the terms of the GPLv3 license. See individual file's notices for more detailed licensing info.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.