Notifications
Clear all

[Closed] Setting Rotational Joint Limits on non-IK-Obj

Hey there!

Does anyone know if it is possible to set the rotational joint limits (those in the Hierachy-IK-Tab) via script when there is no IK-Chain applied to the object?

If i assign an ik-chain to it, i can access them with ‘theNode.controller.rotXLLimit’, but i do not want to put an ik-chain on each object just to be able to set the limits, which even is impossible if i want to set limits just for one object.

(just for info, the limits are needed for an exporter, not inside of max)

thanks for help!

andre

5 Replies

If you’re using Max 8, you can make use of the new Limit Controller. Otherwise, I’ve never found a good way to do this. But if it’s mainly for use on export, could you just add the limits to a user property or custom attribute and get the exporter to read the information it needs from there?

Hmm, it’s a 3rd party exporter, so I’m not sure if they can change this quickly enough, but I’ll talk to them tomorrow. this surely would be the best solution I guess.
I did a workaround now with temporary IK-chains that are applied whenever I change a limit within the script, but it feels like a bad hack…

I haven’t tried this myself, but it might help: http://www.sitesled.com/members/marktsang/

Look in the Tutorials section.

how about this: a custom attribute or user defined property per object that stores the limits, plus a script that runs over the animation and adjusts the rotations per frame whenever they are out of range. using a script you can do this with quat values, so it will be accurate. no need to change the exporter this way

with max8 you could also use the limit controller, which may be cool because whenever something gets clamped, it automatically blends into the clamped value for some frames… but it only works with float controllers so you may get weird results for rotations. it may work though… after this you could bake the animation so the exporter doesn’t explode

Thanks for all the information, although it didn’t help me on this problem, it was pretty interesting

As mentioned above, I do not need the limits in max, they are just needed for the exporter. The problem is that the exporter reads out its information from the values stored in the ‘Rotational Joint Limits’ properties, which seem not to be accessible through maxscript when there is no actual ik chain applied to the object.

I wanted to do a little script so that I can quickly copy the limits from one skeleton to another, or inc/decrease all limits about n degrees and such stuff…