API
pose_wrangler.v2.main
- class pose_wrangler.v2.main.UERBFAPI(view=False, parent=None, file_path=None)
Bases:
pose_wrangler.model.api.RBFAPI
Main entry point for interacting with the UERBFSolverNode and UEPoseBlenderNode
>>> from pose_wrangler.v2 import main >>> rbf_api = main.UERBFAPI(view=False) >>> rbf_api.create_rbf_solver(solver_name="ExampleSolver", drivers=['leg_l'])
- VERSION = '2.0.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 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)
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)
Delete the specified solver
- Parameters
solver (api.RBFNode) – solver reference
- edit_solver(edit=True, solver=None)
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 the current solver
- Parameters
solver (api.RBFNode) – solver reference
- Returns
mirrored solver reference
- Return type
api.RBFNode
- get_rbf_solver_by_name(solver_name)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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 a pose to the mirror of the current solver
- Parameters
pose_name (str) – name of the pose
solver (api.RBFNode) – solver reference
- mute_pose(pose_name, mute=True, solver=None)
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)
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)
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)
Deserialize solvers from a specific file.
- Parameters
file_path (str) – json file to load
- serialize_to_file(file_path, solvers=None)
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)
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=None)
Serialize the specified solvers
- Parameters
solvers (list) – list of api.RBFNode to serialize
- Returns
serialized solver data
- Return type
dict
- load()
Load the default pose wrangler settings
- get_context()
Get the current solver context
- Returns
pose wrangler context containing the current solver and all rbf solvers
- Return type
context.PoseWranglerContext
- get_ui_context()
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)
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(path=None)
Set the mirror mapping from a file
- Parameters
path (str) – path to json mirror mapping file
- get_solver_edit_status(solver)
Check if the current solver is in ‘Edit’ mode
- Parameters
solver (api.RBFNode) – solver reference
- Returns
True = in edit mode, False = not in edit mode
- Return type
bool