Best way to determine if DzNode is a Null object?
Greetings,
I've tried searching a bit, looking at the old DS3 docs that Richard has linked in other threads, etc, as well as using the Script IDE to inspect objects during execution and even looking at how DzNodes are written out to .duf files. There doesn't seem to be an obvious way to determine if a node is a Null object or not. className() returns just DzNode. Asset ID will contain 'Null', but could be changed (not through the UI by default, but it looks like scripts can change asset IDs). Label appears to be the name the user can edit in the scene list, so definitely not safe to check since they could change it to anything. In the .duf file, the node has the type "node".
Any suggestions on how to accurately identify null nodes via DAZ Script?
Thanks
Comments
Try seeing if it has geometry - node.getObject(). I think and DzNode without geometry is a null - there are other things that lack geometry, butt hey should have different object types.
Correct. There are DzNode subclasses that also do not have a DzObject, but a [proper] DzNode with no DzObject is a "Null."
-Rob
Great, thanks for that. Especially your example, Rob.