Skip to main content

Panda3D add-on for Kivy integration.

Project description


A Panda3D add-on for Kivy integration.

The aim is to make the integration of Kivy apps into a Panda3D application almost transparent. Potential uses include creating on-screen GUI, or even RTT 3D UI's.


First, import - make sure you do this before importing any Kivy-related stuff:

from import App

Then, as usual in Kivy, create a subclass of this App, and use build() or the KV autoloading system to populate your widget tree:

from kivy.uix.button import Button

class Example(App):
    def build(self):
        return Button(text='Hello, world!')

You can then instantiate and run this app inside the __init__ of your Panda ShowBase, after running ShowBase.__init__(self). You may want to create a display region for your kivy app, sized according to your needs, otherwise panda3d_kivy will automatically create one for you that will occupy the entire window. You must then pass your ShowBase as argument to the Kivy app instantiation, as well as your display region if applicable, and finally call as you normally would:

from direct.showbase.ShowBase import ShowBase

class PandaApp(ShowBase):
    def __init__(self):

        self.kivy_app = kivy_app = Example(self)

        # The rest of your ShowBase code here

app = PandaApp()

Voilà! You should have a working Kivy UI in your Panda application. Have fun!

Project details

Download files

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

Files for panda3d-kivy, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size panda3d_kivy-0.3.0-py3-none-any.whl (384.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size panda3d-kivy-0.3.0.tar.gz (212.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page