mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Various fixes for cog hq editor
changed manipulateObjectCleanup event to include list of affected node paths
This commit is contained in:
parent
eb4a25ba12
commit
e7f567692f
@ -115,7 +115,8 @@ class DirectManipulationControl(PandaObject):
|
||||
self.objectHandles.hideGuides()
|
||||
# Restart followSelectedNodePath task
|
||||
self.spawnFollowSelectedNodePathTask()
|
||||
messenger.send('DIRECT_manipulateObjectCleanup')
|
||||
messenger.send('DIRECT_manipulateObjectCleanup',
|
||||
[direct.selected.getSelectedAsList()])
|
||||
|
||||
def spawnFollowSelectedNodePathTask(self):
|
||||
# If nothing selected, just return
|
||||
@ -498,7 +499,8 @@ class DirectManipulationControl(PandaObject):
|
||||
# Move the objects with the widget
|
||||
direct.selected.moveWrtWidgetAll()
|
||||
# Let everyone know that something was moved
|
||||
messenger.send('DIRECT_manipulateObjectCleanup')
|
||||
messenger.send('DIRECT_manipulateObjectCleanup',
|
||||
[direct.selected.getSelectedAsList()])
|
||||
|
||||
class ObjectHandles(NodePath,PandaObject):
|
||||
def __init__(self):
|
||||
|
@ -203,10 +203,12 @@ class LevelSpec:
|
||||
|
||||
def saveToDisk(self, filename=None, makeBackup=1):
|
||||
"""returns zero on failure"""
|
||||
print 'saveToDisk', filename
|
||||
if filename is None:
|
||||
filename = self.filename
|
||||
|
||||
if makeBackup and self.privFileExists(filename):
|
||||
print 'HERE'
|
||||
# create a backup
|
||||
try:
|
||||
backupFilename = self.privGetBackupFilename()
|
||||
|
@ -1184,11 +1184,11 @@ class LevelEditor(NodePath, PandaObject):
|
||||
# If it exists, set the name of the DNA Node
|
||||
dnaNode.setName(newName)
|
||||
|
||||
def updateSelectedPose(self):
|
||||
def updateSelectedPose(self, nodePathList):
|
||||
"""
|
||||
Update the DNA database to reflect selected objects current positions
|
||||
"""
|
||||
for selectedNode in direct.selected:
|
||||
for selectedNode in nodePathList:
|
||||
# Is this a DNA Object in the DNASTORE database?
|
||||
dnaObject = self.findDNANode(selectedNode)
|
||||
if dnaObject:
|
||||
|
@ -748,7 +748,7 @@ class MopathRecorder(AppShell, PandaObject):
|
||||
elif direct.selected.last.id() == self.tangentMarker.id():
|
||||
self.manipulandumId = self.tangentMarker.id()
|
||||
|
||||
def manipulateObjectCleanupHook(self):
|
||||
def manipulateObjectCleanupHook(self, nodePathList = []):
|
||||
# Clear flag
|
||||
self.manipulandumId = None
|
||||
|
||||
|
@ -567,7 +567,8 @@ class Placer(AppShell):
|
||||
|
||||
def xformStop(self, data):
|
||||
# Throw event to signal manipulation done
|
||||
messenger.send('DIRECT_manipulateObjectCleanup')
|
||||
# Send nodepath as a list
|
||||
messenger.send('DIRECT_manipulateObjectCleanup', [[self['nodePath']]])
|
||||
# Update placer to reflect new state
|
||||
self.updatePlacer()
|
||||
# If moving widget restart follow task
|
||||
|
Loading…
x
Reference in New Issue
Block a user