Jump to content
Sign in to follow this  
Dejo1974

Triple chain ik/fk switch/match - storing rotations as vectors.

Recommended Posts

Hello Maya user here, I'm trying to recreate triple chain ik/fk switch/match with appropriate script for matching rotations, after some digging trough documentation I did found hou.vector3 but I cannot understand how to apply it, in Maya's MEL you would do something like this:

vector $NameOfTheVariable =`xform -query -rotation “NameOfTheObjectInScene”`
__^____________^______________^______^_______^________________^_____________
__|____________ | ______________|______ | _______ | ______________  |_______________________________
Variable—–Name———-Command–Flag—-Flag—Name of the object in scene i.e. Joint—–
type

What is the equivalent syntax for this in Python in Houdini? I need rotations as vectors (in world space) so I could perform math operations on them and get/set their values… is there an equivalent of the xform command in Houdini?

Share this post


Link to post
Share on other sites

Well  I have found these pages http://www.warshaw.co.uk/links/pythonh.html

It gets me a little bit closer i.e. this syntax is as close as it can be    parameter =  hou.node('/path/to/node').parm('name of parm').eval()   now the question is where vector3 fits in?

Is it like this?

parameter=vector3(hou.node ('/path/to/node').parm('name of parm').eval())?

Instead of 'name of the parm' should be 'RX, RY, RZ' and I think I have also saw some .WorldSpace property/attribute somewhere on the Internet but I don't remember where...

Unfortunately I cannot test it because my old apprentice license for houdini 13 has long time expired... and my sh...y graphic card cannot push the 16.5... ahhh well thanks for replying anyway... 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×