trigger.tools.face_mocap.main
Mapper module to import the csv and json files (livelink and audio2face)
from importlib import reload from trigger.tools.face_mocap import decode reload(decode) from trigger.tools.face_mocap import a2f reload(a2f) from trigger.tools.face_mocap import main as focap reload(focap)
handler = focap.FaceMocap()
# test_path = “D:/PROJECT_AND_ARGE/Elf_Facial_Collaboration/_TRANSFER/LiveLinkFace_20240531_MySlate_4_iPhone/20240531_MySlate_4/” test_path = “D:/PROJECT_AND_ARGE/Elf_Facial_Collaboration/_TRANSFER/LiveLinkFace_20240531_MySlate_3_iPhone/20240531_MySlate_3” handler.import_livelinkface_package(test_path)
Attributes
Classes
Mocap handler for importing motion capture data from json and csv files. |
Module Contents
- class FaceMocap
Mocap handler for importing motion capture data from json and csv files.
- import_audio2face_data(json_file, set_fps=True, set_ranges=True)
Import the audio2face data.
- Args:
json_file (str): Path to the json file.
- import_livelinkface_data(csv_file, fps=60, set_fps=True, set_ranges=True)
Import the LiveLinkFace data.
- Args:
csv_file (str): Path to the csv file.
- import_livelinkface_package(livelinkface_folder, import_livelink=True, import_a2f=True, use_calibrated=True, bake_a2f=False, bake_livelink=False)
Bring the full package.
- list_mappings()
List the available mappings.
- set_a2f_mocap_layer(mocap_layer)
Set the a2f mocap layer.
- set_bake_on_controllers(value)
Set the bake on controllers flag.
- Args:
- value (bool): If True, the mocap data is getting applied
directly to the controllers. Otherwise, it will be added to the morph hook values with a separate controller.
- set_controller(controller)
Set the controller.
- set_enable_neutralize(value)
Set the enable neutralize flag.
- set_livelink_mocap_layer(mocap_layer)
Set the livelink mocap layer.
- set_mapping(mapping_name)
Set the mapping from the list of available mappings.
- Args:
mapping_name (str): Name of the mapping.
- set_neutralize_frame(neutralize_frame)
Set the neutralize frame.
- static set_ranges(range_list)
Set the timeline ranges. Args:
- range_list: list of ranges as [<animation start>, <user min>, <user max>,
<animation end>]
Returns: None
- static set_scene_fps(fps_value)
Set the FPS value in DCC if supported. Args:
fps_value: (integer) fps value
Returns: None
- set_start_frame(start_frame)
Set the start frame.
- validations(file_path)
Run some validations before starting and return the result.
- property a2f_mocap_layer
- Get the a2f mocap layer.
- property bake_on_controllers
- Get the bake on controllers flag.
- property controller
- Get the controller.
- property enable_neutralize
- Get the enable neutralize flag.
- property livelink_mocap_layer
- Get the livelink mocap layer.
- property lower_face_mappings
- Return the mappings data depending on the controller type.
- property mapping
- Get the mapping.
- property neutralize_frame
- Get the neutralize frame.
- property start_frame
- Get the start frame.
- property upper_face_mappings
- Return the mappings data depending on the controller type.
- LOG