dna_viewer.config package

Submodules

dna_viewer.config.aas module

class dna_viewer.config.aas.AdditionalAssemblyScript(path: typing.Optional[str] = None, module_name: typing.Optional[str] = None, method: str = 'run_after_assemble', parameter: typing.Dict[typing.Any, typing.Any] = <factory>)[source]

Bases: object

A class used to represent the additional assembly script config

@type path
Type

Optional[str]

@param path
Type

The location of the script file

@type module_name
Type

Optional[str]

@param module_name
Type

The module name to be used

@type method
Type

str

@param method
Type

The method that should be called

@type parameter
Type

Dict[Any, Any]

@param parameter
Type

The parameters that will be passed as the method arguments

method: str = 'run_after_assemble'
module_name: Optional[str] = None
parameter: Dict[Any, Any]
path: Optional[str] = None

dna_viewer.config.analog_gui module

class dna_viewer.config.analog_gui.AnalogGui(gui_path: Optional[str] = None, facial_root_joint_name: str = 'FACIAL_C_FacialRoot', left_eye_joint_name: str = 'FACIAL_L_Eye', right_eye_joint_name: str = 'FACIAL_R_Eye', central_driver_name: str = 'LOC_C_eyeDriver', left_eye_driver_name: str = 'LOC_L_eyeDriver', right_eye_driver_name: str = 'LOC_R_eyeDriver', left_eye_aim_up_name: str = 'LOC_L_eyeAimUp', right_eye_aim_up_name: str = 'LOC_R_eyeAimUp', central_aim: str = 'GRP_C_eyesAim', le_aim: str = 'GRP_L_eyeAim', re_aim: str = 'GRP_R_eyeAim')[source]

Bases: object

A class used to represent the analog gui config

@type gui_path
Type

str

@param gui_path
Type

The location of the gui file

@type facial_root_joint_name
Type

str

@param facial_root_joint_name
Type

The name of the facial root joint

@type left_eye_joint_name
Type

str

@param left_eye_joint_name
Type

The name of the left eye joint

@type right_eye_joint_name
Type

str

@param right_eye_joint_name
Type

The name of the right eye joint

@type central_driver_name
Type

str

@param central_driver_name
Type

The name of the central driver

@type left_eye_driver_name
Type

str

@param left_eye_driver_name
Type

The name of the left eye driver

@type right_eye_driver_name
Type

str

@param right_eye_driver_name
Type

The name of the right eye driver

@type central_aim
Type

str

@param central_aim
Type

The name of the central aim

@type le_aim
Type

str

@param le_aim
Type

The name of the left eye aim

@type re_aim
Type

str

@param re_aim
Type

The name of the right eye aim

central_aim: str = 'GRP_C_eyesAim'
central_driver_name: str = 'LOC_C_eyeDriver'
facial_root_joint_name: str = 'FACIAL_C_FacialRoot'
gui_path: str = None
le_aim: str = 'GRP_L_eyeAim'
left_eye_aim_up_name: str = 'LOC_L_eyeAimUp'
left_eye_driver_name: str = 'LOC_L_eyeDriver'
left_eye_joint_name: str = 'FACIAL_L_Eye'
re_aim: str = 'GRP_R_eyeAim'
right_eye_aim_up_name: str = 'LOC_R_eyeAimUp'
right_eye_driver_name: str = 'LOC_R_eyeDriver'
right_eye_joint_name: str = 'FACIAL_R_Eye'
with_central_aim(name: str) dna_viewer.config.analog_gui.AnalogGui[source]

Set the central aim name

@type name: str @param name: The value to set the central aim name to

@rtype: AnalogGui @returns: The instance of the changed object

with_central_driver_name(driver_name: str) dna_viewer.config.analog_gui.AnalogGui[source]

Set the central driver name

@type driver_name: str @param driver_name: The value to set the central driver name to

@rtype: AnalogGui @returns: The instance of the changed object

with_facial_root_joint_name(joint_name: str) dna_viewer.config.analog_gui.AnalogGui[source]

