[Closed] 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 :
ForceCompleteRedraw(true)
But it didn’t work,The state of node in the scene is not refreshed/updated.
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,
NotifyDependentsOption.AllowOptimizations);
Dear experts, are you updating the stack in the command panel.
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
((IBaseObject)node.ObjectRef.FindBaseObject()).ForceNotify(null);
it seems to be wrong!
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]
Remarks:
This method is no longer used.
Reimplemented in Modifier.
00665 {NotifyDependents(i, PART_ALL,REFMSG_CHANGE);}
from at least 2010
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 )