*** empty log message ***

This commit is contained in:
Mark Mine 2000-10-17 21:21:35 +00:00
parent f7209145c2
commit 9c897dbc90
7 changed files with 3235 additions and 28 deletions

View File

@ -0,0 +1,3 @@
// For now, since these scripts are not installed anywhere, this file can
// remain empty.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,53 @@
#! /bin/sh
### NOTE: YOU MUST UPDATE THE PATHS TO YOUR HOME DIRECTORY AND EMACS BELOW
# Under Windows/Cygwin, we have to de-cygwinify the semicolon
# separated PYTHONPATH
# First, initialize the new path
NEWPYTHONPATH=
# To iterate, temporarily change the semicolons into spaces
for path in `echo $PYTHONPATH | sed 'y/;/ /'`; do
# Then for each entry run it through the cygwin filter
NEWPYTHONPATH=$NEWPYTHONPATH\;`cygpath -w $path`
done
# Export the new PYTHONPATH
PYTHONPATH=$NEWPYTHONPATH
export PYTHONPATH
# Lets also de-cygwinify the Project variables (so you can use file name
# completion) This is hardcoded for the most popular trees
if [ "$DTOOL" ]; then
DTOOL=`cygpath -w $DTOOL`
export DTOOL
fi
if [ "$PANDA" ]; then
PANDA=`cygpath -w $PANDA`
export PANDA
fi
if [ "$DIRECT" ]; then
DIRECT=`cygpath -w $DIRECT`
export DIRECT
fi
if [ "$TOONTOWN" ]; then
TOONTOWN=`cygpath -w $TOONTOWN`
export TOONTOWN
fi
# Export the proper home environment variable
HOME="C:\Cygwin\usr\YOUR_HOME_DIR_HERE"
export HOME
# Now start up emacs
# UPDATE THE PATH TO YOUR COPY OF EMACS HERE
if [ "$1" != "" ]; then
exec "C:\Program Files\emacs-20.7\bin\runemacs" $1
else
exec "C:\Program Files\emacs-20.7\bin\runemacs"
fi

View File

@ -1,4 +1,5 @@
from PandaObject import *
import math
class DisplayRegionContext(PandaObject):
def __init__(self, win, camera):
@ -9,14 +10,21 @@ class DisplayRegionContext(PandaObject):
self.mouseData = win.getMouseData(0)
self.mouseX = 0.0
self.mouseY = 0.0
#self.spawnContextTask()
def __getitem__(self,key):
return self.__dict__[key]
def start(self):
# First shutdown any existing task
self.stop()
# Start a new context task
self.spawnContextTask()
def stop(self):
# Kill the existing context task
taskMgr.removeTasksNamed('DIRECTContextTask')
def spawnContextTask(self):
# First kill the existing task
#taskMgr.removeTasksNamed('DIRECTContextTask')
taskMgr.spawnTaskNamed(Task.Task(self.contextTask),
'DIRECTContextTask')
@ -41,14 +49,13 @@ class DisplayRegionContext(PandaObject):
self.mouseY = ((self.mousePixelY / float(self.height)) * -2.0) + 1.0
self.mouseDeltaX = self.mouseX - self.mouseLastX
self.mouseDeltaY = self.mouseY - self.mouseLastY
print self.mouseX, self.mouseY
# Continue the task
return Task.cont
class DirectSession(PandaObject):
def __init__(self):
self.contextList = []
self.contextList.append(DisplayRegionContext(self.win, self.camera))
self.contextList.append(DisplayRegionContext(base.win, base.camera))
# Initialize the collection of selected nodePaths
self.selectedNodePaths = {}

View File

@ -3,9 +3,9 @@
# Import Tkinter, Pmw, and the floater code from this directory tree.
from Tkinter import *
import Pmw
import dial
import floater
import vectorWidgets
import Dial
import Floater
import VectorWidgets
class ParticlePanel(Pmw.MegaToplevel):
def __init__(self, parent = None, **kw):

View File

