Jump to content

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?

Link to comment
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... 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...