Notifications
Clear all

[Closed] Getting node/object from modifier

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
 PEN

Are you looking for custAttributes.getOwner?

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
 PEN

Ah yes.

refs.dependentNodes (custAttributes.getOwner theDef)

That should do it.

that’s it! cheers Mr Neale! :applause:

 PEN

Was my dad here helping you as well?

heh heh! I heard he knows more about rigging than you