Set the facial root joint name

@type joint_name: str @param joint_name: The value to set the facial root joint name to

@rtype: AnalogGui @returns: The instance of the changed object

with_gui_path(gui_path: str) dna_viewer.config.analog_gui.AnalogGui[source]

Set the gui path

@type gui_path: str @param gui_path: The location of the gui file

@rtype: AnalogGui @returns: The instance of the changed object

with_left_eye_aim(name: str) dna_viewer.config.analog_gui.AnalogGui[source]

Set the left eye aim name

@type name: str @param name: The value to set the left eye aim name to

@rtype: AnalogGui @returns: The instance of the changed object

with_left_eye_aim_up_name(name: str) dna_viewer.config.analog_gui.AnalogGui[source]

Set the left eye aim up name

@type name: str @param name: The value to set the left eye aim up name to

@rtype: AnalogGui @returns: The instance of the changed object

with_left_eye_driver_name(driver_name: str) dna_viewer.config.analog_gui.AnalogGui[source]

Set the left eye driver name

@type driver_name: str @param driver_name: The value to set the left eye driver name to

@rtype: AnalogGui @returns: The instance of the changed object

with_left_eye_joint_name(joint_name: str) dna_viewer.config.analog_gui.AnalogGui[source]

Set the left eye joint name

@type joint_name: str @param joint_name: The value to set the left eye joint name to

@rtype: AnalogGui @returns: The instance of the changed object

with_right_eye_aim(name: str) dna_viewer.config.analog_gui.AnalogGui[source]

Set the right eye aim name

@type name: str @param name: The value to set the central aim name to

@rtype: AnalogGui @returns: The instance of the changed object

with_right_eye_aim_up_name(name: str) dna_viewer.config.analog_gui.AnalogGui[source]

Set the right eye aim up name

@type name: str @param name: The value to set the right eye aim up name to

@rtype: AnalogGui @returns: The instance of the changed object

with_right_eye_driver_name(driver_name: str) dna_viewer.config.analog_gui.AnalogGui[source]

Set right eye driver name

@type driver_name: str @param driver_name: The value to set the left eye driver name to

@rtype: AnalogGui @returns: The instance of the changed object

with_right_eye_joint_name(joint_name: str) dna_viewer.config.analog_gui.AnalogGui[source]

Set the right eye joint name

@type joint_name: str @param joint_name: The value to set the right eye joint name to

@rtype: AnalogGui @returns: The instance of the changed object

dna_viewer.config.character module

class dna_viewer.config.character.BuildOptions(add_joints: bool = False, add_normals: bool = False, add_blend_shapes: bool = False, add_skin: bool = False, add_ctrl_attributes_on_root_joint: bool = False, add_animated_map_attributes_on_root_joint: bool = False, add_key_frames: bool = False, add_mesh_name_to_blend_shape_channel_name: bool = False)[source]

Bases: object

A class used to represent the build options we want to apply while building the character

@type add_joints
Type

bool

@param add_joints
Type

A flag representing whether joints should be added

@type add_normals
Type

bool

@param add_normals
Type

A flag representing whether normals should be added

@type add_blend_shapes
Type

bool

@param add_blend_shapes
Type

A flag representing whether blend shapes should be added

@type add_skin
Type

bool

@param add_skin
Type

A flag representing whether skin should be added

@type add_ctrl_attributes_on_root_joint
Type

bool

@param add_ctrl_attributes_on_root_joint
Type

A flag representing whether control attributes should be added to the root joint

@type add_animated_map_attributes_on_root_joint
Type

bool

@param add_animated_map_attributes_on_root_joint
Type

A flag representing whether animated map attributes should be added to the root joint

@type add_key_frames
Type

bool

@param add_key_frames
Type

A flag representing whether key frames should be added

@type add_mesh_name_to_blend_shape_channel_name
Type

bool

@param add_mesh_name_to_blend_shape_channel_name
Type

A flag representing whether mash name of blend shape channel is added to name when creating it

