BVH Retargeter Operators



bpy.ops.mcp.clear_animation(useElbows = True, useKnees = True, useBendPositive = True, useAutoTarget = True, useArms = False, useLegs = True, type = "")

  Clear Animation For FK or IK Bones

Parameters:
  •   useElbows (boolean) - Keep elbow bending positive
  •   useKnees (boolean) - Keep knee bending positive
  •   useBendPositive (boolean) - Ensure that elbow and knee bending is positive
  •   useAutoTarget (boolean) - Find target rig automatically
  •   useArms (boolean) - Include arms in FK/IK snapping
  •   useLegs (boolean) - Include legs in FK/IK snapping
  •   type (string) - type


bpy.ops.mcp.clear_temp_props()

  Clear properties used by BVH Retargeter. Animation editing may fail after this.


bpy.ops.mcp.confirm_edit()

  Quit local editing and keep changes


bpy.ops.mcp.delete_action(filter = "", actions = None)

  Delete the action selected in the action list

Parameters:
  •   filter (string) - Filter action names with this
  •   actions (collection) - actions


bpy.ops.mcp.delete_all_actions()

  Delete all action


bpy.ops.mcp.delete_hash()

  Delete all actions whose name start with '#'. Such actions are created temporarily by BVH Retargeter. They should be deleted automatically but may be left over.


bpy.ops.mcp.error()

  (undocumented operator)


bpy.ops.mcp.fixate_bone(fixX = True, fixY = True, fixZ = True)

  Keep bone location fixed (local coordinates)

Parameters:
  •   fixX (boolean) - Fix Local X Location
  •   fixY (boolean) - Fix Local Y Location
  •   fixZ (boolean) - Fix Local Z Location


bpy.ops.mcp.floor_foot(useAutoTarget = True, useLeft = True, useRight = True, useHips = True)

  Keep Feet Above Plane

Parameters:
  •   useAutoTarget (boolean) - Find target rig automatically
  •   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


bpy.ops.mcp.identify_source_rig()

  Identify the source rig type of the active armature


bpy.ops.mcp.identify_target_rig()

  Identify the target rig type of the active armature.


bpy.ops.mcp.init_sources()

  (Re)load all json files in the source_rigs directory.


bpy.ops.mcp.init_targets()

  (Re)load all json files in the target_rigs directory.


bpy.ops.mcp.insert_key(loc = False, rot = False, delete = False)

  Insert or delete a key

Parameters:
  •   loc (boolean) - loc
  •   rot (boolean) - rot
  •   delete (boolean) - delete


bpy.ops.mcp.limbs_bend_positive(useElbows = True, useKnees = True, useBendPositive = True, useAutoTarget = True)

  Ensure that limbs' X rotation is positive.

Parameters:
  •   useElbows (boolean) - Keep elbow bending positive
  •   useKnees (boolean) - Keep knee bending positive
  •   useBendPositive (boolean) - Ensure that elbow and knee bending is positive
  •   useAutoTarget (boolean) - Find target rig automatically


bpy.ops.mcp.list_source_rig()

  List the bone associations of the active source rig


bpy.ops.mcp.list_target_rig()

  List the bone associations of the active target rig


bpy.ops.mcp.load_and_rename_bvh(filter_glob = "*.bvh", filepath = "", startFrame = 1, endFrame = 250, scale = 1.000, x = '90', y = '0', z = '0', ssFactor = 1, useDefaultSS = True, useAutoSource = True, useAutoTarget = True, useAutoScale = True, useTimeScale = False, factor = 1.000)

  Load armature from bvh file and rename bones

Parameters:
  •   filter_glob (string) - filter_glob
  •   filepath (string) - Filepath used for importing the BVH file
  •   startFrame (int) - Starting frame for the animation
  •   endFrame (int) - Last frame for the animation
  •   scale (float) - Scale the BVH by this value
  •   x (enum in ['0', '90', '180', '270']) - X Euler Angle
  •   y (enum in ['0', '90', '180', '270']) - Y Euler Angle
  •   z (enum in ['0', '90', '180', '270']) - Z Euler Angle
  •   ssFactor (int) - Sample only every n:th frame
  •   useDefaultSS (boolean) - Subsample based on difference in frame rates between BVH file and Blender
  •   useAutoSource (boolean) - Find source rig automatically
  •   useAutoTarget (boolean) - Find target rig automatically
  •   useAutoScale (boolean) - Rescale skeleton to match target
  •   useTimeScale (boolean) - Scale F-curves in time after loading
  •   factor (float) - Factor for rescaling time


bpy.ops.mcp.load_and_retarget(files = None, directory = "", filter_glob = "*.bvh", filepath = "", startFrame = 1, endFrame = 250, scale = 1.000, x = '90', y = '0', z = '0', ssFactor = 1, useDefaultSS = True, useAutoSource = True, useAutoTarget = True, useAutoScale = True, useTimeScale = False, factor = 1.000, useVisible = False, useSelected = False, useMarkers = False, useSimplify = False, maxErrLoc = 0.010, maxErrRot = 0.100, useElbows = True, useKnees = True, useBendPositive = True, useNLA = False)

  Load animation from bvh file to the active armature

Parameters:
  •   files (collection) - File Path
  •   directory (dir_path) - directory
  •   filter_glob (string) - filter_glob
  •   filepath (string) - Filepath used for importing the BVH file
  •   startFrame (int) - Starting frame for the animation
  •   endFrame (int) - Last frame for the animation
  •   scale (float) - Scale the BVH by this value
  •   x (enum in ['0', '90', '180', '270']) - X Euler Angle
  •   y (enum in ['0', '90', '180', '270']) - Y Euler Angle
  •   z (enum in ['0', '90', '180', '270']) - Z Euler Angle
  •   ssFactor (int) - Sample only every n:th frame
  •   useDefaultSS (boolean) - Subsample based on difference in frame rates between BVH file and Blender
  •   useAutoSource (boolean) - Find source rig automatically
  •   useAutoTarget (boolean) - Find target rig automatically
  •   useAutoScale (boolean) - Rescale skeleton to match target
  •   useTimeScale (boolean) - Scale F-curves in time after loading
  •   factor (float) - Factor for rescaling time
  •   useVisible (boolean) - Only visible F-curves
  •   useSelected (boolean) - Only F-curves for selected bones
  •   useMarkers (boolean) - Only between markers
  •   useSimplify (boolean) - Simplify F-curves
  •   maxErrLoc (float) - Max error for location FCurves when doing simplification
  •   maxErrRot (float) - Max error for rotation (degrees) FCurves when doing simplification
  •   useElbows (boolean) - Keep elbow bending positive
  •   useKnees (boolean) - Keep knee bending positive
  •   useBendPositive (boolean) - Ensure that elbow and knee bending is positive
  •   useNLA (boolean) - Create a NLA strip for each loaded action


bpy.ops.mcp.load_bvh(files = None, directory = "", filter_glob = "*.bvh", filepath = "", startFrame = 1, endFrame = 250, scale = 1.000, x = '90', y = '0', z = '0', ssFactor = 1, useDefaultSS = True)

  Load an armature from a bvh file

Parameters:
  •   files (collection) - File Path
  •   directory (dir_path) - directory
  •   filter_glob (string) - filter_glob
  •   filepath (string) - Filepath used for importing the BVH file
  •   startFrame (int) - Starting frame for the animation
  •   endFrame (int) - Last frame for the animation
  •   scale (float) - Scale the BVH by this value
  •   x (enum in ['0', '90', '180', '270']) - X Euler Angle
  •   y (enum in ['0', '90', '180', '270']) - Y Euler Angle
  •   z (enum in ['0', '90', '180', '270']) - Z Euler Angle
  •   ssFactor (int) - Sample only every n:th frame
  •   useDefaultSS (boolean) - Subsample based on difference in frame rates between BVH file and Blender


bpy.ops.mcp.load_t_pose(check_existing = True, filter_glob = "*.json", filepath = "")

  Load T-pose from file

Parameters:
  •   check_existing (boolean) - Check and warn on overwriting existing files
  •   filter_glob (string) - filter_glob
  •   filepath (string) - Filepath to json file


bpy.ops.mcp.loop_fcurves(useVisible = False, useSelected = False, useMarkers = False, blendRange = 5, loopInPlace = False, deleteOutside = False)

  Make the beginning and end of the selected time range connect smoothly. Use before repeating.

Parameters:
  •   useVisible (boolean) - Only visible F-curves
  •   useSelected (boolean) - Only F-curves for selected bones
  •   useMarkers (boolean) - Only between markers
  •   blendRange (int) - Blend Range
  •   loopInPlace (boolean) - Remove Location F-curves
  •   deleteOutside (boolean) - Delete all keyframes outside the looped region


bpy.ops.mcp.message()

  (undocumented operator)


bpy.ops.mcp.move_to_marker(left = False, last = False)

  Move to time marker

Parameters:
  •   left (boolean) - left
  •   last (boolean) - last


bpy.ops.mcp.offset_toes(useAutoTarget = True)

  Keep toes below the ball of the feet

Parameters:
  •   useAutoTarget (boolean) - Find target rig automatically


bpy.ops.mcp.print_hands()

  (undocumented operator)


bpy.ops.mcp.put_in_src_t_pose(autoRig = True)

  Put the character into T-pose

Parameters:
  •   autoRig (boolean) - Find rig automatically


bpy.ops.mcp.put_in_trg_t_pose(autoRig = True)

  Put the character into T-pose

Parameters:
  •   autoRig (boolean) - Find rig automatically


bpy.ops.mcp.rename_active_to_selected(useTimeScale = False, factor = 1.000, useAutoSource = True, useAutoTarget = True, useAutoScale = True)

  Rename bones of selected (source) armatures and scale it to fit the active (target) armature

Parameters:
  •   useTimeScale (boolean) - Scale F-curves in time after loading
  •   factor (float) - Factor for rescaling time
  •   useAutoSource (boolean) - Find source rig automatically
  •   useAutoTarget (boolean) - Find target rig automatically
  •   useAutoScale (boolean) - Rescale skeleton to match target


