API#
pose_wrangler.v2.main#
- class epic_pose_wrangler.v2.main.UERBFAPI(view=False, parent=None, file_path=None)[source]#
Bases:
RBFAPI
Main entry point for interacting with the UERBFSolverNode and UEPoseBlenderNode
>>> from epic_pose_wrangler.v2 import main >>> rbf_api = main.UERBFAPI(view=False) >>> rbf_api.create_rbf_solver(solver_name="ExampleSolver", drivers=['leg_l'])
- VERSION = '2.4.0'#
- property extensions#
- Returns:
list of pose wrangler extensions currently loaded
- Return type:
list[pose_wrangler.v2.model.base_extension.PoseWranglerExtension]
- property view#
- Returns:
reference to the ui QWidget
- Return type:
QtWidgets.QWidget or None
- property current_solver#
- Returns:
reference to the current solver
- Return type:
api.RBFNode or None
- property config#
- property mirror_mapping#
- Returns:
reference to the currently loaded mirror mapping
- Return type:
mirror_mapping.MirrorMapping object
- property rbf_solvers#
- Returns:
list of rbf solvers in the scene
- Return type:
list
- create_rbf_solver(solver_name, drivers=None)[source]#
Create an rbf solver node with the given name and the specified driver transforms
- Parameters:
solver_name (str) – name of the solver node
drivers (list) – list of driver transform node names
- Returns:
RBFNode ref
- Return type:
api.RBFNode
- delete_rbf_solver(solver=None)[source]#
Delete the specified solver
- Parameters:
solver (api.RBFNode) – solver reference
- edit_solver(edit=True, solver=None)[source]#
Edit or finish editing the specified solver. Enables pose creation/driven node changes via the ui
- Parameters:
edit (bool) – set edit mode on or off
solver (api.RBFNode) – solver reference
- mirror_rbf_solver(solver=None, mirror_rotation_axis='x', mirror_translation_axis='x')[source]#
Mirror the current solver
- Parameters:
solver (api.RBFNode) – solver reference
mirror_rotation_axis –
mirror_translation_axis –
- Returns:
mirrored solver reference
- Return type:
api.RBFNode
- get_rbf_solver_by_name(solver_name)[source]#
Searches the scene for an rbf solver with the given name. Case insensitive
- Parameters:
solver_name (str) – Solver node name
- Returns:
found node or None
- Return type:
api.RBFNode or None
- add_drivers(drivers=None, solver=None)[source]#
Add the specified drivers to the specified solver
- Parameters:
drivers (list) – list of transform nodes
solver (api.RBFNode) – solver reference
- remove_drivers(drivers, solver=None)[source]#
Remove the specified drivers from the specified solver
- Parameters:
drivers (list) – list of driver transform nodes
solver (api.RBFNode) – solver reference
- add_driven_transforms(driven_nodes=None, solver=None, edit=False)[source]#
Add driven transforms to the specified solver
- Parameters:
driven_nodes (list) – list of transform nodes
solver (api.RBFNode) – solver reference
edit (bool) – should this transform not be connected to the pose blender output upon creation
- remove_driven(driven_nodes, solver=None)[source]#
Remove driven transforms from the specified solver
- Parameters:
driven_nodes (list) – list of transform nodes
solver (api.RBFNode) – solver reference
- add_blendshape(pose_name, mesh_name, base_mesh, solver=None)[source]#
Add an existing blendshape for the current pose
- Parameters:
pose_name (str) – name of the pose the blendshape is associated with
mesh_name (str) – name of the existing blendshape mesh
base_mesh (str) – name of the mesh the blendshape mesh is derived from
solver (api.RBFNode) – solver reference
- create_blendshape(pose_name, mesh_name=None, edit=False, solver=None)[source]#
Create a new blendshape for the given pose and mesh
- Parameters:
pose_name (str) – name of the pose to create this blendshape for
mesh_name (str) – name of the mesh to create the blendshape from
edit (bool) – should this blendshape be edited straight away
solver (api.RBFNode) – solver reference
- Returns:
name of the newly created blendshape mesh
- Return type:
str
- delete_blendshape(pose_name, solver=None)[source]#
Delete the blendshape associated with the specified pose
- Parameters:
pose_name (str) – name of the pose to delete blendshapes for
solver (api.RBFNode) – solver reference
- edit_blendshape(pose_name, edit=True, solver=None)[source]#
Edit or finish editing the blendshape associated with the specified pose name
- Parameters:
pose_name (str) – name of the pose the blendshape is associated with
edit (bool) – True = enable editing, False = finish editing
solver (api.RBFNode) – solver reference
- isolate_blendshape(pose_name, isolate=True, solver=None)[source]#
Isolate the blendshape associated with the specified pose name, disabling all other blendshapes.
- Parameters:
pose_name (str) – name of the pose the blendshape is associated with
isolate (bool) – True = isolate the blendshape, False = reconnect all disconnected blendshapes
solver (api.RBFNode) – solver reference
- create_pose(pose_name, solver=None)[source]#
Create a new pose for the specified solver
- Parameters:
pose_name (str) – name of the new pose
solver (api.RBFNode) – solver reference
- delete_pose(pose_name, solver=None)[source]#
Remove a pose from the given solver
- Parameters:
pose_name (str) – name of the pose to remove
solver (api.RBFNode) – solver reference
- go_to_pose(pose_name, solver=None)[source]#
Move the driver/driven transforms to the given pose
- Parameters:
pose_name (str) – name of the pose
solver (api.RBFNode) – solver reference
- mirror_pose(pose_name, solver=None, mirror_rotation_axis='x', mirror_translation_axis='x')[source]#
Mirror a pose to the mirror of the current solver
- Parameters:
pose_name (str) – name of the pose
solver (api.RBFNode) – solver reference
mirror_rotation_axis –
mirror_translation_axis –
- mute_pose(pose_name, mute=True, solver=None)[source]#
Mute or unmute the specified pose, removing all influences of the pose from the solver. NOTE: This will affect the solver radius if automatic radius is enabled.
- Parameters:
pose_name (str) – name of the pose
mute (bool) – mute or unmute the pose
solver (api.RBFNode) – solver reference
- rename_pose(pose_name, new_pose_name, solver=None)[source]#
Rename a pose on the given solver
- Parameters:
pose_name (str) – name of the pose
new_pose_name (str) – new name of the pose
solver (api.RBFNode) – solver reference
- update_pose(pose_name, solver=None)[source]#
Update the pose for the given solver
- Parameters:
pose_name (str) – name of the pose to update
solver (api.RBFNode) – solver reference
- deserialize_from_file(file_path, solver_names=None, **kwargs)[source]#
Deserialize solvers from a specific file.
- Parameters:
file_path (str) – json file to load
- serialize_to_file(file_path, solvers=None, **kwargs)[source]#
Serialize the specified solvers to a file
- Parameters:
file_path (str) – json file to serialize
solvers (list) – list of api.RBFNode to serialize
- deserialize(data, solver_names=None, **kwargs)[source]#
Deserialize and load the solvers from the data specified
- Parameters:
data (dict) – serialized solver data
solver_names (list, optional) – list of solver names to load from the data
- serialize(solvers, **kwargs)[source]#
Serialize the specified solvers
- Parameters:
solvers (list) – list of api.RBFNode to serialize
- Returns:
serialized solver data
- Return type:
dict
- get_context()[source]#
Get the current solver context
- Returns:
pose wrangler context containing the current solver and all rbf solvers
- Return type:
context.PoseWranglerContext
- get_ui_context()[source]#
If the ui is available, return the ui context
- Returns:
ui context containing the current state of the ui
- Return type:
ui_context.PoseWranglerUIContext or None
- get_extension_by_type(class_ref)[source]#
Get a reference to one of the loaded extensions from a class type
- Parameters:
class_ref (base_extension.PoseWranglerExtension) – reference to an extension class
- Returns:
reference to a loaded extension if one is loaded
- Return type:
base_extension.PoseWranglerExtension instance or None
- set_mirror_mapping(**kwargs)#