A few fixes, maybe a little closer to working

This commit is contained in:
Josh Yelon 2006-09-11 19:50:01 +00:00
parent a996ac16ff
commit 1ea1517e59
16 changed files with 487 additions and 493 deletions

View File

@ -1,6 +1,6 @@
from direct.tkwidgets.AppShell import *
from direct.showbase.TkGlobal import *
import Pmw
class MetadataPanel(AppShell,Pmw.MegaWidget):
appversion = '1.0'

View File

@ -2,13 +2,12 @@
# sideWindow.py
# Written by Yi-Hong Lin, yihhongl@andrew.cmu.edu, 2004
#################################################################
from direct.tkwidgets.AppShell import *
from direct.showbase.TkGlobal import *
from direct.tkwidgets.AppShell import AppShell
from direct.tkwidgets.VectorWidgets import ColorEntry
from direct.showbase.TkGlobal import spawnTkLoop, Toplevel
import seSceneGraphExplorer
from direct.tkwidgets import Floater
from direct.tkwidgets import Slider
from direct.tkwidgets import VectorWidgets
from Tkinter import Frame, IntVar, Checkbutton
import Pmw, Tkinter
class sideWindow(AppShell):
#################################################################
@ -74,7 +73,7 @@ class sideWindow(AppShell):
mainFrame = Frame(interior)
## Creat NoteBook
self.notebookFrame = Pmw.NoteBook(mainFrame)
self.notebookFrame.pack(fill=BOTH,expand=1)
self.notebookFrame.pack(fill=Tkinter.BOTH,expand=1)
sgePage = self.notebookFrame.add('Tree Graph')
envPage = self.notebookFrame.add('World Setting')
self.notebookFrame['raisecommand'] = self.updateInfo
@ -84,7 +83,7 @@ class sideWindow(AppShell):
sgePage, nodePath = render,
scrolledCanvas_hull_width = 270,
scrolledCanvas_hull_height = 570)
self.SGE.pack(fill = BOTH, expand = 0)
self.SGE.pack(fill = Tkinter.BOTH, expand = 0)
## World Setting Page
envPage = Frame(envPage)
@ -96,8 +95,8 @@ class sideWindow(AppShell):
text = 'Enable Lighting',
variable = self.LightingVar,
command = self.toggleLights)
self.LightingButton.pack(side=LEFT, expand=False)
pageFrame.pack(side=TOP, fill=X, expand=True)
self.LightingButton.pack(side=Tkinter.LEFT, expand=False)
pageFrame.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True)
pageFrame = Frame(envPage)
self.CollisionVar = IntVar()
@ -107,8 +106,8 @@ class sideWindow(AppShell):
text = 'Show Collision Object',
variable = self.CollisionVar,
command = self.showCollision)
self.CollisionButton.pack(side=LEFT, expand=False)
pageFrame.pack(side=TOP, fill=X, expand=True)
self.CollisionButton.pack(side=Tkinter.LEFT, expand=False)
pageFrame.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True)
pageFrame = Frame(envPage)
self.ParticleVar = IntVar()
@ -118,8 +117,8 @@ class sideWindow(AppShell):
text = 'Show Particle Dummy',
variable = self.ParticleVar,
command = self.enableParticle)
self.ParticleButton.pack(side=LEFT, expand=False)
pageFrame.pack(side=TOP, fill=X, expand=True)
self.ParticleButton.pack(side=Tkinter.LEFT, expand=False)
pageFrame.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True)
pageFrame = Frame(envPage)
self.baseUseDriveVar = IntVar()
@ -129,8 +128,8 @@ class sideWindow(AppShell):
text = 'Enable base.usedrive',
variable = self.baseUseDriveVar,
command = self.enablebaseUseDrive)
self.baseUseDriveButton.pack(side=LEFT, expand=False)
pageFrame.pack(side=TOP, fill=X, expand=True)
self.baseUseDriveButton.pack(side=Tkinter.LEFT, expand=False)
pageFrame.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True)
pageFrame = Frame(envPage)
self.backfaceVar = IntVar()
@ -140,8 +139,8 @@ class sideWindow(AppShell):
text = 'Enable BackFace',
variable = self.backfaceVar,
command = self.toggleBackface)
self.backfaceButton.pack(side=LEFT, expand=False)
pageFrame.pack(side=TOP, fill=X, expand=True)
self.backfaceButton.pack(side=Tkinter.LEFT, expand=False)
pageFrame.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True)
pageFrame = Frame(envPage)
self.textureVar = IntVar()
@ -151,8 +150,8 @@ class sideWindow(AppShell):
text = 'Enable Texture',
variable = self.textureVar,
command = self.toggleTexture)
self.textureButton.pack(side=LEFT, expand=False)
pageFrame.pack(side=TOP, fill=X, expand=True)
self.textureButton.pack(side=Tkinter.LEFT, expand=False)
pageFrame.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True)
pageFrame = Frame(envPage)
self.wireframeVar = IntVar()
@ -162,8 +161,8 @@ class sideWindow(AppShell):
text = 'Enable Wireframe',
variable = self.wireframeVar,
command = self.toggleWireframe)
self.wireframeButton.pack(side=LEFT, expand=False)
pageFrame.pack(side=TOP, fill=X, expand=True)
self.wireframeButton.pack(side=Tkinter.LEFT, expand=False)
pageFrame.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True)
pageFrame = Frame(envPage)
self.gridVar = IntVar()
@ -173,8 +172,8 @@ class sideWindow(AppShell):
text = 'Enable Grid',
variable = self.gridVar,
command = self.toggleGrid)
self.gridButton.pack(side=LEFT, expand=False)
pageFrame.pack(side=TOP, fill=X, expand=True)
self.gridButton.pack(side=Tkinter.LEFT, expand=False)
pageFrame.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True)
pageFrame = Frame(envPage)
self.widgetVisVar = IntVar()
@ -184,8 +183,8 @@ class sideWindow(AppShell):
text = 'Enable WidgetVisible',
variable = self.widgetVisVar,
command = self.togglewidgetVis)
self.widgetVisButton.pack(side=LEFT, expand=False)
pageFrame.pack(side=TOP, fill=X, expand=True)
self.widgetVisButton.pack(side=Tkinter.LEFT, expand=False)
pageFrame.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True)
pageFrame = Frame(envPage)
self.enableAutoCameraVar = IntVar()
@ -195,17 +194,17 @@ class sideWindow(AppShell):
text = 'Enable Auto Camera Movement for Loading Objects',
variable = self.enableAutoCameraVar,
command = self.toggleAutoCamera)
self.enableAutoCameraButton.pack(side=LEFT, expand=False)
pageFrame.pack(side=TOP, fill=X, expand=True)
self.enableAutoCameraButton.pack(side=Tkinter.LEFT, expand=False)
pageFrame.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True)
pageFrame = Frame(envPage)
self.backgroundColor = VectorWidgets.ColorEntry(
self.backgroundColor = ColorEntry(
pageFrame, text = 'BG Color', value=self.worldColor)
self.backgroundColor['command'] = self.setBackgroundColorVec
self.backgroundColor['resetValue'] = [0,0,0,0]
self.backgroundColor.pack(side=LEFT, expand=False)
self.backgroundColor.pack(side=Tkinter.LEFT, expand=False)
self.bind(self.backgroundColor, 'Set background color')
pageFrame.pack(side=TOP, fill=X, expand=True)
pageFrame.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True)
envPage.pack(expand=False)

View File

@ -9,9 +9,8 @@ from seColorEntry import *
from direct.tkwidgets import VectorWidgets
from direct.tkwidgets import Floater
from direct.tkwidgets import Slider
import string
import math
import types
from Tkinter import *
import string, math, types
class collisionWindow(AppShell):

View File

