Skip to content

MHX_operators

Thomas Larsson edited this page Apr 3, 2026 · 1 revision

OPERATORS IN bpy.ops.mhx

bpy.ops.mhx.clear_animation(startFrame = 1, endFrame = 250, clearLeftArmFK = False, clearRightArmFK = False, clearLeftArmIK = False, clearRightArmIK = False, clearLeftLegFK = False, clearRightLegFK = False, clearLeftLegIK = False, clearRightLegIK = False, clearSpineFK = False, clearSpineIK = False, useEntireAnimation = True)

Clear Animation For FK or IK Bones

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • startFrame (int) - Starting frame for the animation
  • endFrame (int) - Last frame for the animation
  • clearLeftArmFK (boolean) - Clear Left Arm FK animation
  • clearRightArmFK (boolean) - Clear Right Arm FK animation
  • clearLeftArmIK (boolean) - Clear Left Arm IK animation
  • clearRightArmIK (boolean) - Clear Right Arm IK animation
  • clearLeftLegFK (boolean) - Clear Left Leg FK animation
  • clearRightLegFK (boolean) - Clear Right Leg FK animation
  • clearLeftLegIK (boolean) - Clear Left Leg IK animation
  • clearRightLegIK (boolean) - Clear Right Leg IK animation
  • clearSpineFK (boolean) - Clear Spine FK animation
  • clearSpineIK (boolean) - Clear Spine IK animation
  • useEntireAnimation (boolean) - Remove entire animation rather than a frame range

bpy.ops.mhx.clear_face()

Clear pose for face bones


bpy.ops.mhx.clear_feet()

Clear pose for feet and toes


bpy.ops.mhx.clear_fingers()

Clear pose for fingers


bpy.ops.mhx.clear_ik_twist_bones()

Clear IK twist bones


bpy.ops.mhx.clear_tongue()

Clear pose for tongue


bpy.ops.mhx.constrain_feet()

Add aggressive constraints to the feet


bpy.ops.mhx.convert_mhx_actions(direction = 'MODERN')

Convert actions between legacy MHX (root/hips) and modern MHX (hip/pelvis)

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • direction (enum in ['MODERN', 'LEGACY']) - Direction

bpy.ops.mhx.disable_all_layers()

(undocumented operator)


bpy.ops.mhx.enable_all_layers()

(undocumented operator)


bpy.ops.mhx.enforce_all_limits(startFrame = 1, endFrame = 250)

Keep all channels within limits for active action

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • startFrame (int) - Starting frame for the animation
  • endFrame (int) - Last frame for the animation

bpy.ops.mhx.enforce_limits()

Keep all channels within limits


bpy.ops.mhx.error()

(undocumented operator)


bpy.ops.mhx.floor_fk_feet(startFrame = 1, endFrame = 250, useLeft = True, useRight = True, useHips = True, useMarkers = True)

Keep FK Feet Above Zero Plane

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • startFrame (int) - Starting frame for the animation
  • endFrame (int) - Last frame for the animation
  • useLeft (boolean) - Keep left foot above floor
  • useRight (boolean) - Keep right foot above floor
  • useHips (boolean) - Also adjust character COM when keeping feet above floor
  • useMarkers (boolean) - Use markers to determine foot location

bpy.ops.mhx.floor_ik_feet(startFrame = 1, endFrame = 250, useLeft = True, useRight = True, useHips = True, useMarkers = True, useGlue = True, easeInOut = 3)

Keep IK Feet Above Zero Plane

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • startFrame (int) - Starting frame for the animation
  • endFrame (int) - Last frame for the animation
  • useLeft (boolean) - Keep left foot above floor
  • useRight (boolean) - Keep right foot above floor
  • useHips (boolean) - Also adjust character COM when keeping feet above floor
  • useMarkers (boolean) - Use markers to determine foot location
  • useGlue (boolean) - Remove movement of IK effector on shifted frames
  • easeInOut (int) - Ease In/Out

bpy.ops.mhx.limbs_bend_positive(useElbows = True, useKnees = True, useBendPositive = True, startFrame = 1, endFrame = 250)

Ensure that limbs' X rotation is positive.

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • useElbows (boolean) - Keep elbow bending positive
  • useKnees (boolean) - Keep knee bending positive
  • useBendPositive (boolean) - Ensure that elbow and knee bending is positive
  • startFrame (int) - Starting frame for the animation
  • endFrame (int) - Last frame for the animation

bpy.ops.mhx.message()

(undocumented operator)


bpy.ops.mhx.remove_unused_fcurves()

Remove unused f-curves


bpy.ops.mhx.set_fk_all()

Set all limbs to FK


bpy.ops.mhx.set_ik_all()

Set all limbs to IK


bpy.ops.mhx.shift_animation(startFrame = 1, endFrame = 250)

Shift the animation globally for selected boens

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • startFrame (int) - Starting frame for the animation
  • endFrame (int) - Last frame for the animation

bpy.ops.mhx.snap_fingers(suffix = "")

Snap finger links

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • suffix (string) - suffix

bpy.ops.mhx.snap_fk_all()

Snap all FK limbs to the pose of IK limbs


bpy.ops.mhx.snap_fk_left_arm()

Snap the left FK arm to the pose of the left IK arm


bpy.ops.mhx.snap_fk_left_leg()

Snap the left FK leg to the pose of the left IK leg


