Jump to content

Create Pose problem


Anton

Recommended Posts

Hi! As you know to create chop pose from current selected controls you must choose in Motion Effects menu Create Pose and if parms are scoped everything works fine.

But when I call this script from digital asset houdini gives me an error:

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "opdef:/Object/facial_animation_rig?PythonModule", line 4, in addPose

KeyError: ('parms',)

Button in digital asset by this code...

hou.pwd().hdaModule().addPose()

...call this function:

def addPose():

import choptoolutils

parms = kwargs['parms']

choptoolutils.createPose(parms)

What I'm doing wrong?

Link to comment
Share on other sites

When the menu calls it, the UI sets up kwargs['parm'] for the script, which is a list of hou.Parm objects. If you call it yourself, then you shouldn't use kwargs['parms'], but pass choptoolutils.createPose(myparms) where myparms is the list of parms that you want to create the pose for yourself.

Link to comment
Share on other sites

Thxs, edward! It's true but I'd like to create pose from selected controls in viewport by clicking button in asset. And the problem i can't understand is how Motion Effects Create Pose Tool takes only scoped parms from selected controls(nodes). I will try to use isAutoscoped() and isLocked() functions to solve it.

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...