Skip to main content

A Dear ImGui backend for Python-based Panda3D projects with built-in utilities.

Project description

panda3d-imgui

A Dear ImGui backend for Python-based Panda3D projects with built-in utilities (based on DIRECT Tools).

Screenshot 2025-11-05 at 10 58 18 PM

This module will allow you to use and create Dear ImGui user interfaces within a Panda3D window, preferbly used to create content creation/debugging tools. (It uses Dear ImGui Bundle which contains not only the Python bindings for Dear ImGui, but with other goodies as well.

It is based on the C++ based project with the similar name. The difference that it is ported to Python for such users to use on their projects.

How to use

You can install the module through pip:

pip install panda3d-imgui

And you can import this module as p3dimgui

import p3dimgui

It has a helper method called init which you can easlily add in your ShowBase class. This will create a ImGuiBackend object into base.imgui and initialize it, along side the built-in ultilities.

from direct.showbase.ShowBase import ShowBase

from imgui_bundle import imgui

import p3dimgui

class MyApp(ShowBase):
    def  __init__(self):
        ShowBase.__init__(self)

        # Install Dear ImGui
        p3dimgui.init()

Once initalized, it will send an event called imgui-new-frame every frame. You can accept this event whenever you want to draw with ImGui:

def draw(self):
   # Show the demo window.
   imgui.show_demo_window()

self.accept('imgui-new-frame', self.draw)

Combine all this and you would have something like this, which will start up a new Panda3D window and shows the Dear ImGui demo window.

from direct.showbase.ShowBase import ShowBase

from imgui_bundle import imgui

import p3dimgui

class MyApp(ShowBase):
    def  __init__(self):
        ShowBase.__init__(self)

        # Install Dear ImGui
        p3dimgui.init()

        self.accept('imgui-new-frame', self.draw)

    def draw(self):
        # Show the demo window.
        imgui.show_demo_window()

app = MyApp()
app.run()
image

For a more better demo which showcases all the built-in utilities aviliable (like the screenshot at the top), see the demo.py file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

panda3d_imgui-1.1.0.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

panda3d_imgui-1.1.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file panda3d_imgui-1.1.0.tar.gz.

File metadata

  • Download URL: panda3d_imgui-1.1.0.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for panda3d_imgui-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7c4b273cc21d4f9047dcf90ba557f2342bab814da37e01b4810d47df310c122c
MD5 cf3aaaf586dcef92bb9db444f165da13
BLAKE2b-256 9fe4e162dbaa8c24620c21f7aa45724bd3261e349331e19629c8e526954a2b81

See more details on using hashes here.

File details

Details for the file panda3d_imgui-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: panda3d_imgui-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for panda3d_imgui-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a8ac39507019b09e168c9d02647be993a11b03ef30f91a557c5aa1d43ad957b
MD5 b2832c2fa97e5ab8c070fa730b4c1bb6
BLAKE2b-256 4c8e7c74d8f0564e0540b38986d1142d8c5e5c016e92fc62d41b04e8d159cb99

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page