unreal.IKRigController
¶
- class unreal.IKRigController(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
Object
A singleton (per-asset) class used to make modifications to a UIKRigDefinition asset
All modifications to an IKRigDefinition must go through this controller.
Editors can subscribe to the callbacks on this controller to be notified of changes that require reinitialization of a running IK Rig processor instance. The API here is split into public/scripting sections which are accessible from Blueprint/Python and sections that are only relevant to editors in C++.
C++ Source:
Plugin: IKRig
Module: IKRigEditor
File: IKRigController.h
- add_bone_setting(bone_name, solver_index) bool ¶
Add settings to the given Bone/Solver. Does nothing if Bone already has settings in this Solver.
- add_new_goal(goal_name, bone_name) Name ¶
Add a new Goal associated with the given Bone. GoalName must be unique. Bones can have multiple Goals (rare).
- add_retarget_chain(chain_name, start_bone_name, end_bone_name, goal_name) Name ¶
Add a new chain with the given Chain and Bone names. Returns newly created chain name (uniquified). Note: only the ChainName is required here, all else can be set later.
- add_solver(solver_class) int32 ¶
Add a new solver of the given type to the bottom of the stack. Returns the stack index.
- apply_auto_fbik() bool ¶
Analyse the skeleton to see if it matches a known template and automatically generates a full body IK setup Returns true if a matching skeletal template was found and the FBIK setup for it was applied.
- Return type:
- apply_auto_generated_retarget_definition() bool ¶
Analyse the skeleton to see if it matches a known template and automatically generates all retarget chains and sets the retarget root Returns true if a matching skeletal template was found and the retarget definition for it was applied.
- Return type:
- connect_goal_to_solver(goal_name, solver_index) bool ¶
Connect the given Goal to the given Solver. This creates an “Effector” with settings specific to this Solver.
- disconnect_goal_from_solver(goal_to_remove, solver_index) bool ¶
Disconnect the given Goal from the given Solver. This removes the Effector that associates the Goal with the Solver.
- get_all_goals() Array[IKRigEffectorGoal] ¶
Get access to the list of Goals.
- Return type:
- get_bone_settings(bone_name, solver_index) Object ¶
Get the generic (Solver-specific) Bone settings UObject for this Bone in the given Solver.
- classmethod get_controller(ik_rig_definition) IKRigController ¶
Use this to get the controller for the given IKRig
- Parameters:
ik_rig_definition (IKRigDefinition) –
- Return type:
- get_end_bone(solver_index) Name ¶
Get the name of the end bone on a given solver. (not all solvers require extra end bones, checks CanSetEndBone() first)
- Parameters:
solver_index (int32) –
- Return type:
- get_goal(goal_name) IKRigEffectorGoal ¶
Get read-write access to the Goal with the given name.
- Parameters:
goal_name (Name) –
- Return type:
- get_goal_name_for_bone(bone_name) Name ¶
Get the Goal associated with the given Bone (may be NAME_None)
- get_goal_settings_for_solver(goal_name, solver_index) Object ¶
Get the UObject for the settings associated with the given Goal in the given Solver. Solvers can define their own per-Goal settings depending on their needs. These are termed “Effectors”.
- get_index_of_solver(solver) int32 ¶
Get access to the given solver.
- Parameters:
solver (IKRigSolver) –
- Return type:
int32
- get_num_solvers() int32 ¶
Get the number of solvers in the stack.
- Return type:
int32
- get_ref_pose_transform_of_bone(bone_name) Transform ¶
Get the global-space retarget pose transform of the given Bone.
- get_retarget_root() Name ¶
Get the name of the Root Bone of the retargeting (can only be one).
- Return type:
- get_root_bone(solver_index) Name ¶
Get the name of the root bone on a given solver. (not all solvers support root bones, checks CanSetRootBone() first)
- Parameters:
solver_index (int32) –
- Return type:
- get_skeletal_mesh() SkeletalMesh ¶
Get the skeletal mesh this asset is initialized with
- Return type:
- get_solver_at_index(index) IKRigSolver ¶
Get access to the given solver.
- Parameters:
index (int32) –
- Return type:
- get_solver_enabled(solver_index) bool ¶
Get enabled status of the given solver.
- Parameters:
solver_index (int32) –
- Return type:
- is_goal_connected_to_any_solver(goal_name) bool ¶
Returns true if the given Goal is connected to ANY solver. False otherwise.
- is_goal_connected_to_solver(goal_name, solver_index) bool ¶
Returns true if the given Goal is connected to the given Solver. False otherwise.
- is_skeletal_mesh_compatible(skeletal_mesh_to_check) bool ¶
Returns true if the provided skeletal mesh could be used with this IK Rig.
- Parameters:
skeletal_mesh_to_check (SkeletalMesh) –
- Return type:
- move_solver_in_stack(solver_to_move_index, target_solver_index) bool ¶
Move the solver at the given index to the target index.
- Parameters:
solver_to_move_index (int32) –
target_solver_index (int32) –
- Return type:
- remove_bone_setting(bone_name, solver_index) bool ¶
Remove settings for the given Bone/Solver. Does nothing if Bone doesn’t have setting in this Solver.
- remove_retarget_chain(chain_name) bool ¶
Remove a Chain with the given name. Returns true if a Chain was removed.
- remove_solver(solver_index) bool ¶
Remove the solver at the given stack index.
- Parameters:
solver_index (int32) –
- Return type:
- rename_goal(old_name, potential_new_name) Name ¶
Rename a Goal. Returns new name, which may be different after being sanitized. Returns NAME_None if this fails.
- rename_retarget_chain(chain_name, new_chain_name) Name ¶
Renamed the given Chain. Returns the new name (same as old if unsuccessful).
- set_bone_excluded(bone_name, exclude) bool ¶
Include/exclude a bone from all the solvers. All bones are included by default.
- set_end_bone(end_bone_name, solver_index) bool ¶
Set the end bone on a given solver. (not all solvers require extra end bones, checks CanSetEndBone() first)
- set_goal_bone(goal_name, new_bone_name) bool ¶
The the Bone that the given Goal should be parented to / associated with.
- set_retarget_chain_end_bone(chain_name, end_bone_name) bool ¶
Set the End Bone for the given Chain. Returns true if operation was successful.
- set_retarget_chain_goal(chain_name, goal_name) bool ¶
Set the Goal for the given Chain. Returns true if operation was successful.
- set_retarget_chain_start_bone(chain_name, start_bone_name) bool ¶
Set the Start Bone for the given Chain. Returns true if operation was successful.
- set_root_bone(root_bone_name, solver_index) bool ¶
Set the root bone on a given solver. (not all solvers support root bones, checks CanSetRootBone() first)
- set_skeletal_mesh(skeletal_mesh) bool ¶
Sets the preview mesh to use. Loads the hierarchy into the asset’s IKRigSkeleton. Returns true if the mesh was able to be set. False if it was incompatible for any reason.
- Parameters:
skeletal_mesh (SkeletalMesh) –
- Return type: