trigger.actions.face_cam

Face Camera

Attributes

ACTION_DATA

log

Classes

Face_cam

Module Contents

class Face_cam(**kwargs)

Bases: trigger.core.action.ActionCore

action()

Mandatory Method - Execute Action

static create_face_camera(aim_pos=None, face_mesh=None, parent=None, name='faceCam', focal=50.0, distance=7.0, limits=None, rig_grp=None, limit_mult=1.0, hidden=True)

Creates a face camera locked to the face. Args:

aim_pos (tuple or list): World space position data for initial focus. face_mesh (string): If the mesh is defined the center of the object will be used as aim_pos and bounding box as limits. aim_pos and limits arguments always override. parent (string): (optional) The group which will be parent constrained to. name (str): Name of the camera. Default is ‘faceCam’. focal (float): Focal length value in mm. distance (float): Initial distance to the face. limits (list): (optional) list of min/max tuple values to define the limits. Tuples represent X, Y, Z

Example: limits=[(-2,2), (-1,1), (-3,3)]

rig_grp (string): (optional) The group which will be the camera group tucked away.. limit_mult (float): multiplies the limits. Makes sense when used with face_mesh bounding box hidden (boolean): If True, hides the rig group

Returns:

String: camera group transform node

feed(action_data, *args, **kwargs)

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, *args, **kwargs)

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 *args: **kwargs:

Returns: None

action_data
ACTION_DATA
log