@ -1,10 +1,9 @@
"DIRECT Nine DoF Placer demonstration"
# Import Tkinter, Pmw, and the floater code from this directory tree.
# Import Tkinter, Pmw, and the dial code from this directory tree.
from Tkinter import *
import Pmw
import floater
import dial
import Dial
class Placer(Pmw.MegaToplevel):
def __init__(self, parent = None, **kw):
@ -101,7 +100,7 @@ class Placer(Pmw.MegaToplevel):
menubutton_textvariable=mode,
items = ('Drive', 'Orbit',
'Absolute', 'Relative'),
command = self._updateFloaterLabels,
command = self._updateDialLabels,
menubutton_width = 8)
modeMenu.pack(side = 'left', expand = 0)
@ -137,23 +136,23 @@ class Placer(Pmw.MegaToplevel):
posGroup.pack(side='left',fill = 'both', expand = 1)
posInterior = posGroup.interior()
# Create the floaters
# Create the dials
self.posX = self.createcomponent('posX', (), None,
dial.Dial, (posInterior,),
Dial.Dial, (posInterior,),
text = 'X',
label_foreground = 'Red')
self.posX['command'] = self.printCommand
self.posX.pack(expand=1,fill='x')
self.posY = self.createcomponent('posY', (), None,
dial.Dial, (posInterior,),
Dial.Dial, (posInterior,),
text = 'Y',
label_foreground = '#00A000')
self.posY['command'] = self.printCommand
self.posY.pack(expand=1,fill='x')
self.posZ = self.createcomponent('posZ', (), None,
dial.Dial, (posInterior,),
Dial.Dial, (posInterior,),
text = 'Z',
label_foreground = 'Blue')
self.posZ['command'] = self.printCommand
@ -176,9 +175,9 @@ class Placer(Pmw.MegaToplevel):
hprGroup.pack(side='left',fill = 'both', expand = 1)
hprInterior = hprGroup.interior()
# Create the floaters
# Create the dials
self.hprH = self.createcomponent('hprH', (), None,
dial.Dial, (hprInterior,),
Dial.Dial, (hprInterior,),
text = 'H', fRollover = 0,
max = 360.0, numTicks = 12,
label_foreground = 'blue')
@ -186,7 +185,7 @@ class Placer(Pmw.MegaToplevel):
self.hprH.pack(expand=1,fill='x')
self.hprP = self.createcomponent('hprP', (), None,
dial.Dial, (hprInterior,),
Dial.Dial, (hprInterior,),
text = 'P', fRollover = 0,
max = 360.0, numTicks = 12,
label_foreground = 'red')
@ -194,7 +193,7 @@ class Placer(Pmw.MegaToplevel):
self.hprP.pack(expand=1,fill='x')
self.hprR = self.createcomponent('hprR', (), None,
dial.Dial, (hprInterior,),
Dial.Dial, (hprInterior,),
text = 'R', fRollover = 0,
max = 360.0, numTicks = 12,
label_foreground = '#00A000')
@ -234,9 +233,9 @@ class Placer(Pmw.MegaToplevel):
scaleGroup.pack(side='left',fill = 'both', expand = 1)
scaleInterior = scaleGroup.interior()
# Create the floaters
# Create the dials
self.scaleX = self.createcomponent('scaleX', (), None,
dial.Dial, (scaleInterior,),
Dial.Dial, (scaleInterior,),
text = 'X Scale',
initialValue = 1.0,
label_foreground = 'Red')
@ -244,7 +243,7 @@ class Placer(Pmw.MegaToplevel):
self.scaleX.pack(expand=1,fill='x')
self.scaleY = self.createcomponent('scaleY', (), None,
dial.Dial, (scaleInterior,),
Dial.Dial, (scaleInterior,),
text = 'Y Scale',
initialValue = 1.0,
label_foreground = '#00A000')
@ -252,7 +251,7 @@ class Placer(Pmw.MegaToplevel):
self.scaleY.pack(expand=1,fill='x')
self.scaleZ = self.createcomponent('scaleZ', (), None,
dial.Dial, (scaleInterior,),
Dial.Dial, (scaleInterior,),
text = 'Z Scale',
initialValue = 1.0,
label_foreground = 'Blue')
@ -260,7 +259,7 @@ class Placer(Pmw.MegaToplevel):
self.scaleZ.pack(expand=1,fill='x')
# Make sure appropriate labels are showing
self._updateFloaterLabels('Drive')
self._updateDialLabels('Drive')
# Make sure input variables processed
self.initialiseoptions(Placer)
@ -344,7 +343,7 @@ class Placer(Pmw.MegaToplevel):
self._resetHpr()
self._resetScale()
def _updateFloaterLabels(self, movementMode):
def _updateDialLabels(self, movementMode):
namePrefix = ''
self.movementMode = movementMode
if (movementMode == 'Drive'):

View File

@ -1,6 +1,6 @@
from Tkinter import *
import Pmw
import floater
import Floater
import string
import tkColorChooser
@ -86,7 +86,7 @@ class VectorEntry(Pmw.MegaWidget):
'floaterGroup',
(('fGroup', 'floaterGroup'),
('Floater', 'floaterGroup_Floater'),), None,
floater.FloaterGroup, (self.interior(),),
Floater.FloaterGroup, (self.interior(),),
dim = self['dim'], title = self['text'],
command = self.set)
# Note: This means the 'X' on the menu bar doesn't really destroy