How can I get a reference to the object my scripted modifier is applied to?
I know there is the
on attachedTo nodeVar do (...)
event handler, but when I try to store nodeVar as a #node parameter, it crashes with a DependencyLoop warning.
Any ideas?
Cheers
By
Comments (3)
Comment policy
Awesome that works, thanks! Still wondering why there is nothing like 'this' or 'delegate' that refers to the object the modifier is applied to and we have to do this kind of hack.
I asked same question when I tryed to write my first scripted plugin but till this day I not know the answer :)
Are you tried something like this
plugin someModifier name:"someModifier"
(
local theNode
parameters main rollout:params
(
-- ... parametersBlock
)
rollout params "Something"
(
-- ... rollout controls
)
on params open do theNode = (refs.dependentNodes this)[1]
)