@ -2,15 +2,13 @@
# controllerWindow.py
# Written by Yi-Hong Lin, yihhongl@andrew.cmu.edu, 2004
#################################################################
# Import Tkinter, Pmw, and the floater code from this directory tree.
from direct.tkwidgets.AppShell import *
from direct.showbase.TkGlobal import *
from direct.tkwidgets import VectorWidgets
from direct.tkwidgets import Floater
import string
from direct.tkwidgets.AppShell import AppShell
from Tkinter import Frame, Label, Button
import string, Pmw, Tkinter
# Define the Category
KEYBORAD = 'Keyboard-'
KEYBOARD = 'Keyboard-'
TRACKER = 'Tarcker-'
class controllerWindow(AppShell):
@ -77,11 +75,11 @@ class controllerWindow(AppShell):
self.cotrollerTypeEntry = self.createcomponent(
'Controller Type', (), None,
Pmw.ComboBox, (frame,),
labelpos = W, label_text='Controller Type:', entry_width = 20,entry_state = DISABLED,
labelpos = Tkinter.W, label_text='Controller Type:', entry_width = 20,entry_state = Tkinter.DISABLED,
selectioncommand = self.setControllerType,
scrolledlist_items = self.controllerList)
self.cotrollerTypeEntry.pack(side=LEFT)
frame.pack(side=TOP, fill=X, expand=False, pady = 3)
self.cotrollerTypeEntry.pack(side=Tkinter.LEFT)
frame.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=False, pady = 3)
self.cotrollerTypeEntry.selectitem('Keyboard', setentry=True)
self.inputZone = Pmw.Group(mainFrame, tag_pyclass = None)
@ -104,7 +102,7 @@ class controllerWindow(AppShell):
keyboardPage = self.objNotebook.add('Keyboard')
tarckerPage = self.objNotebook.add('Tracker')
self.objNotebook.selectpage('Keyboard')
self.objNotebook.pack(side = TOP, fill='both',expand=False)
self.objNotebook.pack(side = Tkinter.TOP, fill='both',expand=False)
# Put this here so it isn't called right away
self.objNotebook['raisecommand'] = self.updateControlInfo
@ -115,424 +113,424 @@ class controllerWindow(AppShell):
widget = self.createcomponent(
'Target Type', (), None,
Pmw.ComboBox, (Interior,),
labelpos = W, label_text='Target Object:', entry_width = 20, entry_state = DISABLED,
labelpos = Tkinter.W, label_text='Target Object:', entry_width = 20, entry_state = Tkinter.DISABLED,
selectioncommand = self.setTargetObj,
scrolledlist_items = self.listOfObj)
widget.pack(side=LEFT, padx=3)
Interior.pack(side=TOP, fill=X, expand=True, pady = 5)
widget.pack(side=Tkinter.LEFT, padx=3)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 5)
widget.selectitem(self.nameOfNode, setentry=True)
self.widgetsDict[KEYBORAD+'ObjList'] = widget
self.widgetsDict[KEYBOARD+'ObjList'] = widget
inputZone = Pmw.Group(assignFrame, tag_pyclass = None)
inputZone.pack(fill='both',expand=1)
settingFrame = inputZone.interior()
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Assign a Key For:').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True,pady = 6 )
widget = Label(Interior, text = 'Assign a Key For:').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True,pady = 6 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Forward :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Forward :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Forward key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyForward'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyForward'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyForward'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Forward Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedForward'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedForward'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedForward'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Backward :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Backward :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Backward key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyBackward'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyBackward'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyBackward'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Backward Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedBackward'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedBackward'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedBackward'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Right :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Right :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Right key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyRight'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyRight'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyRight'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Right Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedRight'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedRight'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedRight'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Left :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Left :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Left key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyLeft'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyLeft'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyLeft'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Left Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedLeft'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedLeft'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedLeft'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Up :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Up :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Up key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyUp'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyUp'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyUp'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Up Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedUp'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedUp'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedUp'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Down :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Down :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Down key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyDown'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyDown'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyDown'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Down Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedDown'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedDown'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedDown'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Turn Right:', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Turn Right:', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Turn Right key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyTurnRight'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyTurnRight'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyTurnRight'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Turn Right Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedTurnRight'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedTurnRight'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedTurnRight'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Turn Left :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Turn Left :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Turn Left key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyTurnLeft'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyTurnLeft'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyTurnLeft'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Turn Left Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedTurnLeft'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedTurnLeft'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedTurnLeft'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Turn UP :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Turn UP :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Turn UP key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyTurnUp'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyTurnUp'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyTurnUp'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Turn UP Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedTurnUp'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedTurnUp'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedTurnUp'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Turn Down :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Turn Down :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Turn Down key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyTurnDown'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyTurnDown'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyTurnDown'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Turn Down Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedTurnDown'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedTurnDown'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedTurnDown'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Roll Right:', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Roll Right:', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Roll Right key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyRollRight'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyRollRight'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyRollRight'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Roll Right Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedRollRight'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedRollRight'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedRollRight'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Roll Left :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Roll Left :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Roll Left key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyRollLeft'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyRollLeft'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyRollLeft'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Roll Left Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedRollLeft'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedRollLeft'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedRollLeft'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Scale UP :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Scale UP :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale UP key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyScaleUp'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyScaleUp'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyScaleUp'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale UP Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedScaleUp'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedScaleUp'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedScaleUp'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Scale Down:', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Scale Down:', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale Down key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyScaleDown'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyScaleDown'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyScaleDown'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale Down Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedScaleDown'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedScaleDown'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedScaleDown'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Scale X UP :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Scale X UP :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale X UP key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyScaleXUp'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyScaleXUp'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyScaleXUp'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale X UP Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedScaleXUp'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedScaleXUp'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedScaleXUp'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Scale X Down:', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Scale X Down:', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale X Down key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyScaleXDown'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyScaleXDown'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyScaleXDown'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale Down X Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedScaleXDown'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedScaleXDown'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedScaleXDown'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Scale Y UP :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Scale Y UP :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale Y UP key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyScaleYUp'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyScaleYUp'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyScaleYUp'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale Y UP Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedScaleYUp'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedScaleYUp'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedScaleYUp'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Scale Y Down:', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Scale Y Down:', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale Y Down key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyScaleYDown'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyScaleYDown'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyScaleYDown'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale Down XY Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedScaleYDown'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedScaleYDown'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedScaleYDown'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Scale Z UP :', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Scale Z UP :', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale Z UP key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyScaleZUp'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyScaleZUp'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyScaleZUp'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale Z UP Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedScaleZUp'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedScaleZUp'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedScaleZUp'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
Interior = Frame(settingFrame)
widget = Label(Interior, text = 'Scale Z Down:', width = 20, anchor = W).pack(side=LEFT, expand = False)
widget = Label(Interior, text = 'Scale Z Down:', width = 20, anchor = Tkinter.W).pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale Z Down key', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardMapDict['KeyScaleZDown'],
labelpos = W, label_text='Key :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'KeyScaleZDown'] = widget
widget = Label(Interior, text = ' ').pack(side=LEFT, expand = False)
labelpos = Tkinter.W, label_text='Key :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'KeyScaleZDown'] = widget
widget = Label(Interior, text = ' ').pack(side=Tkinter.LEFT, expand = False)
widget = self.createcomponent(
'Scale Down Z Speed', (), None,
Pmw.EntryField, (Interior,),
value = self.keyboardSpeedDict['SpeedScaleZDown'],
labelpos = W, label_text='Speed :', entry_width = 10)
widget.pack(side=LEFT, expand = False)
self.widgetsDict[KEYBORAD+'SpeedScaleZDown'] = widget
widget = Label(Interior, text = 'Per Seceond').pack(side=LEFT, expand = False)
Interior.pack(side=TOP, fill=X, expand=True, pady = 4 )
labelpos = Tkinter.W, label_text='Speed :', entry_width = 10)
widget.pack(side=Tkinter.LEFT, expand = False)
self.widgetsDict[KEYBOARD+'SpeedScaleZDown'] = widget
widget = Label(Interior, text = 'Per Second').pack(side=Tkinter.LEFT, expand = False)
Interior.pack(side=Tkinter.TOP, fill=Tkinter.X, expand=True, pady = 4 )
assignFrame.pack(side=TOP, expand=True, fill = X)
keyboardPage.pack(side=TOP, expand=True, fill = X)
assignFrame.pack(side=Tkinter.TOP, expand=True, fill = Tkinter.X)
keyboardPage.pack(side=Tkinter.TOP, expand=True, fill = Tkinter.X)
####################################################################
####################################################################
@ -541,12 +539,12 @@ class controllerWindow(AppShell):
####################################################################
# Pack the mainFrame
frame = Frame(mainFrame)
widget = Button(frame, text='OK', width = 13, command=self.ok_press).pack(side=RIGHT)
widget = Button(frame, text='Enable Control', width = 13, command=self.enableControl).pack(side=LEFT)
widget = Button(frame, text='Disable Control', width = 13, command=self.disableControl).pack(side=LEFT)
widget = Button(frame, text='Save & Keep', width = 13, command=self.saveKeepControl).pack(side=LEFT)
frame.pack(side = BOTTOM, expand=1, fill = X)
mainFrame.pack(expand=1, fill = BOTH)
widget = Button(frame, text='OK', width = 13, command=self.ok_press).pack(side=Tkinter.RIGHT)
widget = Button(frame, text='Enable Control', width = 13, command=self.enableControl).pack(side=Tkinter.LEFT)
widget = Button(frame, text='Disable Control', width = 13, command=self.disableControl).pack(side=Tkinter.LEFT)
widget = Button(frame, text='Save & Keep', width = 13, command=self.saveKeepControl).pack(side=Tkinter.LEFT)
frame.pack(side = Tkinter.BOTTOM, expand=1, fill = Tkinter.X)
mainFrame.pack(expand=1, fill = Tkinter.BOTH)
def onDestroy(self, event):
# Check if user wish to keep the control after the window closed.

View File