bpy.ops.mcp.repeat_fcurves(useVisible = False, useSelected = False, useMarkers = False, repeatNumber = 1)

  Repeat the part of the animation between selected markers n times

Parameters:
  •   useVisible (boolean) - Only visible F-curves
  •   useSelected (boolean) - Only F-curves for selected bones
  •   useMarkers (boolean) - Only between markers
  •   repeatNumber (int) - Repeat Number


bpy.ops.mcp.rest_current_pose()

  Change rest pose to current pose


bpy.ops.mcp.retarget_selected_to_active(useAutoTarget = True)

  Retarget animation to the active (target) armature from the other selected (source) armatures

Parameters:
  •   useAutoTarget (boolean) - Find target rig automatically


bpy.ops.mcp.save_t_pose(check_existing = True, filter_glob = "*.json", filepath = "", onlyMcpBones = False)

  Save current pose as .json file

Parameters:
  •   check_existing (boolean) - Check and warn on overwriting existing files
  •   filter_glob (string) - filter_glob
  •   filepath (string) - Filepath to json file
  •   onlyMcpBones (boolean) - Only Mcp Bones


bpy.ops.mcp.set_all_fake_user(fake = False)

  Add or remove fake users from all actions

Parameters:
  •   fake (boolean) - Add or remove fake user


bpy.ops.mcp.set_current_action(filter = "", actions = None)

  Set the action selected in the action list as the current action

Parameters:
  •   filter (string) - Filter action names with this
  •   actions (collection) - actions


bpy.ops.mcp.set_fake_user(filter = "", actions = None)

  Make selected actions fake and others unfake

Parameters:
  •   filter (string) - Filter action names with this
  •   actions (collection) - actions


bpy.ops.mcp.shift_animation()

  Shift the animation globally for selected boens


bpy.ops.mcp.simplify_fcurves(useVisible = False, useSelected = False, useMarkers = False, useSimplify = False, maxErrLoc = 0.010, maxErrRot = 0.100)

  Simplify F-curves

Parameters:
  •   useVisible (boolean) - Only visible F-curves
  •   useSelected (boolean) - Only F-curves for selected bones
  •   useMarkers (boolean) - Only between markers
  •   useSimplify (boolean) - Simplify F-curves
  •   maxErrLoc (float) - Max error for location FCurves when doing simplification
  •   maxErrRot (float) - Max error for rotation (degrees) FCurves when doing simplification


bpy.ops.mcp.start_edit()

  Start local F-curve editing


bpy.ops.mcp.stitch_actions(blendRange = 5, firstAction = '', secondAction = '', firstEndFrame = 1, secondStartFrame = 1, actionTarget = 'Stitch new', outputActionName = "Stitched")

  Stitch two action together seamlessly

Parameters:
  •   blendRange (int) - Blend Range
  •   firstAction (enum in []) - First Action
  •   secondAction (enum in []) - Second Action
  •   firstEndFrame (int) - First End Frame
  •   secondStartFrame (int) - Second Start Frame
  •   actionTarget (enum in ['Stitch new', 'Prepend second']) - Action Target
  •   outputActionName (string) - Output Action Name


bpy.ops.mcp.test()

  (undocumented operator)


bpy.ops.mcp.timescale_fcurves(useTimeScale = False, factor = 1.000)

  Scale F-curves in time

Parameters:
  •   useTimeScale (boolean) - Scale F-curves in time after loading
  •   factor (float) - Factor for rescaling time


bpy.ops.mcp.transfer_to_fk(useElbows = True, useKnees = True, useBendPositive = True, useAutoTarget = True, useArms = False, useLegs = True)

  Transfer IK animation to FK bones

Parameters:
  •   useElbows (boolean) - Keep elbow bending positive
  •   useKnees (boolean) - Keep knee bending positive
  •   useBendPositive (boolean) - Ensure that elbow and knee bending is positive
  •   useAutoTarget (boolean) - Find target rig automatically
  •   useArms (boolean) - Include arms in FK/IK snapping
  •   useLegs (boolean) - Include legs in FK/IK snapping


bpy.ops.mcp.transfer_to_ik(useElbows = True, useKnees = True, useBendPositive = True, useAutoTarget = True, useArms = False, useLegs = True)

  Transfer FK animation to IK bones

Parameters:
  •   useElbows (boolean) - Keep elbow bending positive
  •   useKnees (boolean) - Keep knee bending positive
  •   useBendPositive (boolean) - Ensure that elbow and knee bending is positive
  •   useAutoTarget (boolean) - Find target rig automatically
  •   useArms (boolean) - Include arms in FK/IK snapping
  •   useLegs (boolean) - Include legs in FK/IK snapping


bpy.ops.mcp.undo_edit(answer = "")

  Quit local editing and discard changes

Parameters:
  •   answer (string) - answer


bpy.ops.mcp.verify_source_rig()

  Verify the source rig type of the active armature


bpy.ops.mcp.verify_target_rig()

  Verify the target rig type of the active armature