dna_viewer.builder package
Submodules
dna_viewer.builder.analog_gui module
- class dna_viewer.builder.analog_gui.AnalogGui(options: Optional[dna_viewer.config.analog_gui.AnalogGui] = None)[source]
Bases:
object
A builder class used for manipulating the AnalogGuiConfig used in the character building process
- @type gui_path
- Type
str
- @param gui_path
- Type
The location of the gui file
dna_viewer.builder.character module
- class dna_viewer.builder.character.Character(dna: dna_viewer.model.dna.DNA, config: Optional[dna_viewer.config.character.Character] = None)[source]
Bases:
object
A builder class used for building the character
- @type config
- Type
CharacterConfig
- @param config
- Type
The character configuration options used for building the character
- build() dna_viewer.builder.character.CharacterBuildResult [source]
Builds the character
- class dna_viewer.builder.character.CharacterBuildResult[source]
Bases:
object
A class used for returning data after finishing the character build process
- @type nodes
- Type
Dict[int, List[MObject]]
- @param nodes
- Type
The PyNode objects created in the build process by LOD number
- static create(nodes: Dict[int, List[OpenMaya.MObject]]) dna_viewer.builder.character.CharacterBuildResult [source]
Character creator method returning a character build result object
@type nodes: Dict[int, List[MObject]] @param nodes: The PyNode objects created in the build process by LOD number
- nodes: Dict[int, List[OpenMaya.MObject]] = {}
dna_viewer.builder.gui module
- class dna_viewer.builder.gui.Gui(options: Optional[dna_viewer.config.gui.Gui] = None)[source]
Bases:
object
A builder class used for manipulating the GuiConfig used in the character building process
- @type gui_path
- Type
str
- @param gui_path
- Type
The location of the gui file
dna_viewer.builder.joint module
- class dna_viewer.builder.joint.Joint(joints: List[dna_viewer.model.joint.Joint], linear_modifier: float, angle_modifier: float)[source]
Bases:
object
A builder class used for adding joints to the scene
- @type joints
- Type
List[JointModel]
- @param joints
- Type
data representing the joints
- @type linear_modifier
- Type
float
- @param linear_modifier
- Type
The linear modifier that should be applied to the joints
- @type angle_modifier
- Type
float
- @param angle_modifier
- Type
The linear modifier that should be applied to the joints
- @type joint_flags
- Type
Dict[str, bool]
- @param joint_flags
- Type
A mapping used for setting flags that are used to avoid adding the same joint multiple times
- add_joint_to_scene(joint: dna_viewer.model.joint.Joint) None [source]
Adds the given joint to the scene
@type joint: JointModel @param joint: The joint to be added to the scene
dna_viewer.builder.maya_mesh module
- class dna_viewer.builder.maya_mesh.MayaMesh(config: dna_viewer.config.mesh.Mesh, dna: dna_viewer.model.dna.DNA)[source]
Bases:
object
A builder class used for adding joints to the scene
- @type config
- Type
MeshConfig
- @param config
- Type
The mesh configuration options used for creating meshes
- @type data
- Type
MeshModel
- @param data
- Type
mesh data used in the mesh creation process
- @type fn_mesh
- Type
om.MFnMesh
- @param fn_mesh
- Type
OpenMaya class used for creating the mesh
- @type mesh_object
- Type
om.MObject
- @param mesh_object
- Type
the object representing the mesh
- @type dag_modifier
- Type
om.MDagModifier
- @param dag_modifier
- Type
OpenMaya class used for naming the mesh
- add_blend_shapes(add_mesh_name_to_blend_shape_channel_name: bool) None [source]
Adds blend shapes to the mesh
dna_viewer.builder.mesh module
- class dna_viewer.builder.mesh.Mesh(character_config: dna_viewer.config.character.Character, dna: dna_viewer.model.dna.DNA, mesh_index: int)[source]
Bases:
object
A builder class used for adding joints to the scene
- @type dna
- Type
- @param dna
- Type
The location of the DNA file
- @type mesh_index
- Type
int
- @param mesh_index
- Type
The mesh index we are working with
- @type joint_ids
- Type
List[int]
- @param joint_ids
- Type
The joint indices used for adding skin
- @type joint_names
- Type
List[str]
- @param joint_names
- Type
The joint names used for adding skin
- @type options
- Type
- @param options
- Type
The build options that will be applied when creating the mesh
- @type modifiers
- Type
- @param modifiers
- Type
Space modifiers that should be applied when creating the mesh
- @type config
- Type
- @param config
- Type
The character configuration options used for getting information about the DNA path, build options and space modifiers
- @type mesh
- Type
MayaMeshBuilder
- @param mesh
- Type
The builder class object for creating the meshes
- @type dna
- Type
- @param dna
- Type
The DNA object that was loaded in
- add_blend_shapes() None [source]
Reads in the blend shapes, then adds them to the mesh if it is set in the build options
dna_viewer.builder.rig_logic module
- class dna_viewer.builder.rig_logic.RigLogic(config: Optional[dna_viewer.config.rig_logic.RigLogic] = None)[source]
Bases:
object
A builder class used for adding joints to the scene
- @type config
- Type
RigLogicConfig
- @param config
- Type
The rig logic configuration containing naming options used for creating the execution string that will be called from maya to create the rig logic
dna_viewer.builder.scene module
- class dna_viewer.builder.scene.Scene(config: Optional[dna_viewer.config.scene.Scene] = None)[source]
Bases:
object
A builder class used for building the character
- @type config
- Type
Optional[SceneConfig]
- @param config
- Type
The scene configuration options used for building the scene
- build() dna_viewer.builder.scene.SceneResult [source]
Starts the scene building process
- build_scene(build_result: dna_viewer.builder.scene.SceneResult) None [source]
Builds the scene for the configuration from @config
@type build_result: SceneResult @param build_result: The SceneResult object that will contain results
- exception dna_viewer.builder.scene.SceneError(message: str)[source]
Bases:
dna_viewer.util.error.DNAViewerError
An error class that inherits DNAViewerError and gets raised in the scene building process
- class dna_viewer.builder.scene.SceneResult[source]
Bases:
object
A class used for returning data after finishing the scene build process
- @type character_results
- Type
List[CharacterBuildResult]
- @param character_results
- Type
A list of all character build results from the scene building process
- character_results: List[dna_viewer.builder.character.CharacterBuildResult] = []