add_animated_map_attributes_on_root_joint: bool = False
add_blend_shapes: bool = False
add_ctrl_attributes_on_root_joint: bool = False
add_joints: bool = False
add_key_frames: bool = False
add_mesh_name_to_blend_shape_channel_name: bool = False
add_normals: bool = False
add_skin: bool = False
class dna_viewer.config.character.Character(dna: typing.Optional[dna_viewer.model.dna.DNA] = None, options: dna_viewer.config.character.BuildOptions = <factory>, modifiers: dna_viewer.config.character.SpaceModifiers = <factory>, meshes: typing.List[int] = <factory>, rig_logic_config: typing.Optional[dna_viewer.config.rig_logic.RigLogic] = None, gui_options: typing.Optional[dna_viewer.config.gui.Gui] = None, analog_gui_options: typing.Optional[dna_viewer.config.analog_gui.AnalogGui] = None, create_character_node: bool = True, create_display_layers: bool = True, aas: typing.Optional[dna_viewer.config.aas.AdditionalAssemblyScript] = None)[source]

Bases: object

A class used to represent the character config

@type dna
Type

DNA

@param dna
Type

Instance of DNA object

@type options
Type

BuildOptions

@param options
Type

The configuration containing the build options

@type modifiers
Type

SpaceModifiers

@param modifiers
Type

The configuration containing space modifiers for the character

@type meshes
Type

List[int]

@param meshes
Type

The list of mesh ids that need to be processed

@type rig_logic_config
Type

RigLogic

@param rig_logic_config
Type

The rig logic configuration file containing naming patterns

@type gui_options
Type

Gui

@param gui_options
Type

The configuration containing the gui options

@type analog_gui_options
Type

AnalogGui

@param analog_gui_options
Type

The configuration containing the analog gui options

@type create_character_node
Type

bool

@param create_character_node
Type

A flag representing whether the character should be parented to a character transform node in the scene hierarchy

@type create_display_layers
Type

bool

@param create_display_layers
Type

A flag representing whether the created meshes should be assigned to a display layer

@type aas
Type

AdditionalAssemblyScript

@param aas
Type

The configuration containing the additional assembly script options

aas: dna_viewer.config.aas.AdditionalAssemblyScript = None
analog_gui_options: dna_viewer.config.analog_gui.AnalogGui = None
create_character_node: bool = True
create_display_layers: bool = True
dna: dna_viewer.model.dna.DNA = None
gui_options: dna_viewer.config.gui.Gui = None
meshes: List[int]
modifiers: dna_viewer.config.character.SpaceModifiers
options: dna_viewer.config.character.BuildOptions
rig_logic_config: dna_viewer.config.rig_logic.RigLogic = None
with_add_meshes_to_display_layers(value: bool) dna_viewer.config.character.Character[source]

Set the flag that represents if the created meshes should be put in their corresponding display layer

@type value: bool @param value: The flag that represents if the created meshes should be put in their corresponding display layer

@rtype: Character @returns: The instance of the changed object

with_additional_assembly_script(aas_config: dna_viewer.config.aas.AdditionalAssemblyScript) dna_viewer.config.character.Character[source]

Set the additional assembly script configuration

@type aas_config: AdditionalAssemblyScript @param aas_config: The configuration containing the additional assembly script options

@rtype: Character @returns: The instance of the changed object

with_analog_gui(analog_gui_config: dna_viewer.config.analog_gui.AnalogGui) dna_viewer.config.character.Character[source]

Set the analog gui configuration

@type analog_gui_config: AnalogGui @param analog_gui_config: The configuration containing the analog gui options

@rtype: Character @returns: The instance of the changed object

with_analog_gui_path(analog_gui_path: Optional[str] = None) dna_viewer.config.character.Character[source]

Set the analog gui path

@type analog_gui_path: Optional[str] @param analog_gui_path: The configuration containing the analog gui options

@rtype: Character @returns: The instance of the changed object

with_angle_modifier(modifier: float) dna_viewer.config.character.Character[source]

Set the angle modifier

@type modifier: float @param modifier: The value of the angle modifier

