trigger.actions.correctives
Action Module for Pose space deformations
Attributes
example action data: |
Classes
Module Contents
- class Correctives(**kwargs)
Bases:
trigger.core.action.ActionCore- action()
Mandatory Method - Execute Action
- static connect_correctives(corrected_mesh, skinned_mesh, controller, target_matrix, psd_attr, discard_delta=True)
Extracts the deltas of the corrected mesh and connects it to the psd attribute
- Args:
corrected_mesh: (String) Sculpted mesh skinned_mesh: (String) The mesh with the skinCluster controller: (String) Controller object which used to get into the sculpted position target_matrix: (tuple or list) target rotations of the the controller object psd_attr: (String) pose space deformer attribute which will initiall drive the corrected shape
e.g. L_thumb.rotateX, angleExtract_loc.angleBetween
discard_delta: (bool) if True, the delta shape which will be extracted by extractDeltas plugin will be deleted
Returns: None
- feed(action_data)
Mandatory Method - Feeds the instance with the action data stored in actions session
- save_action(file_path=None, *args, **kwargs)
Mandatory Method - Save Action
- ui(ctrl, layout, handler)
Mandatory Method - UI setting definitions
- Args:
ctrl: (model_ctrl) ctrl object instance of /ui/model_ctrl. Updates UI and Model layout: (QLayout) The layout object from the main ui. All setting widgets should be added to this layout handler: (actions_session) An instance of the actions_session. TRY NOT TO USE HANDLER UNLESS ABSOLUTELY NECESSARY
Returns: None
- static vector_psd(driver_transform, controller, target_matrix, up_object, return_angle_attr=False, prefix='')
- action_data
- ACTION_DATA
- LOG
example action data: ACTION_DATA = {
- “definitions”: [
- {
“mode”: 0, # 0 means Vector mode “driver_transform”: “some_joint” “controller”: “upper_arm_cont” “target_matrix”: “some_rotation” “up_object”: “some parent object of driver” “driver_axis”: “This is not used with angle mode” “corrected_shape”: “some_shape” “skinned_mesh”: “awesome skinned mesh”
}, {
“mode”: 1, # 1 means Single Acis mode “driver_transform”: “some_joint” “controller”: “upper_arm_cont” “target_matrix”: “some_rotation” “up_object”: “This is not used with single axis mode” “driver_axis”: “X Y or Z axis” “corrected_shape”: “some_shape” “skinned_mesh”: “awesome skinned mesh”
}
]
}