Notifications
                
            
                Clear all
    
            
        [Closed] Getting undo labels
Jun 16, 2010 10:28 am
                      Is there anyway to access the label for the last undo entry (or any for that matter)?
                             5 Replies                        
                    Jun 16, 2010 10:28 am
                      Like you want to create a label with your maxscript undo statement, or you want to undo by maxscript to a certain label?
-Johan
                        
                        1 Reply
                    
                    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
 )
 
                Jun 16, 2010 10:28 am
                      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…