mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
Fixes to extend direct UNDO to integrate better with cog factory editor
This commit is contained in:
parent
21b131f9ba
commit
b046d7db97
@ -748,7 +748,7 @@ class DirectSession(PandaObject):
|
|||||||
# Undo xform
|
# Undo xform
|
||||||
pose[0].setTransform(pose[1])
|
pose[0].setTransform(pose[1])
|
||||||
# Alert anyone who cares
|
# Alert anyone who cares
|
||||||
messenger.send('DIRECT_undo')
|
messenger.send('DIRECT_undo', [nodePathList])
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
if self.redoList:
|
if self.redoList:
|
||||||
@ -761,7 +761,7 @@ class DirectSession(PandaObject):
|
|||||||
for pose in redoGroup:
|
for pose in redoGroup:
|
||||||
pose[0].setTransform(pose[1])
|
pose[0].setTransform(pose[1])
|
||||||
# Alert anyone who cares
|
# Alert anyone who cares
|
||||||
messenger.send('DIRECT_redo')
|
messenger.send('DIRECT_redo', [nodePathList])
|
||||||
|
|
||||||
# UTILITY FUNCTIONS
|
# UTILITY FUNCTIONS
|
||||||
def message(self, text):
|
def message(self, text):
|
||||||
|
@ -974,7 +974,7 @@ class DirectSessionPanel(AppShell):
|
|||||||
def pushUndo(self, fResetRedo = 1):
|
def pushUndo(self, fResetRedo = 1):
|
||||||
direct.pushUndo([self['nodePath']])
|
direct.pushUndo([self['nodePath']])
|
||||||
|
|
||||||
def undoHook(self):
|
def undoHook(self, nodePathList = []):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def pushUndoHook(self):
|
def pushUndoHook(self):
|
||||||
@ -988,7 +988,7 @@ class DirectSessionPanel(AppShell):
|
|||||||
def pushRedo(self):
|
def pushRedo(self):
|
||||||
direct.pushRedo([self['nodePath']])
|
direct.pushRedo([self['nodePath']])
|
||||||
|
|
||||||
def redoHook(self):
|
def redoHook(self, nodePathList = []):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def pushRedoHook(self):
|
def pushRedoHook(self):
|
||||||
|
@ -626,7 +626,7 @@ class MopathRecorder(AppShell, PandaObject):
|
|||||||
def pushUndo(self, fResetRedo = 1):
|
def pushUndo(self, fResetRedo = 1):
|
||||||
direct.pushUndo([self.nodePath])
|
direct.pushUndo([self.nodePath])
|
||||||
|
|
||||||
def undoHook(self):
|
def undoHook(self, nodePathList = []):
|
||||||
# Reflect new changes
|
# Reflect new changes
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -641,7 +641,7 @@ class MopathRecorder(AppShell, PandaObject):
|
|||||||
def pushRedo(self):
|
def pushRedo(self):
|
||||||
direct.pushRedo([self.nodePath])
|
direct.pushRedo([self.nodePath])
|
||||||
|
|
||||||
def redoHook(self):
|
def redoHook(self, nodePathList = []):
|
||||||
# Reflect new changes
|
# Reflect new changes
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -715,7 +715,7 @@ class Placer(AppShell):
|
|||||||
def pushUndo(self, fResetRedo = 1):
|
def pushUndo(self, fResetRedo = 1):
|
||||||
direct.pushUndo([self['nodePath']])
|
direct.pushUndo([self['nodePath']])
|
||||||
|
|
||||||
def undoHook(self):
|
def undoHook(self, nodePathList = []):
|
||||||
# Reflect new changes
|
# Reflect new changes
|
||||||
self.updatePlacer()
|
self.updatePlacer()
|
||||||
|
|
||||||
@ -730,7 +730,7 @@ class Placer(AppShell):
|
|||||||
def pushRedo(self):
|
def pushRedo(self):
|
||||||
direct.pushRedo([self['nodePath']])
|
direct.pushRedo([self['nodePath']])
|
||||||
|
|
||||||
def redoHook(self):
|
def redoHook(self, nodePathList = []):
|
||||||
# Reflect new changes
|
# Reflect new changes
|
||||||
self.updatePlacer()
|
self.updatePlacer()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user