|
|
|
Tell us what you think of the site.
|
Autodesk Media & Entertainment User Community
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
|
Autodesk® Smoke on Mac®
|
| script controller not updating interactively
|
|
|
2 objects - A and B. Object A has script controller attached to Position.x that reads the position of object B. So that when object B moves, it affects objects A X position.
But this doesn’t happen in real time. When i move object B, object A remain still until i do something that triggers a bigger scene change - like move the time slider.
With expression is in real time - no problem. Any ideas?
|
|
|
|
The clue is that in the Expression Controller you have assigned a Controller to a variable but in the Script Controller you haven’t.
Create a variable, assign it in the same way as you did in the Expression Controller and use the variable within the script, then it will work.
Note. If you Assign Track it will work by simply referencing the variable, if you Assign Controller it won’t, because you’re assigning the controller itself, not the value resulting from that controller. In that case use variable_name.value (rather than just variable_name) within the script.
Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.
|
|
|
|
Thanks, it worked. I am practicing some rigging and as guide i use a Maya rigging book. And so far, with minor exceptions, both packages seem to be identical and everything is perfectly reproducible, although, some things in Maya are more transparent and predictable. Which was the case with this script controller.
The whole problem was about stretchy joints. In Maya they do it by modifying the Scale of the bones based on the distance of the ik handles. When this distance exceeds a determined max distance, the scale of the bone is calculated as “current distance / max distance”.
However, bones in max seem to inherit the scale of their parents. So one script controller in the root bone propagates his results to it’s children. Do you know a way to sever this link or i need to set additional scale controllers in each bone, that will counteract the scale of their parents?
|
|
|
|
In a script? Nope - no idea.
One thing I do know is that to alter a bone length you must use the Bone Tools to do it, otherwise you get all the well known problems of scaling objects at the object level. Problem is, bones don’t have sub-object levels like ordinary mesh or poly objects, so the usual “scale at the sub-object level” advice is not applicable to bones.
You can “disconnect” the scale inheritance from the Hierarchy Panel > Link Info options, but you need to do that before scaling the bone above it - doing so afterwards (trying to correct an existing problem) won’t (or at least may not) work as you might expect it to.
Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.
|
|
|
|
|
|