Whether there is a way to refresh/update the Modifiers stack using C#


When I change the state of a Splineshape, but it has the some modifier on it,I tried using :


But it didn’t work,The state of node in the scene is not refreshed/updated.001
There’s one way I haven’t tried, because I don’t understand.

nod.NotifyDependents(g.Interval.Create(-1, -1),
(UIntPtr)0, RefMessage.Change, (SClass_ID)0xfffffff0, true, null,
Dear experts, are you updating the stack in the command panel.


it isn’t clear what you change and what you expect to happen in modifier stack


Let’s say I move some knots in the Splineshape using my plugin

,In the scene, the Splineshape with the some modifier does not appear to respond immediately.


given that you do something to baseobject you could try FindBaseObject and BaseObject::ForceNotify combination


In other words, running the plugin already gives me what I want,But it should be showed in the viewport.When I clicked on the stack to see, it did succeed



it seems to be wrong!


Don’t you have to pass IInterval instead of a null value?


This warning indicates that we cannot force the conversion.


Did you try node.ObjectRef.NotifyDependents( … already?
you’d better ask @Klvnk or somebody experienced in sdk


you are right,I used object’s IInterval instead of null,I succeeded!Thank you very much.


you’ve got to love the sdk doc

virtual void BaseObject::ForceNotify  (  Interval &  i   )  [inline, virtual] 
This method is no longer used. 
Reimplemented in Modifier.

00665         {NotifyDependents(i, PART_ALL,REFMSG_CHANGE);}

from at least 2010 :slight_smile:

in short it’s probably still inlined in the class so as Serejah says

NotifyDependents(iv, PART_ALL,REFMSG_CHANGE);

should do the job too (without the risk of it being depricated in max 3024 :face_with_raised_eyebrow: )