toontown-just-works/build/nirai/panda3d/samples/particles/particle_panel.py

34 lines
887 B
Python
Raw Normal View History

2024-07-07 18:08:39 -05:00
#!/usr/bin/env python
# Author: Shao Zhang, Phil Saltzman
# Last Updated: 2015-03-13
#
# This file contians the minimum code needed to load the particle panel tool
# See readme.txt for more information
import sys
try:
import _tkinter
except:
sys.exit("Please install python module 'Tkinter'")
try:
import Pmw
except:
sys.exit("Please install Python megawidgets")
# Open the Panda window
from direct.showbase.ShowBase import ShowBase
base = ShowBase()
# Makes sure that Panda is configured to play nice with Tkinter
base.startTk()
from direct.tkpanels.ParticlePanel import ParticlePanel
pp = ParticlePanel() # Create the panel
base.disableMouse() # Disable camera control to place it
base.camera.setY(-10) # Place the camera
base.setBackgroundColor(0, 0, 0) # Most particle systems show up better on black backgrounds
base.run()