[Closed] obj.controller = copy obj.controller
Why when I run $Sphere002.controller = copy $Sphere001.controller the object does not update until I try and move it?
Is there a way to update the object so I don’t have to move the object around.
sadly this corky snippet works but seems wrong.
$Sphere002.controller = copy $Sphere001.controller
move $ [0,0,0]
is it a prs controller that we are talking about?
as i see you assign a copy (not instance!) of sphere1’s transform controller to sphere2’s controller. this has to immediately update the transform. the viewport might be not redrawn for any reason, but the transform data has to be updated for sure.
I want a copy of the controller not a directly connected instance. Once you run the script it copies the controller over and you’ll notice in the timeline the keys were brought along as well but when you scrub the timeline or tumble around the viewport it will not update the object (meaning you will not see the sphere with the newly copied controller move around based on its animation) it just remains static. But if you try an move the object it will then snap into proper position and be animated…I don’t get it??
I tried this and it immediatly update
I’m using an old max 9
$Sphere02.transform.controller = copy $Sphere01.transform.controller
i confirm that max 2012 doesn’t immediately update the copied transform controller.
it’s a bug. as a workaround we can force the updating by calling notifydependents :
notifydependents $sphere02.controller partID:#tm
I’m glad it’s not just my max going haywire.
Thanks Denis for the snippet.