@rtype: Character @returns: The instance of the changed object

with_animated_map_attributes_on_root_joint() dna_viewer.config.character.Character[source]

Set the flag that represents if animated map attributes should be added on the root joint

@rtype: Character @returns: The instance of the changed object

with_blend_shapes() dna_viewer.config.character.Character[source]

Set the flag that represents if blend shapes should be created

@rtype: Character @returns: The instance of the changed object

with_character_node(value: bool) dna_viewer.config.character.Character[source]

Set the flag that represents if the result character rig should be parented to a character transform

@type value: bool @param value: The flag that represents if the result character rig should be parented to a character transform

@rtype: Character @returns: The instance of the changed object

with_ctrl_attributes_on_root_joint() dna_viewer.config.character.Character[source]

Set the flag that represents if control attributes should be added on the root joint

@rtype: Character @returns: The instance of the changed object

with_dna(dna: dna_viewer.model.dna.DNA) dna_viewer.config.character.Character[source]

Set the DNA file path

@type dna: DNA @param dna: The location of the DNA file

@rtype: Character @returns: The instance of the changed object

with_gui(gui: dna_viewer.config.gui.Gui) dna_viewer.config.character.Character[source]

Set the gui configuration

@type gui: Gui @param gui: The gui configuration file

@rtype: Character @returns: The instance of the changed object

with_gui_path(gui_path: str) dna_viewer.config.character.Character[source]

Set the gui path

@type gui_path: str @param gui_path: The location of the gui file

@rtype: Character @returns: The instance of the changed object

with_joints() dna_viewer.config.character.Character[source]

Set the flag that represents if joints should be created

@rtype: Character @returns: The instance of the changed object

with_key_frames() dna_viewer.config.character.Character[source]

Set the flag that represents if key frames should be added

@rtype: Character @returns: The instance of the changed object

with_linear_modifier(modifier: float) dna_viewer.config.character.Character[source]

Set the linear modifier

@type modifier: float @param modifier: The value of the linear modifier

@rtype: Character @returns: The instance of the changed object

with_meshes(meshes: List[int]) dna_viewer.config.character.Character[source]

Set the meshes that need to be processed

@type meshes: List[int] @param meshes: The list of mesh ids that need to be processed

@rtype: Character @returns: The instance of the changed object

with_normals() dna_viewer.config.character.Character[source]

Set the flag that represents if normals should be created

@rtype: Character @returns: The instance of the changed object

with_rig_logic(rig_logic_node_config: Optional[dna_viewer.config.rig_logic.RigLogic] = None) dna_viewer.config.character.Character[source]

Set the rig logic configuration

@type rig_logic_node_config: RigLogic @param rig_logic_node_config: The rig logic configuration file containing naming patterns

@rtype: Character @returns: The instance of the changed object

with_skin() dna_viewer.config.character.Character[source]

Set the flag that represents if skin should be created

@rtype: Character @returns: The instance of the changed object

class dna_viewer.config.character.SpaceModifiers(linear_modifier: Optional[float] = None, angle_modifier: Optional[float] = None)[source]

Bases: object

A class used to represent the character config

@type linear_modifier
Type

float

@param linear_modifier
Type

The linear modifier that needs to be applied to the character

@type angle_modifier
Type

float

@param angle_modifier
Type

The angle modifier that needs to be applied to the character

angle_modifier: float = None
linear_modifier: float = None

dna_viewer.config.gui module

class dna_viewer.config.gui.Gui(gui_path: Optional[str] = None, left_eye_joint_name: str = 'FACIAL_L_Eye', eye_gui_name: str = 'CTRL_C_eye', gui_translate_x: float = 10)[source]

Bases: object

A class used to represent the gui config

@type gui_path
Type

str

@param gui_path
Type

The location of the gui file

@type left_eye_joint_name
Type

str

@param left_eye_joint_name
Type

The name of the left eye joint

@type eye_gui_name
Type

str

@param eye_gui_name
Type

The name of the control in the gui

@type gui_translate_x
Type