@ -3,15 +3,12 @@
# Written by Yi-Hong Lin, yihhongl@andrew.cmu.edu, 2004
#################################################################
# Import Tkinter, Pmw, and the floater code from this directory tree.
from direct.tkwidgets.AppShell import *
from direct.showbase.TkGlobal import *
from direct.tkwidgets.AppShell import AppShell
from seColorEntry import *
from direct.tkwidgets import VectorWidgets
from direct.tkwidgets import Floater
from direct.tkwidgets import Slider
import string
import math
import types
from direct.tkwidgets.VectorWidgets import Vector3Entry
from direct.tkwidgets.Slider import Slider
from Tkinter import Frame, Button, Menubutton, Menu
import string, math, types, Pmw, Tkinter
class lightingPanel(AppShell):
@ -54,25 +51,25 @@ class lightingPanel(AppShell):
mainFrame = Frame(interior)
self.listZone = Pmw.Group(mainFrame,tag_pyclass = None)
self.listZone.pack(expand=0, fill=X,padx=3,pady=3)
self.listZone.pack(expand=0, fill=Tkinter.X,padx=3,pady=3)
listFrame = self.listZone.interior()
self.lightEntry = self.createcomponent(
'Lights List', (), None,
Pmw.ComboBox, (listFrame,),label_text='Light :',
labelpos = W, entry_width = 25, selectioncommand = self.selectLight,
labelpos = Tkinter.W, entry_width = 25, selectioncommand = self.selectLight,
scrolledlist_items = self.lightList)
self.lightEntry.pack(side=LEFT)
self.lightEntry.pack(side=Tkinter.LEFT)
self.renameButton = self.createcomponent(
'Rename Light', (), None,
Button, (listFrame,),
text = ' Rename ',
command = self.renameLight)
self.renameButton.pack(side=LEFT)
self.renameButton.pack(side=Tkinter.LEFT)
self.addLighZone = Pmw.Group(listFrame,tag_pyclass = None)
self.addLighZone.pack(side=LEFT)
self.addLighZone.pack(side=Tkinter.LEFT)
insideFrame = self.addLighZone.interior()
self.lightsButton = Menubutton(insideFrame, text = 'Add light',borderwidth = 3,
activebackground = '#909090')
@ -94,13 +91,13 @@ class lightingPanel(AppShell):
Button, (listFrame,),
text = ' Delete ',
command = self.deleteLight)
self.deleteButton.pack(side=LEFT)
self.deleteButton.pack(side=Tkinter.LEFT)
self.lightColor = seColorEntry(
mainFrame, text = 'Light Color', value=self.lightColor)
self.lightColor['command'] = self.setLightingColorVec
self.lightColor['resetValue'] = [0.3*255,0.3*255,0.3*255,0]
self.lightColor.pack(fill=X,expand=0)
self.lightColor.pack(fill=Tkinter.X,expand=0)
self.bind(self.lightColor, 'Set light color')
# Notebook pages for light specific controls
@ -117,67 +114,67 @@ class lightingPanel(AppShell):
self.dSpecularColor = seColorEntry(
directionalPage, text = 'Specular Color')
self.dSpecularColor['command'] = self.setSpecularColor
self.dSpecularColor.pack(fill = X, expand = 0)
self.dSpecularColor.pack(fill = Tkinter.X, expand = 0)
self.bind(self.dSpecularColor,
'Set directional light specular color')
self.dPosition = VectorWidgets.Vector3Entry(
self.dPosition = Vector3Entry(
directionalPage, text = 'Position')
self.dPosition['command'] = self.setPosition
self.dPosition['resetValue'] = [0,0,0,0]
self.dPosition.pack(fill = X, expand = 0)
self.dPosition.pack(fill = Tkinter.X, expand = 0)
self.bind(self.dPosition, 'Set directional light position')
self.dOrientation = VectorWidgets.Vector3Entry(
self.dOrientation = Vector3Entry(
directionalPage, text = 'Orientation')
self.dOrientation['command'] = self.setOrientation
self.dOrientation['resetValue'] = [0,0,0,0]
self.dOrientation.pack(fill = X, expand = 0)
self.dOrientation.pack(fill = Tkinter.X, expand = 0)
self.bind(self.dOrientation, 'Set directional light orientation')
# Point light controls
self.pSpecularColor = seColorEntry(
pointPage, text = 'Specular Color')
self.pSpecularColor['command'] = self.setSpecularColor
self.pSpecularColor.pack(fill = X, expand = 0)
self.pSpecularColor.pack(fill = Tkinter.X, expand = 0)
self.bind(self.pSpecularColor,
'Set point light specular color')
self.pPosition = VectorWidgets.Vector3Entry(
self.pPosition = Vector3Entry(
pointPage, text = 'Position')
self.pPosition['command'] = self.setPosition
self.pPosition['resetValue'] = [0,0,0,0]
self.pPosition.pack(fill = X, expand = 0)
self.pPosition.pack(fill = Tkinter.X, expand = 0)
self.bind(self.pPosition, 'Set point light position')
self.pConstantAttenuation = Slider.Slider(
self.pConstantAttenuation = Slider(
pointPage,
text = 'Constant Attenuation',
max = 1.0,
resolution = 0.01,
value = 1.0)
self.pConstantAttenuation['command'] = self.setConstantAttenuation
self.pConstantAttenuation.pack(fill = X, expand = 0)
self.pConstantAttenuation.pack(fill = Tkinter.X, expand = 0)
self.bind(self.pConstantAttenuation,
'Set point light constant attenuation')
self.pLinearAttenuation = Slider.Slider(
self.pLinearAttenuation = Slider(
pointPage,
text = 'Linear Attenuation',
max = 1.0,
resolution = 0.01,
value = 0.0)
self.pLinearAttenuation['command'] = self.setLinearAttenuation
self.pLinearAttenuation.pack(fill = X, expand = 0)
self.pLinearAttenuation.pack(fill = Tkinter.X, expand = 0)
self.bind(self.pLinearAttenuation,
'Set point light linear attenuation')
self.pQuadraticAttenuation = Slider.Slider(
self.pQuadraticAttenuation = Slider(
pointPage,
text = 'Quadratic Attenuation',
max = 1.0,
resolution = 0.01,
value = 0.0)
self.pQuadraticAttenuation['command'] = self.setQuadraticAttenuation
self.pQuadraticAttenuation.pack(fill = X, expand = 0)
self.pQuadraticAttenuation.pack(fill = Tkinter.X, expand = 0)
self.bind(self.pQuadraticAttenuation,
'Set point light quadratic attenuation')
@ -185,60 +182,60 @@ class lightingPanel(AppShell):
self.sSpecularColor = seColorEntry(
spotPage, text = 'Specular Color')
self.sSpecularColor['command'] = self.setSpecularColor
self.sSpecularColor.pack(fill = X, expand = 0)
self.sSpecularColor.pack(fill = Tkinter.X, expand = 0)
self.bind(self.sSpecularColor,
'Set spot light specular color')
self.sConstantAttenuation = Slider.Slider(
self.sConstantAttenuation = Slider(
spotPage,
text = 'Constant Attenuation',
max = 1.0,
resolution = 0.01,
value = 1.0)
self.sConstantAttenuation['command'] = self.setConstantAttenuation
self.sConstantAttenuation.pack(fill = X, expand = 0)
self.sConstantAttenuation.pack(fill = Tkinter.X, expand = 0)
self.bind(self.sConstantAttenuation,
'Set spot light constant attenuation')
self.sLinearAttenuation = Slider.Slider(
self.sLinearAttenuation = Slider(
spotPage,
text = 'Linear Attenuation',
max = 1.0,
resolution = 0.01,
value = 0.0)
self.sLinearAttenuation['command'] = self.setLinearAttenuation
self.sLinearAttenuation.pack(fill = X, expand = 0)
self.sLinearAttenuation.pack(fill = Tkinter.X, expand = 0)
self.bind(self.sLinearAttenuation,
'Set spot light linear attenuation')
self.sQuadraticAttenuation = Slider.Slider(
self.sQuadraticAttenuation = Slider(
spotPage,
text = 'Quadratic Attenuation',
max = 1.0,
resolution = 0.01,
value = 0.0)
self.sQuadraticAttenuation['command'] = self.setQuadraticAttenuation
self.sQuadraticAttenuation.pack(fill = X, expand = 0)
self.sQuadraticAttenuation.pack(fill = Tkinter.X, expand = 0)
self.bind(self.sQuadraticAttenuation,
'Set spot light quadratic attenuation')
self.sExponent = Slider.Slider(
self.sExponent = Slider(
spotPage,
text = 'Exponent',
max = 1.0,
resolution = 0.01,
value = 0.0)
self.sExponent['command'] = self.setExponent
self.sExponent.pack(fill = X, expand = 0)
self.sExponent.pack(fill = Tkinter.X, expand = 0)
self.bind(self.sExponent,
'Set spot light exponent')
# MRM: Add frustum controls
self.lightNotebook.setnaturalsize()
self.lightNotebook.pack(expand = 1, fill = BOTH)
self.lightNotebook.pack(expand = 1, fill = Tkinter.BOTH)
mainFrame.pack(expand=1, fill = BOTH)
mainFrame.pack(expand=1, fill = Tkinter.BOTH)
def onDestroy(self, event):
messenger.send('LP_close')

View File

@ -11,7 +11,9 @@ from direct.tkwidgets import Floater
from direct.tkwidgets import Dial
from direct.tkwidgets import Slider
from direct.tkwidgets import VectorWidgets
from direct.task import Task
from pandac.PandaModules import *
from Tkinter import *
import Pmw
class propertyWindow(AppShell,Pmw.MegaWidget):
#################################################################

View File

@ -8,7 +8,8 @@
from direct.showbase.ShowBaseGlobal import *
from direct.interval.IntervalGlobal import *
from direct.showbase import DirectObject
from direct.showbase.DirectObject import DirectObject
from pandac.PandaModules import *
import math
#Manakel 2/12/2005: replace from pandac import by from pandac.PandaModules import
from pandac.PandaModules import MouseWatcher
@ -142,7 +143,7 @@ class ViewPort:
return self.cam
class QuadView(DirectObject.DirectObject):
class QuadView(DirectObject):
#########################################################################################################################################
# This class sets up four cameras for the scene (ideally we want four instances of render too)
# and then instatiates a ViewPort class for each of them

View File

@ -5,7 +5,8 @@ except: sys.exit("Please install python module 'Tkinter'")
import direct
from direct.directbase.DirectStart import*
from direct.showbase.TkGlobal import*
from direct.showbase.TkGlobal import *
from direct.showbase.TkGlobal import spawnTkLoop, Toplevel
from tkFileDialog import *
from direct.directtools.DirectGlobals import *
from direct.tkwidgets.AppShell import*
@ -38,7 +39,6 @@ from direct.actor import Actor
import seAnimPanel
from direct.task import Task
import math
from path import path
#################################################################

View File

@ -9,12 +9,10 @@
# So we make one from them.
#
#################################################################
from direct.showbase.TkGlobal import *
from direct.tkwidgets import Valuator
from direct.tkwidgets import Floater
from direct.tkwidgets import Slider
import string
import tkColorChooser
import string, Pmw, Tkinter, tkColorChooser
from direct.tkwidgets.VectorWidgets import VectorEntry
class seColorEntry(VectorEntry):

View File

@ -5,6 +5,7 @@
from direct.showbase.DirectObject import *
from string import lower
from direct.directtools import DirectUtil
from pandac.PandaModules import *
import string

View File

@ -12,22 +12,21 @@
#
#################################################################
# Import Tkinter, Pmw, and the dial code from this directory tree.
from direct.showbase.DirectObject import *
from direct.showbase.TkGlobal import *
from direct.tkwidgets.AppShell import *
from direct.directtools.DirectGlobals import *
from direct.directtools.DirectUtil import *
from direct.showbase.DirectObject import DirectObject
from direct.tkwidgets.AppShell import AppShell
#from direct.directtools.DirectGlobals import *
#from direct.directtools.DirectUtil import *
from seGeometry import *
from seSelection import *
from tkFileDialog import *
import os
import string
from direct.tkwidgets import Dial
from direct.tkwidgets import Floater
from direct.tkwidgets import Slider
from direct.tkwidgets import EntryScale
from direct.tkwidgets import VectorWidgets
from direct.tkwidgets.Dial import AngleDial
from direct.tkwidgets.Floater import Floater
from direct.tkwidgets.Slider import Slider
from direct.tkwidgets.EntryScale import EntryScale
from direct.tkwidgets.VectorWidgets import Vector2Entry, Vector3Entry
from direct.tkwidgets.VectorWidgets import ColorEntry
from Tkinter import Button, Frame, Radiobutton, Checkbutton, Label
from Tkinter import StringVar, BooleanVar, Entry, Scale
import os, string, Tkinter, Pmw
import __builtin__
PRF_UTILITIES = [
@ -233,7 +232,7 @@ class MopathRecorder(AppShell, DirectObject):
self.undoButton['state'] = 'normal'
else:
self.undoButton['state'] = 'disabled'
self.undoButton.pack(side = LEFT, expand = 0)
self.undoButton.pack(side = Tkinter.LEFT, expand = 0)
self.bind(self.undoButton, 'Undo last operation')
self.redoButton = Button(self.menuFrame, text = 'Redo',
@ -242,19 +241,19 @@ class MopathRecorder(AppShell, DirectObject):
self.redoButton['state'] = 'normal'
else:
self.redoButton['state'] = 'disabled'
self.redoButton.pack(side = LEFT, expand = 0)
self.redoButton.pack(side = Tkinter.LEFT, expand = 0)
self.bind(self.redoButton, 'Redo last operation')
# Record button
mainFrame = Frame(interior, relief = SUNKEN, borderwidth = 2)
mainFrame = Frame(interior, relief = Tkinter.SUNKEN, borderwidth = 2)
frame = Frame(mainFrame)
# Active node path
# Button to select active node path
widget = self.createButton(frame, 'Recording', 'Node Path:',
'Select Active Mopath Node Path',
lambda s = self: SEditor.select(s.nodePath),
side = LEFT, expand = 0)
widget['relief'] = FLAT
side = Tkinter.LEFT, expand = 0)
widget['relief'] = Tkinter.FLAT
self.nodePathMenu = Pmw.ComboBox(
frame, entry_width = 20,
selectioncommand = self.selectNodePathNamed,
@ -264,7 +263,7 @@ class MopathRecorder(AppShell, DirectObject):
self.nodePathMenu.component('entryfield_entry'))
self.nodePathMenuBG = (
self.nodePathMenuEntry.configure('background')[3])
self.nodePathMenu.pack(side = LEFT, fill = X, expand = 1)
self.nodePathMenu.pack(side = Tkinter.LEFT, fill = Tkinter.X, expand = 1)
self.bind(self.nodePathMenu,
'Select active node path used for recording and playback')
# Recording type
@ -285,81 +284,81 @@ class MopathRecorder(AppShell, DirectObject):
'Recording', 'Extend',
('Next record session extends existing path'),
self.recordingType, 'Extend', expand = 0)
frame.pack(fill = X, expand = 1)
frame.pack(fill = Tkinter.X, expand = 1)
frame = Frame(mainFrame)
widget = self.createCheckbutton(
frame, 'Recording', 'Record',
'On: path is being recorded', self.toggleRecord, 0,
side = LEFT, fill = BOTH, expand = 1)
widget.configure(foreground = 'Red', relief = RAISED, borderwidth = 2,
anchor = CENTER, width = 16)
side = Tkinter.LEFT, fill = Tkinter.BOTH, expand = 1)
widget.configure(foreground = 'Red', relief = Tkinter.RAISED, borderwidth = 2,
anchor = Tkinter.CENTER, width = 16)
widget = self.createButton(frame, 'Recording', 'Add Keyframe',
'Add Keyframe To Current Path',
self.addKeyframe,
side = LEFT, expand = 1)
side = Tkinter.LEFT, expand = 1)
widget = self.createButton(frame, 'Recording', 'Bind Path to Node',
'Bind Motion Path to selected Object',
self.bindMotionPathToNode,
side = LEFT, expand = 1)
side = Tkinter.LEFT, expand = 1)
frame.pack(fill = X, expand = 1)
frame.pack(fill = Tkinter.X, expand = 1)
mainFrame.pack(expand = 1, fill = X, pady = 3)
mainFrame.pack(expand = 1, fill = Tkinter.X, pady = 3)
# Playback controls
playbackFrame = Frame(interior, relief = SUNKEN,
playbackFrame = Frame(interior, relief = Tkinter.SUNKEN,
borderwidth = 2)
Label(playbackFrame, text = 'PLAYBACK CONTROLS',
font=('MSSansSerif', 12, 'bold')).pack(fill = X)
font=('MSSansSerif', 12, 'bold')).pack(fill = Tkinter.X)
# Main playback control slider
widget = self.createEntryScale(
playbackFrame, 'Playback', 'Time', 'Set current playback time',
resolution = 0.01, command = self.playbackGoTo, side = TOP)
widget.component('hull')['relief'] = RIDGE
resolution = 0.01, command = self.playbackGoTo, side = Tkinter.TOP)
widget.component('hull')['relief'] = Tkinter.RIDGE
# Kill playback task if drag slider
widget['preCallback'] = self.stopPlayback
# Jam duration entry into entry scale
self.createLabeledEntry(widget.labelFrame, 'Resample', 'Path Duration',
'Set total curve duration',
command = self.setPathDuration,
side = LEFT, expand = 0)
side = Tkinter.LEFT, expand = 0)
# Start stop buttons
frame = Frame(playbackFrame)
widget = self.createButton(frame, 'Playback', '<<',
'Jump to start of playback',
self.jumpToStartOfPlayback,
side = LEFT, expand = 1)
side = Tkinter.LEFT, expand = 1)
widget['font'] = (('MSSansSerif', 12, 'bold'))
widget = self.createCheckbutton(frame, 'Playback', 'Play',
'Start/Stop playback',
self.startStopPlayback, 0,
side = LEFT, fill = BOTH, expand = 1)
side = Tkinter.LEFT, fill = Tkinter.BOTH, expand = 1)
widget.configure(anchor = 'center', justify = 'center',
relief = RAISED, font = ('MSSansSerif', 12, 'bold'))
relief = Tkinter.RAISED, font = ('MSSansSerif', 12, 'bold'))
widget = self.createButton(frame, 'Playback', '>>',
'Jump to end of playback',
self.jumpToEndOfPlayback,
side = LEFT, expand = 1)
side = Tkinter.LEFT, expand = 1)
widget['font'] = (('MSSansSerif', 12, 'bold'))
self.createCheckbutton(frame, 'Playback', 'Loop',
'On: loop playback',
self.setLoopPlayback, self.loopPlayback,
side = LEFT, fill = BOTH, expand = 0)
frame.pack(fill = X, expand = 1)
side = Tkinter.LEFT, fill = Tkinter.BOTH, expand = 0)
frame.pack(fill = Tkinter.X, expand = 1)
# Speed control
frame = Frame(playbackFrame)
widget = Button(frame, text = 'PB Speed Vernier', relief = FLAT,
widget = Button(frame, text = 'PB Speed Vernier', relief = Tkinter.FLAT,
command = lambda s = self: s.setSpeedScale(1.0))
widget.pack(side = LEFT, expand = 0)
widget.pack(side = Tkinter.LEFT, expand = 0)
self.speedScale = Scale(frame, from_ = -1, to = 1,
resolution = 0.01, showvalue = 0,
width = 10, orient = 'horizontal',
command = self.setPlaybackSF)
self.speedScale.pack(side = LEFT, fill = X, expand = 1)
self.speedScale.pack(side = Tkinter.LEFT, fill = Tkinter.X, expand = 1)
self.speedVar = StringVar()
self.speedVar.set("0.00")
self.speedEntry = Entry(frame, textvariable = self.speedVar,
@ -368,14 +367,14 @@ class MopathRecorder(AppShell, DirectObject):
'<Return>',
lambda e = None, s = self: s.setSpeedScale(
string.atof(s.speedVar.get())))
self.speedEntry.pack(side = LEFT, expand = 0)
frame.pack(fill = X, expand = 1)
self.speedEntry.pack(side = Tkinter.LEFT, expand = 0)
frame.pack(fill = Tkinter.X, expand = 1)
playbackFrame.pack(fill = X, pady = 2)
playbackFrame.pack(fill = Tkinter.X, pady = 2)
# Create notebook pages
self.mainNotebook = Pmw.NoteBook(interior)
self.mainNotebook.pack(fill = BOTH, expand = 1)
self.mainNotebook.pack(fill = Tkinter.BOTH, expand = 1)
self.resamplePage = self.mainNotebook.add('Resample')
self.refinePage = self.mainNotebook.add('Refine')
self.extendPage = self.mainNotebook.add('Extend')
@ -386,35 +385,35 @@ class MopathRecorder(AppShell, DirectObject):
## RESAMPLE PAGE
label = Label(self.resamplePage, text = 'RESAMPLE CURVE',
font=('MSSansSerif', 12, 'bold'))
label.pack(fill = X)
label.pack(fill = Tkinter.X)
# Resample
resampleFrame = Frame(
self.resamplePage, relief = SUNKEN, borderwidth = 2)
self.resamplePage, relief = Tkinter.SUNKEN, borderwidth = 2)
label = Label(resampleFrame, text = 'RESAMPLE CURVE',
font=('MSSansSerif', 12, 'bold')).pack()
widget = self.createSlider(
resampleFrame, 'Resample', 'Num. Samples',
'Number of samples in resampled curve',
resolution = 1, min = 2, max = 1000, command = self.setNumSamples)
widget.component('hull')['relief'] = RIDGE
widget.component('hull')['relief'] = Tkinter.RIDGE
widget['postCallback'] = self.sampleCurve
frame = Frame(resampleFrame)
self.createButton(
frame, 'Resample', 'Make Even',
'Apply timewarp so resulting path has constant velocity',
self.makeEven, side = LEFT, fill = X, expand = 1)
self.makeEven, side = Tkinter.LEFT, fill = Tkinter.X, expand = 1)
self.createButton(
frame, 'Resample', 'Face Forward',
'Compute HPR so resulting hpr curve faces along xyz tangent',
self.faceForward, side = LEFT, fill = X, expand = 1)
frame.pack(fill = X, expand = 0)
resampleFrame.pack(fill = X, expand = 0, pady = 2)
self.faceForward, side = Tkinter.LEFT, fill = Tkinter.X, expand = 1)
frame.pack(fill = Tkinter.X, expand = 0)
resampleFrame.pack(fill = Tkinter.X, expand = 0, pady = 2)
# Desample
desampleFrame = Frame(
self.resamplePage, relief = SUNKEN, borderwidth = 2)
self.resamplePage, relief = Tkinter.SUNKEN, borderwidth = 2)
Label(desampleFrame, text = 'DESAMPLE CURVE',
font=('MSSansSerif', 12, 'bold')).pack()
widget = self.createSlider(
@ -422,16 +421,16 @@ class MopathRecorder(AppShell, DirectObject):
'Specify number of points to skip between samples',
min = 1, max = 100, resolution = 1,
command = self.setDesampleFrequency)
widget.component('hull')['relief'] = RIDGE
widget.component('hull')['relief'] = Tkinter.RIDGE
widget['postCallback'] = self.desampleCurve
desampleFrame.pack(fill = X, expand = 0, pady = 2)
desampleFrame.pack(fill = Tkinter.X, expand = 0, pady = 2)
## REFINE PAGE ##
refineFrame = Frame(self.refinePage, relief = SUNKEN,
refineFrame = Frame(self.refinePage, relief = Tkinter.SUNKEN,
borderwidth = 2)
label = Label(refineFrame, text = 'REFINE CURVE',
font=('MSSansSerif', 12, 'bold'))
label.pack(fill = X)
label.pack(fill = Tkinter.X)
widget = self.createSlider(refineFrame,
'Refine Page', 'Refine From',
@ -460,14 +459,14 @@ class MopathRecorder(AppShell, DirectObject):
command = self.setRefineStop)
widget['preCallback'] = self.setRefineMode
widget['postCallback'] = self.getPostPoints
refineFrame.pack(fill = X)
refineFrame.pack(fill = Tkinter.X)
## EXTEND PAGE ##
extendFrame = Frame(self.extendPage, relief = SUNKEN,
extendFrame = Frame(self.extendPage, relief = Tkinter.SUNKEN,
borderwidth = 2)
label = Label(extendFrame, text = 'EXTEND CURVE',
font=('MSSansSerif', 12, 'bold'))
label.pack(fill = X)
label.pack(fill = Tkinter.X)
widget = self.createSlider(extendFrame,
'Extend Page', 'Extend From',
@ -483,14 +482,14 @@ class MopathRecorder(AppShell, DirectObject):
resolution = 0.01,
command = self.setControlStart)
widget['preCallback'] = self.setExtendMode
extendFrame.pack(fill = X)
extendFrame.pack(fill = Tkinter.X)
## CROP PAGE ##
cropFrame = Frame(self.cropPage, relief = SUNKEN,
cropFrame = Frame(self.cropPage, relief = Tkinter.SUNKEN,
borderwidth = 2)
label = Label(cropFrame, text = 'CROP CURVE',
font=('MSSansSerif', 12, 'bold'))
label.pack(fill = X)
label.pack(fill = Tkinter.X)
widget = self.createSlider(
cropFrame,
@ -508,11 +507,11 @@ class MopathRecorder(AppShell, DirectObject):
self.createButton(cropFrame, 'Crop Page', 'Crop Curve',
'Crop curve to specified from to times',
self.cropCurve, fill = NONE)
cropFrame.pack(fill = X)
self.cropCurve, fill = Tkinter.NONE)
cropFrame.pack(fill = Tkinter.X)
## DRAW PAGE ##
drawFrame = Frame(self.drawPage, relief = SUNKEN,
drawFrame = Frame(self.drawPage, relief = Tkinter.SUNKEN,
borderwidth = 2)
self.sf = Pmw.ScrolledFrame(self.drawPage, horizflex = 'elastic')
@ -521,57 +520,57 @@ class MopathRecorder(AppShell, DirectObject):
label = Label(sfFrame, text = 'CURVE RENDERING STYLE',
font=('MSSansSerif', 12, 'bold'))
label.pack(fill = X)
label.pack(fill = Tkinter.X)
frame = Frame(sfFrame)
Label(frame, text = 'SHOW:').pack(side = LEFT, expand = 0)
Label(frame, text = 'SHOW:').pack(side = Tkinter.LEFT, expand = 0)
widget = self.createCheckbutton(
frame, 'Style', 'Path',
'On: path is visible', self.setPathVis, 1,
side = LEFT, fill = X, expand = 1)
side = Tkinter.LEFT, fill = Tkinter.X, expand = 1)
widget = self.createCheckbutton(
frame, 'Style', 'Knots',
'On: path knots are visible', self.setKnotVis, 1,
side = LEFT, fill = X, expand = 1)
side = Tkinter.LEFT, fill = Tkinter.X, expand = 1)
widget = self.createCheckbutton(
frame, 'Style', 'CVs',
'On: path CVs are visible', self.setCvVis, 0,
side = LEFT, fill = X, expand = 1)
side = Tkinter.LEFT, fill = Tkinter.X, expand = 1)
widget = self.createCheckbutton(
frame, 'Style', 'Hull',
'On: path hull is visible', self.setHullVis, 0,
side = LEFT, fill = X, expand = 1)
side = Tkinter.LEFT, fill = Tkinter.X, expand = 1)
widget = self.createCheckbutton(
frame, 'Style', 'Trace',
'On: record is visible', self.setTraceVis, 0,
side = LEFT, fill = X, expand = 1)
side = Tkinter.LEFT, fill = Tkinter.X, expand = 1)
widget = self.createCheckbutton(
frame, 'Style', 'Marker',
'On: playback marker is visible', self.setMarkerVis, 0,
side = LEFT, fill = X, expand = 1)
frame.pack(fill = X, expand = 1)
side = Tkinter.LEFT, fill = Tkinter.X, expand = 1)
frame.pack(fill = Tkinter.X, expand = 1)
# Sliders
widget = self.createSlider(
sfFrame, 'Style', 'Num Segs',
'Set number of segments used to approximate each parametric unit',
min = 1.0, max = 400, resolution = 1.0,
value = 40,
command = self.setNumSegs, side = TOP)
widget.component('hull')['relief'] = RIDGE
command = self.setNumSegs, side = Tkinter.TOP)
widget.component('hull')['relief'] = Tkinter.RIDGE
widget = self.createSlider(
sfFrame, 'Style', 'Num Ticks',
'Set number of tick marks drawn for each unit of time',
min = 0.0, max = 10.0, resolution = 1.0,
value = 0.0,
command = self.setNumTicks, side = TOP)
widget.component('hull')['relief'] = RIDGE
command = self.setNumTicks, side = Tkinter.TOP)
widget.component('hull')['relief'] = Tkinter.RIDGE
widget = self.createSlider(
sfFrame, 'Style', 'Tick Scale',
'Set visible size of time tick marks',
min = 0.01, max = 100.0, resolution = 0.01,
value = 5.0,
command = self.setTickScale, side = TOP)
widget.component('hull')['relief'] = RIDGE
command = self.setTickScale, side = Tkinter.TOP)
widget.component('hull')['relief'] = Tkinter.RIDGE
self.createColorEntry(
sfFrame, 'Style', 'Path Color',
'Color of curve',
@ -598,14 +597,14 @@ class MopathRecorder(AppShell, DirectObject):
command = self.setHullColor,
value = [255.0,128.0,128.0,255.0])
#drawFrame.pack(fill = X)
#drawFrame.pack(fill = Tkinter.X)
## OPTIONS PAGE ##
optionsFrame = Frame(self.optionsPage, relief = SUNKEN,
optionsFrame = Frame(self.optionsPage, relief = Tkinter.SUNKEN,
borderwidth = 2)
label = Label(optionsFrame, text = 'RECORDING OPTIONS',
font=('MSSansSerif', 12, 'bold'))
label.pack(fill = X)
label.pack(fill = Tkinter.X)
# Hooks
frame = Frame(optionsFrame)
widget = self.createLabeledEntry(
@ -614,7 +613,7 @@ class MopathRecorder(AppShell, DirectObject):
value = self.startStopHook,
command = self.setStartStopHook)[0]
label = self.getWidget('Recording', 'Record Hook-Label')
label.configure(width = 16, anchor = W)
label.configure(width = 16, anchor = Tkinter.W)
self.setStartStopHook()
widget = self.createLabeledEntry(
frame, 'Recording', 'Keyframe Hook',
@ -622,9 +621,9 @@ class MopathRecorder(AppShell, DirectObject):
value = self.keyframeHook,
command = self.setKeyframeHook)[0]
label = self.getWidget('Recording', 'Keyframe Hook-Label')
label.configure(width = 16, anchor = W)
label.configure(width = 16, anchor = Tkinter.W)
self.setKeyframeHook()
frame.pack(expand = 1, fill = X)
frame.pack(expand = 1, fill = Tkinter.X)
# PreRecordFunc
frame = Frame(optionsFrame)
widget = self.createComboBox(
@ -632,17 +631,17 @@ class MopathRecorder(AppShell, DirectObject):
'Function called before sampling each point',
PRF_UTILITIES, self.setPreRecordFunc,
history = 1, expand = 1)
widget.configure(label_width = 16, label_anchor = W)
widget.configure(label_width = 16, label_anchor = Tkinter.W)
widget.configure(entryfield_entry_state = 'normal')
# Initialize preRecordFunc
self.preRecordFunc = eval(PRF_UTILITIES[0])
self.createCheckbutton(frame, 'Recording', 'PRF Active',
'On: Pre Record Func enabled',
None, 0,
side = LEFT, fill = BOTH, expand = 0)
frame.pack(expand = 1, fill = X)
side = Tkinter.LEFT, fill = Tkinter.BOTH, expand = 0)
frame.pack(expand = 1, fill = Tkinter.X)
# Pack record frame
optionsFrame.pack(fill = X, pady = 2)
optionsFrame.pack(fill = Tkinter.X, pady = 2)
self.mainNotebook.setnaturalsize()
@ -1734,28 +1733,28 @@ class MopathRecorder(AppShell, DirectObject):
def createLabeledEntry(self, parent, category, text, balloonHelp,
value = '', command = None,
relief = 'sunken', side = LEFT,
relief = 'sunken', side = Tkinter.LEFT,
expand = 1, width = 12):
frame = Frame(parent)
variable = StringVar()
variable.set(value)
label = Label(frame, text = text)
label.pack(side = LEFT, fill = X)
label.pack(side = Tkinter.LEFT, fill = Tkinter.X)
self.bind(label, balloonHelp)
self.widgetDict[category + '-' + text + '-Label'] = label
entry = Entry(frame, width = width, relief = relief,
textvariable = variable)
entry.pack(side = LEFT, fill = X, expand = expand)
entry.pack(side = Tkinter.LEFT, fill = Tkinter.X, expand = expand)
self.bind(entry, balloonHelp)
self.widgetDict[category + '-' + text] = entry
self.variableDict[category + '-' + text] = variable
if command:
entry.bind('<Return>', command)
frame.pack(side = side, fill = X, expand = expand)
frame.pack(side = side, fill = Tkinter.X, expand = expand)
return (frame, label, entry)
def createButton(self, parent, category, text, balloonHelp, command,
side = 'top', expand = 0, fill = X):
side = 'top', expand = 0, fill = Tkinter.X):
widget = Button(parent, text = text)
# Do this after the widget so command isn't called on creation
widget['command'] = command
@ -1766,10 +1765,10 @@ class MopathRecorder(AppShell, DirectObject):
def createCheckbutton(self, parent, category, text,
balloonHelp, command, initialState,
side = 'top', fill = X, expand = 0):
side = 'top', fill = Tkinter.X, expand = 0):
bool = BooleanVar()
bool.set(initialState)
widget = Checkbutton(parent, text = text, anchor = W,
widget = Checkbutton(parent, text = text, anchor = Tkinter.W,
variable = bool)
# Do this after the widget so command isn't called on creation
widget['command'] = command
@ -1781,8 +1780,8 @@ class MopathRecorder(AppShell, DirectObject):
def createRadiobutton(self, parent, side, category, text,
balloonHelp, variable, value,
command = None, fill = X, expand = 0):
widget = Radiobutton(parent, text = text, anchor = W,
command = None, fill = Tkinter.X, expand = 0):
widget = Radiobutton(parent, text = text, anchor = Tkinter.W,
variable = variable, value = value)
# Do this after the widget so command isn't called on creation
widget['command'] = command
@ -1798,10 +1797,10 @@ class MopathRecorder(AppShell, DirectObject):
kw['min'] = min
kw['maxVelocity'] = maxVelocity
kw['resolution'] = resolution
widget = apply(Floater.Floater, (parent,), kw)
widget = apply(Floater, (parent,), kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(fill = X)
widget.pack(fill = Tkinter.X)
self.bind(widget, balloonHelp)
self.widgetDict[category + '-' + text] = widget
return widget
@ -1809,10 +1808,10 @@ class MopathRecorder(AppShell, DirectObject):
def createAngleDial(self, parent, category, text, balloonHelp,
command = None, **kw):
kw['text'] = text
widget = apply(Dial.AngleDial,(parent,), kw)
widget = apply(AngleDial,(parent,), kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(fill = X)
widget.pack(fill = Tkinter.X)
self.bind(widget, balloonHelp)
self.widgetDict[category + '-' + text] = widget
return widget
@ -1820,14 +1819,13 @@ class MopathRecorder(AppShell, DirectObject):
def createSlider(self, parent, category, text, balloonHelp,
command = None, min = 0.0, max = 1.0,
resolution = None,
side = TOP, fill = X, expand = 1, **kw):
side = Tkinter.TOP, fill = Tkinter.X, expand = 1, **kw):
kw['text'] = text
kw['min'] = min
kw['max'] = max
kw['resolution'] = resolution
#widget = apply(EntryScale.EntryScale, (parent,), kw)
from direct.tkwidgets import Slider
widget = apply(Slider.Slider, (parent,), kw)
#widget = apply(EntryScale, (parent,), kw)
widget = apply(Slider, (parent,), kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(side = side, fill = fill, expand = expand)
@ -1838,12 +1836,12 @@ class MopathRecorder(AppShell, DirectObject):
def createEntryScale(self, parent, category, text, balloonHelp,
command = None, min = 0.0, max = 1.0,
resolution = None,
side = TOP, fill = X, expand = 1, **kw):
side = Tkinter.TOP, fill = Tkinter.X, expand = 1, **kw):
kw['text'] = text
kw['min'] = min
kw['max'] = max
kw['resolution'] = resolution
widget = apply(EntryScale.EntryScale, (parent,), kw)
widget = apply(EntryScale, (parent,), kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(side = side, fill = fill, expand = expand)
@ -1855,10 +1853,10 @@ class MopathRecorder(AppShell, DirectObject):
command = None, **kw):
# Set label's text
kw['text'] = text
widget = apply(VectorWidgets.Vector2Entry, (parent,), kw)
widget = apply(Vector2Entry, (parent,), kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(fill = X)
widget.pack(fill = Tkinter.X)
self.bind(widget, balloonHelp)
self.widgetDict[category + '-' + text] = widget
return widget
@ -1867,10 +1865,10 @@ class MopathRecorder(AppShell, DirectObject):
command = None, **kw):
# Set label's text
kw['text'] = text
widget = apply(VectorWidgets.Vector3Entry, (parent,), kw)
widget = apply(Vector3Entry, (parent,), kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(fill = X)
widget.pack(fill = Tkinter.X)
self.bind(widget, balloonHelp)
self.widgetDict[category + '-' + text] = widget
return widget
@ -1879,10 +1877,10 @@ class MopathRecorder(AppShell, DirectObject):
command = None, **kw):
# Set label's text
kw['text'] = text
widget = apply(VectorWidgets.ColorEntry, (parent,) ,kw)
widget = apply(ColorEntry, (parent,) ,kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(fill = X)
widget.pack(fill = Tkinter.X)
self.bind(widget, balloonHelp)
self.widgetDict[category + '-' + text] = widget
return widget
@ -1892,13 +1890,13 @@ class MopathRecorder(AppShell, DirectObject):
optionVar = StringVar()
if len(items) > 0:
optionVar.set(items[0])
widget = Pmw.OptionMenu(parent, labelpos = W, label_text = text,
widget = Pmw.OptionMenu(parent, labelpos = Tkinter.W, label_text = text,
label_width = 12, menu_tearoff = 1,
menubutton_textvariable = optionVar,
items = items)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(fill = X)
widget.pack(fill = Tkinter.X)
self.bind(widget.component('menubutton'), balloonHelp)
self.widgetDict[category + '-' + text] = widget
self.variableDict[category + '-' + text] = optionVar
@ -1906,9 +1904,9 @@ class MopathRecorder(AppShell, DirectObject):
def createComboBox(self, parent, category, text, balloonHelp,
items, command, history = 0,
side = LEFT, expand = 0, fill = X):
side = Tkinter.LEFT, expand = 0, fill = Tkinter.X):
widget = Pmw.ComboBox(parent,
labelpos = W,
labelpos = Tkinter.W,
label_text = text,
label_anchor = 'e',
label_width = 12,
@ -2038,8 +2036,8 @@ class namePathPanel(AppShell):
dataFrame = Frame(mainFrame)
label = Label(dataFrame, text='This name will be used as a reference for this Path.',font=('MSSansSerif', 10))
label.pack(side = TOP, expand = 0, fill = X)
dataFrame.pack(side = TOP, expand = 0, fill = X, padx=5, pady=10)
label.pack(side = Tkinter.TOP, expand = 0, fill = Tkinter.X)
dataFrame.pack(side = Tkinter.TOP, expand = 0, fill = Tkinter.X, padx=5, pady=10)
dataFrame = Frame(mainFrame)
self.inputZone = Pmw.EntryField(dataFrame, labelpos='w', label_text = 'Name Selected Path: ',
@ -2047,14 +2045,14 @@ class namePathPanel(AppShell):
label_font=('MSSansSerif', 10),
validate = None,
entry_width = 20)
self.inputZone.pack(side = LEFT, fill=X,expand=0)
self.inputZone.pack(side = Tkinter.LEFT, fill=Tkinter.X,expand=0)
self.button_ok = Button(dataFrame, text="OK", command=self.ok_press,width=10)
self.button_ok.pack(fill=X,expand=0,side=LEFT, padx = 3)
self.button_ok.pack(fill=Tkinter.X,expand=0,side=Tkinter.LEFT, padx = 3)
dataFrame.pack(side = TOP, expand = 0, fill = X, padx=10, pady=10)
dataFrame.pack(side = Tkinter.TOP, expand = 0, fill = Tkinter.X, padx=10, pady=10)
mainFrame.pack(expand = 1, fill = BOTH)
mainFrame.pack(expand = 1, fill = Tkinter.BOTH)

View File

@ -1,15 +1,15 @@
"""PANDA3D Particle Panel"""
# Import Tkinter, Pmw, and the floater code from this directory tree.
from direct.tkwidgets.AppShell import *
from direct.showbase.TkGlobal import *
from direct.tkwidgets.AppShell import AppShell
from tkFileDialog import *
from tkSimpleDialog import askstring
import os
from direct.tkwidgets import Dial
from direct.tkwidgets import Floater
from direct.tkwidgets import Slider
from direct.tkwidgets import VectorWidgets
import os, Pmw, Tkinter
from direct.tkwidgets.Dial import AngleDial
from direct.tkwidgets.Floater import Floater
from direct.tkwidgets.Slider import Slider
from direct.tkwidgets.VectorWidgets import Vector2Entry, Vector3Entry
from direct.tkwidgets.VectorWidgets import ColorEntry
import sePlacer
import seForceGroup
import seParticles
@ -774,7 +774,7 @@ class ParticlePanel(AppShell):
kw['min'] = min
kw['resolution'] = resolution
kw['numDigits'] = numDigits
widget = apply(Floater.Floater, (parent,), kw)
widget = apply(Floater, (parent,), kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(fill = X)
@ -786,7 +786,7 @@ class ParticlePanel(AppShell):
command = None, **kw):
kw['text'] = text
kw['style'] = 'mini'
widget = apply(Dial.AngleDial,(parent,), kw)
widget = apply(AngleDial,(parent,), kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(fill = X)
@ -801,7 +801,7 @@ class ParticlePanel(AppShell):
kw['min'] = min
kw['max'] = max
kw['resolution'] = resolution
widget = apply(Slider.Slider, (parent,), kw)
widget = apply(Slider, (parent,), kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(fill = X)
@ -813,7 +813,7 @@ class ParticlePanel(AppShell):
command = None, **kw):
# Set label's text
kw['text'] = text
widget = apply(VectorWidgets.Vector2Entry, (parent,), kw)
widget = apply(Vector2Entry, (parent,), kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(fill = X)
@ -825,7 +825,7 @@ class ParticlePanel(AppShell):
command = None, **kw):
# Set label's text
kw['text'] = text
widget = apply(VectorWidgets.Vector3Entry, (parent,), kw)
widget = apply(Vector3Entry, (parent,), kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(fill = X)
@ -837,7 +837,7 @@ class ParticlePanel(AppShell):
command = None, **kw):
# Set label's text
kw['text'] = text
widget = apply(VectorWidgets.ColorEntry, (parent,) ,kw)
widget = apply(ColorEntry, (parent,) ,kw)
# Do this after the widget so command isn't called on creation
widget['command'] = command
widget.pack(fill = X)

View File

@ -1,12 +1,13 @@
""" DIRECT Nine DoF Manipulation Panel """
# Import Tkinter, Pmw, and the dial code from this directory tree.
from direct.showbase.DirectObject import *
from direct.showbase.DirectObject import DirectObject
from direct.directtools.DirectGlobals import *
from direct.showbase.TkGlobal import *
from direct.tkwidgets.AppShell import *
from direct.tkwidgets import Dial
from direct.tkwidgets import Floater
from direct.tkwidgets.AppShell import AppShell
from direct.tkwidgets.Dial import AngleDial
from direct.tkwidgets.Floater import Floater
from Tkinter import Button, Menubutton, Menu, StringVar
from pandac.PandaModules import *
import Tkinter, Pmw
"""
TODO:
Task to monitor pose
@ -83,7 +84,7 @@ class Placer(AppShell):
def createInterface(self):
# The interior of the toplevel panel
interior = self.interior()
interior['relief'] = FLAT
interior['relief'] = Tkinter.FLAT
# Add placer commands to menubar
self.menuBar.addmenu('Placer', 'Placer Panel Operations')
self.menuBar.addmenuitem('Placer', 'command',
@ -112,7 +113,7 @@ class Placer(AppShell):
# Get a handle to the menu frame
menuFrame = self.menuFrame
self.nodePathMenu = Pmw.ComboBox(
menuFrame, labelpos = W, label_text = 'Node Path:',
menuFrame, labelpos = Tkinter.W, label_text = 'Node Path:',
entry_width = 20,
selectioncommand = self.selectNodePathNamed,
scrolledlist_items = self.nodePathNames)
@ -167,7 +168,7 @@ class Placer(AppShell):
tag_text = 'Position',
tag_font=('MSSansSerif', 14),
tag_activebackground = '#909090',
ring_relief = RIDGE)
ring_relief = Tkinter.RIDGE)
posMenubutton = posGroup.component('tag')
self.bind(posMenubutton, 'Position menu operations')
posMenu = Menu(posMenubutton, tearoff = 0)
@ -180,8 +181,8 @@ class Placer(AppShell):
# Create the dials
self.posX = self.createcomponent('posX', (), None,
Floater.Floater, (posInterior,),
text = 'X', relief = FLAT,
Floater, (posInterior,),
text = 'X', relief = Tkinter.FLAT,
value = 0.0,
label_foreground = 'Red')
self.posX['commandData'] = ['x']
@ -191,8 +192,8 @@ class Placer(AppShell):
self.posX.pack(expand=1,fill='both')
self.posY = self.createcomponent('posY', (), None,
Floater.Floater, (posInterior,),
text = 'Y', relief = FLAT,
Floater, (posInterior,),
text = 'Y', relief = Tkinter.FLAT,
value = 0.0,
label_foreground = '#00A000')
self.posY['commandData'] = ['y']
@ -202,8 +203,8 @@ class Placer(AppShell):
self.posY.pack(expand=1,fill='both')
self.posZ = self.createcomponent('posZ', (), None,
Floater.Floater, (posInterior,),
text = 'Z', relief = FLAT,
Floater, (posInterior,),
text = 'Z', relief = Tkinter.FLAT,
value = 0.0,
label_foreground = 'Blue')
self.posZ['commandData'] = ['z']
@ -218,7 +219,7 @@ class Placer(AppShell):
tag_text = 'Orientation',
tag_font=('MSSansSerif', 14),
tag_activebackground = '#909090',
ring_relief = RIDGE)
ring_relief = Tkinter.RIDGE)
hprMenubutton = hprGroup.component('tag')
self.bind(hprMenubutton, 'Orientation menu operations')
hprMenu = Menu(hprMenubutton, tearoff = 0)
@ -230,10 +231,10 @@ class Placer(AppShell):
# Create the dials
self.hprH = self.createcomponent('hprH', (), None,
Dial.AngleDial, (hprInterior,),
AngleDial, (hprInterior,),
style = 'mini',
text = 'H', value = 0.0,
relief = FLAT,
relief = Tkinter.FLAT,
label_foreground = 'blue')
self.hprH['commandData'] = ['h']
self.hprH['preCallback'] = self.xformStart
@ -242,10 +243,10 @@ class Placer(AppShell):
self.hprH.pack(expand=1,fill='both')
self.hprP = self.createcomponent('hprP', (), None,
Dial.AngleDial, (hprInterior,),
AngleDial, (hprInterior,),
style = 'mini',
text = 'P', value = 0.0,
relief = FLAT,
relief = Tkinter.FLAT,
label_foreground = 'red')
self.hprP['commandData'] = ['p']
self.hprP['preCallback'] = self.xformStart
@ -254,10 +255,10 @@ class Placer(AppShell):
self.hprP.pack(expand=1,fill='both')
self.hprR = self.createcomponent('hprR', (), None,
Dial.AngleDial, (hprInterior,),
AngleDial, (hprInterior,),
style = 'mini',
text = 'R', value = 0.0,
relief = FLAT,
relief = Tkinter.FLAT,
label_foreground = '#00A000')
self.hprR['commandData'] = ['r']
self.hprR['preCallback'] = self.xformStart
@ -275,7 +276,7 @@ class Placer(AppShell):
tag_pyclass = Menubutton,
tag_font=('MSSansSerif', 14),
tag_activebackground = '#909090',
ring_relief = RIDGE)
ring_relief = Tkinter.RIDGE)
self.scaleMenubutton = scaleGroup.component('tag')
self.bind(self.scaleMenubutton, 'Scale menu operations')
self.scaleMenubutton['textvariable'] = self.scalingMode
@ -299,9 +300,9 @@ class Placer(AppShell):
# Create the dials
self.scaleX = self.createcomponent('scaleX', (), None,
Floater.Floater, (scaleInterior,),
Floater, (scaleInterior,),
text = 'X Scale',
relief = FLAT,
relief = Tkinter.FLAT,
min = 0.0001, value = 1.0,
resetValue = 1.0,
label_foreground = 'Red')
@ -312,9 +313,9 @@ class Placer(AppShell):
self.scaleX.pack(expand=1,fill='both')
self.scaleY = self.createcomponent('scaleY', (), None,
Floater.Floater, (scaleInterior,),
Floater, (scaleInterior,),
text = 'Y Scale',
relief = FLAT,
relief = Tkinter.FLAT,
min = 0.0001, value = 1.0,
resetValue = 1.0,
label_foreground = '#00A000')
@ -325,9 +326,9 @@ class Placer(AppShell):
self.scaleY.pack(expand=1,fill='both')
self.scaleZ = self.createcomponent('scaleZ', (), None,
Floater.Floater, (scaleInterior,),
Floater, (scaleInterior,),
text = 'Z Scale',
relief = FLAT,
relief = Tkinter.FLAT,
min = 0.0001, value = 1.0,
resetValue = 1.0,
label_foreground = 'Blue')

View File

@ -8,9 +8,10 @@
# Do forget to check the seTree.
#
#################################################################
from direct.showbase.DirectObject import *
from direct.showbase.TkGlobal import *
from seTree import *
from direct.showbase.DirectObject import DirectObject
from Tkinter import IntVar, Frame, Label
from seTree import TreeNode, TreeItem
import Pmw, Tkinter
# changing these strings requires changing sceneEditor.py SGE_ strs too!
# This list of items will be showed on the pop out window when user right click on
@ -56,7 +57,7 @@ class seSceneGraphExplorer(Pmw.MegaWidget, DirectObject):
# Setup up container
interior = self.interior()
interior.configure(relief = GROOVE, borderwidth = 2)
interior.configure(relief = Tkinter.GROOVE, borderwidth = 2)
# Create a label and an entry
self._scrolledCanvas = self.createcomponent(
@ -68,7 +69,7 @@ class seSceneGraphExplorer(Pmw.MegaWidget, DirectObject):
self._canvas = self._scrolledCanvas.component('canvas')
self._canvas['scrollregion'] = ('0i', '0i', '2i', '4i')
self._scrolledCanvas.resizescrollregion()
self._scrolledCanvas.pack(padx = 3, pady = 3, expand=1, fill = BOTH)
self._scrolledCanvas.pack(padx = 3, pady = 3, expand=1, fill = Tkinter.BOTH)
self._canvas.bind('<ButtonPress-2>', self.mouse2Down)
self._canvas.bind('<B2-Motion>', self.mouse2Motion)
@ -90,8 +91,8 @@ class seSceneGraphExplorer(Pmw.MegaWidget, DirectObject):
(), None,
Label, (interior,),
text = 'Active Reparent Target: ',
anchor = W, justify = LEFT)
self._label.pack(fill = X)
anchor = Tkinter.W, justify = Tkinter.LEFT)
self._label.pack(fill = Tkinter.X)
# Add update parent label
def updateLabel(nodePath = None, s = self):

View File

@ -11,10 +11,10 @@
# (If we do change original directools, it will force user has to install the latest version of OUR Panda)
#
#################################################################
from direct.showbase.DirectObject import *
from direct.directtools.DirectGlobals import *
from direct.directtools.DirectUtil import *
from seGeometry import *
from direct.showbase.DirectObject import *
from quad import *
COA_ORIGIN = 0
COA_CENTER = 1

View File

@ -12,11 +12,10 @@
#
#################################################################
import os
import sys
import string
from direct.showbase.TkGlobal import *
from direct.showbase.DirectObject import *
import os, sys, string, Pmw, Tkinter
from direct.showbase.DirectObject import DirectObject
from Tkinter import IntVar, Menu, PhotoImage, Label, Frame, Entry
from pandac.PandaModules import *
# Initialize icon directory
ICONDIR = getModelPath().findFile(Filename('icons')).toOsSpecific()
@ -188,9 +187,9 @@ class TreeNode:
oldcursor = self.canvas['cursor']
self.canvas['cursor'] = "watch"
self.canvas.update()
self.canvas.delete(ALL) # XXX could be more subtle
self.canvas.delete(Tkinter.ALL) # XXX could be more subtle
self.draw(7, 2)
x0, y0, x1, y1 = self.canvas.bbox(ALL)
x0, y0, x1, y1 = self.canvas.bbox(Tkinter.ALL)
self.canvas.configure(scrollregion=(0, 0, x1, y1))
self.canvas['cursor'] = oldcursor
@ -310,7 +309,7 @@ class TreeNode:
def edit(self, event=None):
self.entry = Entry(self.label, bd=0, highlightthickness=1, width=0)
self.entry.insert(0, self.label['text'])
self.entry.selection_range(0, END)
self.entry.selection_range(0, Tkinter.END)
self.entry.pack(ipadx=5)
self.entry.focus_set()
self.entry.bind("<Return>", self.edit_finish)