Being notified when an object returns to the scene via undo
pciccone
Posts: 661
Hi.
In developing the next version of Reality I monitor object addition to the scene and that works fine.
When the user deletes an object and then selects Undo Studio, does not notify my plugin of that addition. Is there a way of receiving notification of that event?
Thank you.
Comments
What signal are you looking for?
- DzScene::nodeAdded does fire when undoing a delete.
I'm looking for directions on how should I handle this. If an object is added back to a scene because the user presses Undo Reality needs to be notified so that it can re-add the object to its database.
Thanks in advance.
Best to confirm,
1) The DzScene:nodeAdded signal is not happening
2) OR you need to know more information when DzScene:nodeAdded happens, (that is was caused by an undo)?
I'm not sure how to interpret this.
When an object is deleted from the scene Reality gets the notification and removes the object from its database. If the user presses Cmd/Ctrl-Z immediately after then Studio adds the object to the scene but does not signal Reality.
Hope this helps.
Yes it does help. Under all circumstances I have tested, DzScene::nodeAdded is happening when caused by an Undo of delete.
Maybe to help track it down, connect to nodeListChanged() and see if you are getting that on undo.
I will, thanks