bpy.ops.mhx.snap_fk_right_arm()

Snap the right FK arm to the pose of the right IK arm


bpy.ops.mhx.snap_fk_right_leg()

Snap the right FK leg to the pose of the right IK leg


bpy.ops.mhx.snap_ik_all(useRotation = True)

Snap all IK limbs to the pose of FK limbs

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • useRotation (boolean) - Also match IK effector rotation. Suitable for hand animation

bpy.ops.mhx.snap_ik_left_arm()

Snap the left IK arm to the pose of the left FK arm


bpy.ops.mhx.snap_ik_left_leg(useRotation = True)

Snap the left IK leg to the pose of the left FK leg

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • useRotation (boolean) - Also match IK effector rotation. Suitable for hand animation

bpy.ops.mhx.snap_ik_right_arm()

Snap the right IK arm to the pose of the right FK arm


bpy.ops.mhx.snap_ik_right_leg(useRotation = True)

Snap the right IK leg to the pose of the right FK leg

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • useRotation (boolean) - Also match IK effector rotation. Suitable for hand animation

bpy.ops.mhx.snap_reverse(prop = "", value = 0.000, bonename = "", revname = "", fk = "", ik = "")

Snap bone to reversed bone

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • prop (string) - prop
  • value (float) - value
  • bonename (string) - bonename
  • revname (string) - revname
  • fk (string) - fk
  • ik (string) - ik

bpy.ops.mhx.snap_shaft()

Snap the shaft links and clear the shaft bone


bpy.ops.mhx.snap_spine()

Snap the spine bones and clear the back bone


bpy.ops.mhx.snap_tongue()

Snap the tongue links and clear the tongue bone


bpy.ops.mhx.toggle_fkik_left_arm()

Toggle left arm FK - IK


bpy.ops.mhx.toggle_fkik_left_leg()

Toggle left leg FK - IK


bpy.ops.mhx.toggle_fkik_right_arm()

Toggle right arm FK - IK


bpy.ops.mhx.toggle_fkik_right_leg()

Toggle right leg FK - IK


bpy.ops.mhx.toggle_left_toe_tarsal()

Toggle left small toes parent (toe or tarsal bone)


bpy.ops.mhx.toggle_limits()

Toggle limit constraints (location, rotation, scale)


bpy.ops.mhx.toggle_right_toe_tarsal()

Toggle right small toes parent (toe or tarsal bone)


bpy.ops.mhx.transfer_to_fk(useElbows = True, useKnees = True, useBendPositive = True, startFrame = 1, endFrame = 250, useRotation = True, useLeftArm = False, useRightArm = False, useLeftLeg = True, useRightLeg = True, useSpine = False)

Transfer IK animation to FK bones

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • useElbows (boolean) - Keep elbow bending positive
  • useKnees (boolean) - Keep knee bending positive
  • useBendPositive (boolean) - Ensure that elbow and knee bending is positive
  • startFrame (int) - Starting frame for the animation
  • endFrame (int) - Last frame for the animation
  • useRotation (boolean) - Also match IK effector rotation. Suitable for hand animation
  • useLeftArm (boolean) - Include left arm in FK/IK snapping
  • useRightArm (boolean) - Include right arm in FK/IK snapping
  • useLeftLeg (boolean) - Include left arm in FK/IK snapping
  • useRightLeg (boolean) - Include right arm in FK/IK snapping
  • useSpine (boolean) - Include spine in FK/IK snapping

bpy.ops.mhx.transfer_to_ik(startFrame = 1, endFrame = 250, useRotation = True, useLeftArm = False, useRightArm = False, useLeftLeg = True, useRightLeg = True, useSpine = False, useApproximate = True)

Transfer FK animation to IK bones

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • startFrame (int) - Starting frame for the animation
  • endFrame (int) - Last frame for the animation
  • useRotation (boolean) - Also match IK effector rotation. Suitable for hand animation
  • useLeftArm (boolean) - Include left arm in FK/IK snapping
  • useRightArm (boolean) - Include right arm in FK/IK snapping
  • useLeftLeg (boolean) - Include left arm in FK/IK snapping
  • useRightLeg (boolean) - Include right arm in FK/IK snapping
  • useSpine (boolean) - Include spine in FK/IK snapping
  • useApproximate (boolean) - Approximate snapping which does not involve the IK twist bones

bpy.ops.mhx.transfer_to_links(startFrame = 1, endFrame = 250, useSpine = True, useFingers = False, useTongue = False)

Transfer animation to link bones

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • startFrame (int) - Starting frame for the animation
  • endFrame (int) - Last frame for the animation
  • useSpine (boolean) - Include spine in snapping
  • useFingers (boolean) - Include fingers in snapping
  • useTongue (boolean) - Include tongue in snapping

bpy.ops.mhx.unhinge(limb = "", suffix = "")

Remove hinges

** Parameters: **

Use import_daz.setSelection(list_of_False) to specify input False.

  • limb (string) - limb
  • suffix (string) - suffix

bpy.ops.mhx.update_elbow_knee_parents()

Update parents of the elbow and knee pole targets


bpy.ops.mhx.update_mhx()

(undocumented operator)


bpy.ops.mhx.update_mhx_animation()

Update MHX animation


bpy.ops.mhx.update_mhx_blender4()

(undocumented operator)


Clone this wiki locally