Notifications
Clear all

[Closed] Getting undo labels

Is there anyway to access the label for the last undo entry (or any for that matter)?

5 Replies
 JHN

Like you want to create a label with your maxscript undo statement, or you want to undo by maxscript to a certain label?

-Johan

I want to query the last undo string

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

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: %\
\" (LastUndoLabel = callbacks.notificationParam())" id:#undoCheck  
 	disableRefMsgs()
 	max undo
 	max redo
 	enableRefMsgs()
 	callbacks.removescripts id:#undoCheck
 )
 

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…

 lo1

wow that is some hack! Thanks, I was looking for something similar.