mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
*** empty log message ***
This commit is contained in:
parent
f559872f44
commit
aaf126da97
@ -34,6 +34,10 @@ if [ "$TOONTOWN" ]; then
|
|||||||
TOONTOWN=`cygpath -w $TOONTOWN`
|
TOONTOWN=`cygpath -w $TOONTOWN`
|
||||||
export TOONTOWN
|
export TOONTOWN
|
||||||
fi
|
fi
|
||||||
|
if [ "$WINTOOLS" ]; then
|
||||||
|
WINTOOLS=`cygpath -w $WINTOOLS`
|
||||||
|
export WINTOOLS
|
||||||
|
fi
|
||||||
|
|
||||||
# Export the proper home environment variable
|
# Export the proper home environment variable
|
||||||
HOME=`cygpath -w $HOME`
|
HOME=`cygpath -w $HOME`
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
"DIRECT Animation Control Panel"
|
"DIRECT Animation Control Panel"
|
||||||
|
|
||||||
# Import Tkinter, Pmw, and the floater code from this directory tree.
|
# Import Tkinter, Pmw, and the floater code from this directory tree.
|
||||||
|
from AppShell import *
|
||||||
from Tkinter import *
|
from Tkinter import *
|
||||||
from tkSimpleDialog import askfloat
|
from tkSimpleDialog import askfloat
|
||||||
import Pmw
|
import Pmw
|
||||||
@ -10,32 +11,35 @@ import math
|
|||||||
FRAMES = 0
|
FRAMES = 0
|
||||||
SECONDS = 1
|
SECONDS = 1
|
||||||
|
|
||||||
class AnimPanel(Pmw.MegaToplevel):
|
class AnimPanel(AppShell):
|
||||||
def __init__(self, parent = None, **kw):
|
# Override class variables
|
||||||
|
appname = 'Anim Panel'
|
||||||
|
frameWidth = 675
|
||||||
|
frameHeight = 250
|
||||||
|
usecommandarea = 0
|
||||||
|
usestatusarea = 0
|
||||||
|
|
||||||
|
def __init__(self, parent = None, **kw):
|
||||||
INITOPT = Pmw.INITOPT
|
INITOPT = Pmw.INITOPT
|
||||||
optiondefs = (
|
optiondefs = (
|
||||||
('title', 'Anim Panel', None),
|
('title', self.appname, None),
|
||||||
('actorList', (), None),
|
('actorList', (), None),
|
||||||
('Actor_label_width', 12, None),
|
('Actor_label_width', 12, None),
|
||||||
)
|
)
|
||||||
self.defineoptions(kw, optiondefs)
|
self.defineoptions(kw, optiondefs)
|
||||||
|
|
||||||
|
self.frameHeight = 60 + (50 * len(self['actorList']))
|
||||||
# Initialize the superclass
|
# Initialize the superclass
|
||||||
Pmw.MegaToplevel.__init__(self, parent)
|
AppShell.__init__(self)
|
||||||
|
|
||||||
# Handle to the toplevels hull
|
# Execute option callbacks
|
||||||
hull = self.component('hull')
|
self.initialiseoptions(AnimPanel)
|
||||||
|
|
||||||
# A handy little help balloon
|
def createInterface(self):
|
||||||
balloon = self.balloon = Pmw.Balloon()
|
# Handle to the toplevels interior
|
||||||
# Start with balloon help disabled
|
interior = self.interior()
|
||||||
self.balloon.configure(state = 'none')
|
menuBar = self.menuBar
|
||||||
|
|
||||||
menuFrame = Frame(hull, relief = GROOVE, bd = 2)
|
|
||||||
|
|
||||||
menuBar = Pmw.MenuBar(menuFrame, hotkeys = 1, balloon = balloon)
|
|
||||||
menuBar.pack(side = LEFT, expand = 1, fill = X)
|
|
||||||
menuBar.addmenu('AnimPanel', 'Anim Panel Operations')
|
menuBar.addmenu('AnimPanel', 'Anim Panel Operations')
|
||||||
# Actor control status
|
# Actor control status
|
||||||
menuBar.addcascademenu('AnimPanel', 'Control Status',
|
menuBar.addcascademenu('AnimPanel', 'Control Status',
|
||||||
@ -62,24 +66,9 @@ class AnimPanel(Pmw.MegaToplevel):
|
|||||||
'Reset Actor controls',
|
'Reset Actor controls',
|
||||||
label = 'Reset all',
|
label = 'Reset all',
|
||||||
command = self.resetAll)
|
command = self.resetAll)
|
||||||
# Exit panel
|
|
||||||
menuBar.addmenuitem('AnimPanel', 'command',
|
|
||||||
'Exit Anim Panel',
|
|
||||||
label = 'Exit',
|
|
||||||
command = self.destroy)
|
|
||||||
|
|
||||||
menuBar.addmenu('Help', 'Anim Panel Help Operations')
|
|
||||||
self.toggleBalloonVar = IntVar()
|
|
||||||
self.toggleBalloonVar.set(0)
|
|
||||||
menuBar.addmenuitem('Help', 'checkbutton',
|
|
||||||
'Toggle balloon help',
|
|
||||||
label = 'Balloon Help',
|
|
||||||
variable = self.toggleBalloonVar,
|
|
||||||
command = self.toggleBalloon)
|
|
||||||
menuFrame.pack(fill = X)
|
|
||||||
|
|
||||||
# Create a frame to hold all the actor controls
|
# Create a frame to hold all the actor controls
|
||||||
actorFrame = Frame(hull)
|
actorFrame = Frame(interior)
|
||||||
|
|
||||||
# Create a control for each actor
|
# Create a control for each actor
|
||||||
index = 0
|
index = 0
|
||||||
@ -96,7 +85,7 @@ class AnimPanel(Pmw.MegaToplevel):
|
|||||||
actorFrame.pack(expand = 1, fill = BOTH)
|
actorFrame.pack(expand = 1, fill = BOTH)
|
||||||
|
|
||||||
# Create a frame to hold the playback controls
|
# Create a frame to hold the playback controls
|
||||||
controlFrame = Frame(hull)
|
controlFrame = Frame(interior)
|
||||||
self.playPauseVar = IntVar()
|
self.playPauseVar = IntVar()
|
||||||
self.playPauseVar.set(0)
|
self.playPauseVar.set(0)
|
||||||
self.playPauseButton = self.createcomponent(
|
self.playPauseButton = self.createcomponent(
|
||||||
@ -126,9 +115,6 @@ class AnimPanel(Pmw.MegaToplevel):
|
|||||||
|
|
||||||
controlFrame.pack(fill = X)
|
controlFrame.pack(fill = X)
|
||||||
|
|
||||||
# Execute option callbacks
|
|
||||||
self.initialiseoptions(AnimPanel)
|
|
||||||
|
|
||||||
def getActorControlAt(self, index):
|
def getActorControlAt(self, index):
|
||||||
return self.actorControlList[index]
|
return self.actorControlList[index]
|
||||||
|
|
||||||
@ -313,7 +299,8 @@ class ActorControl(Pmw.MegaWidget):
|
|||||||
self.updateDisplay()
|
self.updateDisplay()
|
||||||
|
|
||||||
def setOffset(self):
|
def setOffset(self):
|
||||||
newOffset = askfloat(title = self['text'],
|
newOffset = askfloat(parent = self.interior(),
|
||||||
|
title = self['text'],
|
||||||
prompt = 'Start offset (seconds):')
|
prompt = 'Start offset (seconds):')
|
||||||
if newOffset:
|
if newOffset:
|
||||||
self.offset = newOffset
|
self.offset = newOffset
|
||||||
|
Loading…
x
Reference in New Issue
Block a user