Notifications
Clear all

[Closed] How to get "parent" object from a rollout in an attribute holder?

 CMM

I’m trying to reference the object that is holding an attribute holder which has a rollout inside of it. Basically in my rollout I have a spinner and on the spinner changed event handler I need to call 2 objects (not by name). One object is a line (which I am snapping the parent object’s position to) and the other is the object itself. How can I call the object that is holding the rollout inside this event handler?

4 Replies
1 Reply
(@denist)
Joined: 10 months ago

Posts: 0

do you want to know an owner of the attribute? use

custAttributes.getOwner this

There is a way of getting the referring object using “somefunction this” in a event handler. I cannot remember the function at this point. I used it a while back for a script which I may be able to track down if you need.

However, since you want to get the object that has an attribute that you are adjusting a spinner value for a easy way to do this is just reference the selected object $. If you are changing the spinner value via the UI then the object must be selected so this will work just fine. As for the spline I would just add a node parameter with a pick button to hold the spline object then you can just refer to that when needed.

1 Reply
(@denist)
Joined: 10 months ago

Posts: 0

not exactly… the modifier stack might be pinned.

I think this may give you some ideas.