Deleted Node
Stretch65
Posts: 166
Hi,
Say I have a variable, X, which contains a reference to a node in the scene. If I delete the node from the scene, X still points to that non-existent node.
The variable X still returns some correct information like X.getLabel(), but if I call, for example, X.select(true) then obviously I get an error because I can't select the node anymore.
So how can I tell if X is pointing to a deleted node?
Comments
use node.isInScene() http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/node_dz#a_1acfa36af31b83a6009a4efba0e7dc56e5 This is needed because the deleted node mays till exist, on the Undo stack, but will not behave in the same way as a node in the scene - threw me the first time I met it.