[Closed] Undo/Redo for group actions weirdness
I’ve been looking at the undoing and redoing of group actions, in relation to my work on the Outliner script which some of you may be familiar with. Now there seems to be a lot of crazyness going on there!
-Undoing a setGroupMember action just doesn’t work. If you put the command in an undo block it doesn’t even register in the undo stack. (I know that there’s attachNodesToGroup and detachNodesFromGroup in max 2010, but I am targeting lower versions too).
-Undoing a group action done through the UI does not fire a “nodePreDelete” callback for the group node. Equally so for the redo, there’s no “sceneNodeAdded” callback happening.
-When using the sceneUndo and sceneRedo to capture the group actions being undone/redone the names for the undo/redo actions you get are most strange: “Key” for undoing a group action, “%d %s Selected” (seriously, wtf) for redo.
I’m really doing my nuts in trying to work around all madness, but it’s certainly not easy.
Any thoughts on this?
I’m using max2010 by the way.
Can you put some code please ?
create some spheres and a teapot
group $Sphere* name:"Sph"
SetGroupMember $Teapot01 true
append $Sph.children $Teapot01
do you have the same issue with the above code ?