Notifications
Clear all

[Closed] Dose the script operate on the splineshape can not be UNDO??

hi gays~

Dose the script operate on the splineshape can not be UNDO??

such as

“subdivideSegment <splineShape> <spline_index> <seg_index> <divisions>”
“setKnotPoint “
“addNewSpline”
“…”
:banghead:

the “Undo on” is not work~ is this it ??? how to undo with the splineshape??~ :curious:

2 Replies
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

some splineshape methods are not undoable. The work around is to convert shape to shape and apply a method after:


 (
 	converttosplineshape <shape>
 	setKnotPoint <shape> 1 1 [0,0,0]
 	updateshape <shape>
 )
 

I think there’s a lot of maxscript spline stuff that doesn’t register with undo. There’s a quick workaround though.

Make a copy of the unmodified spline and do all your changes on that one.

Then when you’re done, use instanceReplace to replace the old spline with the new modified one and the instanceReplace becomes the undo.


  
    standin  = copy obj
  
    --  do stuff to standin
  
    instanceReplace  obj standin
  
    delete  standin