float

@param gui_translate_x
Type

Represents the value that the gui should be additionally translated on the X axis

eye_gui_name: str = 'CTRL_C_eye'
gui_path: str = None
gui_translate_x: float = 10
left_eye_joint_name: str = 'FACIAL_L_Eye'
with_eye_gui_name_name(name: str) dna_viewer.config.gui.Gui[source]

Set name of the eye element in the gui

@type name: str @param name: The name of the element in the gui

@rtype: Gui @returns: The instance of the changed object

with_gui_path(gui_path: str) dna_viewer.config.gui.Gui[source]

Set the gui path

@type gui_path: str @param gui_path: The location of the gui file

@rtype: Gui @returns: The instance of the changed object

with_gui_translate_x(value: float) dna_viewer.config.gui.Gui[source]

Set the value the gui should be additionally translated on the X axis

@type value: float @param value: The value the gui should be translated on the X axis

@rtype: Gui @returns: The instance of the changed object

with_left_eye_joint_name(name: str) dna_viewer.config.gui.Gui[source]

Set name of the left eye joint

@type name: str @param name: The name of the joint

@rtype: Gui @returns: The instance of the changed object

dna_viewer.config.mesh module

class dna_viewer.config.mesh.Mesh(mesh_index: Optional[int] = None, linear_modifier: Optional[float] = None)[source]

Bases: object

A class used to represent the mesh configuration

@type mesh_index
Type

int

@param mesh_index
Type

The index of the mesh

@type linear_modifier
Type

float

@param linear_modifier
Type

The linear modifier that needs to be applied to the character

linear_modifier: Optional[float] = None
mesh_index: Optional[int] = None

dna_viewer.config.rig_logic module

class dna_viewer.config.rig_logic.RigLogic(command: str = 'createEmbeddedNodeRL4', name: str = '', dna_file_path: str = '', control_naming: str = '<objName>.<attrName>', joint_naming: str = '<objName>.<attrName>', blend_shape_naming: str = '<objName>_blendShapes.<attrName>', animated_map_naming: str = 'FRM_WMmultipliers.<objName>_<attrName>')[source]

Bases: object

A class used to represent the rig logic naming configuration

@type command
Type

str

@param command
Type

The command used to start creating the rig logic using the plugin

@type name
Type

str

@param name
Type

The name of the rig logic node

@type dna_file_path
Type

str

@param dna_file_path
Type

The location of the DNA file

@type control_naming
Type

str

@param control_naming
Type

The naming pattern of controls

@type joint_naming
Type

str

@param joint_naming
Type

The naming pattern of joints

@type blend_shape_naming
Type

str

@param blend_shape_naming
Type

The naming pattern of blend shapes

@type animated_map_naming
Type

str

@param animated_map_naming
Type

The naming pattern of animated maps

animated_map_naming: str = 'FRM_WMmultipliers.<objName>_<attrName>'
blend_shape_naming: str = '<objName>_blendShapes.<attrName>'
command: str = 'createEmbeddedNodeRL4'
control_naming: str = '<objName>.<attrName>'
dna_file_path: str = ''
joint_naming: str = '<objName>.<attrName>'
name: str = ''
with_animated_map_naming(animated_map_naming: str) dna_viewer.config.rig_logic.RigLogic[source]

Set the naming pattern of animated maps

@type animated_map_naming: str @param animated_map_naming: The naming pattern of animated maps

@rtype: RigLogic @returns: The instance of the changed object

with_blend_shape_naming(blend_shape_naming: str) dna_viewer.config.rig_logic.RigLogic[source]

Set the naming pattern of blend shapes

@type blend_shape_naming: str @param blend_shape_naming: The naming pattern of blend shapes

@rtype: RigLogic @returns: The instance of the changed object

with_control_naming(control_naming: str) dna_viewer.config.rig_logic.RigLogic[source]

Set the naming pattern of controls

@type control_naming: str @param control_naming: The naming pattern of controls

@rtype: RigLogic @returns: The instance of the changed object

