Notifications
Clear all
[Closed] Getting node/object from modifier
Jul 15, 2009 11:33 am
Hello!
if you have a modifier instance (in this case a scripted attribute) in a variable, is there any way of getting which object/node the instance comes from? Refs.dependents will give info pertaining to the instance but not the object/node. I guess the correct way would be to store the node as a weak reference on the attribute, but i wondered if there was a more ‘global’ method for this. thanks.
6 Replies
Jul 15, 2009 11:33 am
hi paul
I’m getting the attributeholder when i do that, do I need to do something else to get the object? (Assume when I call getowner, the object is no longer selected)
modinst = $.modifiers[1].posebot
PoseBot:PoseBot
classof modinst
<AttributeDef:PoseBot>
custAttributes.getOwner modinst
EmptyModifier:PoseBot
Jul 15, 2009 11:33 am
Ah yes.
refs.dependentNodes (custAttributes.getOwner theDef)
That should do it.