human.export
ExportBuilder
human/process/export.pyWrites a human to a file. Every method returns the path that was written.
The datablocks are written under their names without the number suffix of Blender, the livekeys are baked and the transparent outer layer of the eyes is left out, as most formats can't carry it.
| Methods | ||
|---|---|---|
| write() | str | Writes the human in the format of the output settings. |
| to_fbx() | — | |
| to_obj() | — | |
| to_gltf() | — | |
| to_gltf_embedded() | — | |
| to_gltf_separate() | — | |
| to_glb() | — | |
| to_abc() | — | |
Methods
human.export.write(filepath: str, output: OutputSettings, units: str = 'meters', animation: Animation = 'none', armature_only: bool = False, sample_rate: int = 0, context: C = None) → str
sourceWrites the human in the format of the output settings.
| Parameter | Type | Description |
|---|---|---|
| filepath | str | Path of the file, the extension of the format is added when missing. Its folder is made when needed. |
| output | OutputSettings | Format, exporter options and texture placement, as in a recipe. |
| units | str default 'meters' | "meters" or "centimeters", see `SkeletonSettings.units`. FBX only. |
| animation | Animation default 'none' | "none", "active" or "strips", what of the animation of the rig goes into the file. Formats with a rig only. |
| armature_only | bool default False | Only the skeleton and its animation, for a file with clips. |
| sample_rate | int default 0 | Frames per second the animation is sampled at, 0 for the frame rate of the scene, see `AnimationClipSettings.sample_rate`. FBX only. |
| context | C default None | Blender context. bpy.context if not provided. |
Returns str — The path that was written.
Raises ValueError — If the output is not a file format.
human.export.to_fbx(filepath: str, export_custom_props: bool = False, triangulate: bool = False, axis_forward: Axis = '-Z', axis_up: Axis = 'Y', primary_bone_axis: Axis = 'Y', secondary_bone_axis: Axis = 'X', use_leaf_bones = False, apply_scale_options: str = 'FBX_SCALE_NONE', mesh_smooth_type: str = 'FACE', path_mode: str = 'AUTO', embed_textures: bool = False, animation: Animation = 'active', armature_only: bool = False, bake_anim_step: float = 1.0, bake_textures: bool = False, context: C = None)
sourceNo description yet.
| Parameter | Type | Description |
|---|---|---|
| filepath | str | — |
| export_custom_props | bool default False | — |
| triangulate | bool default False | — |
| axis_forward | Axis default '-Z' | — |
| axis_up | Axis default 'Y' | — |
| primary_bone_axis | Axis default 'Y' | — |
| secondary_bone_axis | Axis default 'X' | — |
| use_leaf_bones | default False | — |
| apply_scale_options | str default 'FBX_SCALE_NONE' | — |
| mesh_smooth_type | str default 'FACE' | — |
| path_mode | str default 'AUTO' | — |
| embed_textures | bool default False | — |
| animation | Animation default 'active' | — |
| armature_only | bool default False | — |
| bake_anim_step | float default 1.0 | — |
| bake_textures | bool default False | — |
| context | C default None | — |
human.export.to_obj(filepath: str, apply_modifiers: bool = True, triangulate: bool = False, export_vertex_groups: bool = False, path_mode: Literal['AUTO', 'ABSOLUTE', 'RELATIVE', 'MATCH', 'STRIP', 'COPY'] = 'AUTO', axis_forward: Axis = '-Z', axis_up: Axis = 'Y', bake_textures: bool = False, context: C = None)
sourceNo description yet.
| Parameter | Type | Description |
|---|---|---|
| filepath | str | — |
| apply_modifiers | bool default True | — |
| triangulate | bool default False | — |
| export_vertex_groups | bool default False | — |
| path_mode | Literal['AUTO', 'ABSOLUTE', 'RELATIVE', 'MATCH', 'STRIP', 'COPY'] default 'AUTO' | — |
| axis_forward | Axis default '-Z' | — |
| axis_up | Axis default 'Y' | — |
| bake_textures | bool default False | — |
| context | C default None | — |
No description yet.
| Parameter | Type | Description |
|---|---|---|
| filepath | str | — |
| bake_textures | bool default False | — |
| context | C default None | — |
human.export.to_gltf_embedded(filepath: str, bake_textures: bool = False, context: C = None)
sourceNo description yet.
| Parameter | Type | Description |
|---|---|---|
| filepath | str | — |
| bake_textures | bool default False | — |
| context | C default None | — |
human.export.to_gltf_separate(filepath: str, image_format: Literal['AUTO', 'JPEG'] = 'AUTO', tangents: bool = False, draco: bool = False, animation: Animation = 'none', armature_only: bool = False, bake_textures: bool = False, context: C = None)
sourceNo description yet.
| Parameter | Type | Description |
|---|---|---|
| filepath | str | — |
| image_format | Literal['AUTO', 'JPEG'] default 'AUTO' | — |
| tangents | bool default False | — |
| draco | bool default False | — |
| animation | Animation default 'none' | — |
| armature_only | bool default False | — |
| bake_textures | bool default False | — |
| context | C default None | — |
human.export.to_glb(filepath: str, image_format: Literal['AUTO', 'JPEG'] = 'AUTO', tangents: bool = False, draco: bool = False, animation: Animation = 'none', armature_only: bool = False, bake_textures: bool = False, context: C = None)
sourceNo description yet.
| Parameter | Type | Description |
|---|---|---|
| filepath | str | — |
| image_format | Literal['AUTO', 'JPEG'] default 'AUTO' | — |
| tangents | bool default False | — |
| draco | bool default False | — |
| animation | Animation default 'none' | — |
| armature_only | bool default False | — |
| bake_textures | bool default False | — |
| context | C default None | — |
No description yet.
| Parameter | Type | Description |
|---|---|---|
| filepath | str | — |
| bake_textures | bool default False | — |
| context | C default None | — |