PDA

View Full Version : Getting undo labels


Rorschach
06-16-2010, 10:28 AM
Is there anyway to access the label for the last undo entry (or any for that matter)?

JHN
06-16-2010, 12:50 PM
Like you want to create a label with your maxscript undo statement, or you want to undo by maxscript to a certain label?

-Johan

Rorschach
06-16-2010, 01:12 PM
I want to query the last undo string

denisT
06-16-2010, 05:06 PM
I want to query the last undo string

unfortunately there is no easy way to get last undo label (or list of label). It's possible to do it with max SDK, but I don't know the way how to do it with MXS.
but there is some workaround:

with redraw off
(
global LastUndoLabel
callbacks.addscript #sceneUndo "format \"Undo Label: %\\n\" (LastUndoLabel = callbacks.notificationParam())" id:#undoCheck
disableRefMsgs()
max undo
max redo
enableRefMsgs()
callbacks.removescripts id:#undoCheck
)

Rorschach
06-16-2010, 06:07 PM
Thanks, your code gives me another idea for what I want to do.

Incedently, what do disableRefMsgs()enableRefMsgs() actually do? The help file isn't very helpful about this...

lo
06-16-2010, 06:08 PM
wow that is some hack! :cool: Thanks, I was looking for something similar.

CGTalk Moderation
06-16-2010, 06:08 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.