[Closed] [SDK] ResumeEditing() Can we guess the set of notifications?
I my tasks I pretty often meet a situation when I have to change a node’s BaseObject with Stack of modifiers. This action needs for sure to update all modifiers in the stack.
I usually send a NotifyDependents with propagate flag. Sometimes it works and enough.
But there are several modifiers that don’t update with this notification. I tried as I think everything, but only pair SuspendEditing/ResumeEditing does do the job for me.
My question is – could anyone guess for set of notifications and calls might be behind ResumeEditing method? I’m pretty sure that I don’t need a full set of them in my situations which need all modifiers in stack to be updated.
put your own modifier in the stack run it under the debugger or have it print to the listener what messages it receives when you call SuspendEditing/ResumeEditing from the NotifyRefChanged function.
there is no mesaages!
I expected it… the thing is – it can be a message from a dependent. But I have no idea how to catch it. It’s a something that forces Local data to update. It’s something very universal… like Save/Load maybe
then i imagine it probably calls a stack iterator which probably calls ->ModifyObject() for the resume function not sure what it would call on the suspend.
AFAICT
suspend calls ::EndEditParams on the modifier currently being edited and resume calls ::BeginEditParams (and only on the top of the stack)
Thanks for the confirmation! This is what I am playing with now … I’m looking at how safe it will be to force “begin editing” in general
I think that it sends Edit Params not to the top object on the stack, but to the Current Edit object.
EndEditParams and BeginEditParams are going with the same interface – GetCOREInterface(MAIN_MAX_INTERFACE)
it means something like a command to update a part related to UI (command panel)
I was fighting couple days trying reproduce the same functionality as Suspend and Resume Editing but finally failed.
the best I could do is to make Suspend and Resume Editing undoable. It works for me. Actually it was the main issue in my “editing logic”. Without including Suspend and Resume Editing in the undo/redo process some modifiers don’t update their Local Data, and all after that is going wrong.
I have unnecessary Command Panel redraw, but with disabled Command Panel redraw it doesn’t look too bad.
So… I’m leaving this issue for next time.