with_dna_file_path(dna_file_path: str) dna_viewer.config.rig_logic.RigLogic[source]

Set the location of the DNA file

@type dna_file_path: str @param dna_file_path: The location of the DNA file

@rtype: RigLogic @returns: The instance of the changed object

with_joint_naming(joint_naming: str) dna_viewer.config.rig_logic.RigLogic[source]

Set the naming pattern of joints

@type joint_naming: str @param joint_naming: The naming pattern of joints

@rtype: RigLogic @returns: The instance of the changed object

with_name(name: str) dna_viewer.config.rig_logic.RigLogic[source]

Set the name of the rig logic node

@type name: str @param name: The name of the rig logic node

@rtype: RigLogic @returns: The instance of the changed object

dna_viewer.config.scene module

class dna_viewer.config.scene.SaveOptions(name: Optional[str] = None, extension: Optional[str] = None, destination_path: str = 'C:\\source\\MetaHuman-DNA-Calibration\\docs\\sphinx\\source')[source]

Bases: object

A class used to represent the save options

@type name
Type

str

@param name
Type

The name of the scene

@type extension
Type

str

@param extension
Type

The extension

@type destination_path
Type

str

@param destination_path
Type

The location where the scene should be saved, if no value provided it defaults to the current working directory

destination_path: str = 'C:\\source\\MetaHuman-DNA-Calibration\\docs\\sphinx\\source'
extension: str = None
get_path() str[source]

Returns the file path

@rtype: str @returns: The file path

name: str = None
class dna_viewer.config.scene.Scene(dna_path: typing.Optional[str] = None, characters: typing.List[dna_viewer.config.character.Character] = <factory>, units: dna_viewer.config.units.Unit = <factory>, create_new_scene: bool = True, save_options: typing.Optional[dna_viewer.config.scene.SaveOptions] = None)[source]

Bases: object

A class used to represent the scene config

@type dna_path
Type

str

@param dna_path
Type

The location of the DNA file

@type characters
Type

List[Character]

@param characters
Type

The list of character configuration objects that need to be processed for the scene

@type units
Type

Unit

@param units
Type

The configuration containing the units for the scene

@type create_new_scene
Type

bool

@param create_new_scene
Type

A flag representing whether a new should be created when the build process starts

@type save_options
Type

SaveOptions

@param save_options
Type

A flag representing whether the created meshes should be assigned to a display layer

characters: List[dna_viewer.config.character.Character]
create_new_scene: bool = True
dna_path: str = None
save_options: Optional[dna_viewer.config.scene.SaveOptions] = None
units: dna_viewer.config.units.Unit
with_angle_unit(unit: dna_viewer.config.units.AngleUnit) dna_viewer.config.scene.Scene[source]

Set the angle unit for the scene

@type unit: str @param unit: The angle unit name

@rtype: Scene @returns: The instance of the changed object

with_character(character: dna_viewer.config.character.Character) dna_viewer.config.scene.Scene[source]

Adds a character to the list of characters that need to be processed

@type character: Character @param character: The character configuration object

@rtype: Scene @returns: The instance of the changed object

with_create_new_scene(create_new_scene: bool) dna_viewer.config.scene.Scene[source]

Set the flag representing whether a new should be created when the build process starts

@type create_new_scene: bool @param create_new_scene: The flag representing whether a new should be created when the build process starts

@rtype: Scene @returns: The instance of the changed object

with_linear_unit(unit: dna_viewer.config.units.LinearUnit) dna_viewer.config.scene.Scene[source]

Set the linear unit for the scene

@type unit: str @param unit: The linear unit name

@rtype: Scene @returns: The instance of the changed object

with_scene_file_path(name: str = 'untitled_scene', extension: str = 'mb', destination_path: Optional[str] = None) dna_viewer.config.scene.Scene[source]

Set the scene save configuration

@type name: str @param name: The name of the scene

@type extension: str @param extension: The extension

@type destination_path: str @param destination_path: The location where the scene should be saved

@rtype: Scene @returns: The instance of the changed object

Module contents