Skip to content

Mesh Module

DESKTOP-6PITPE2\amade edited this page Oct 10, 2023 · 14 revisions

based_on_object

Get the mesh as seen in viewport

Argument Type Description
bucket Bucket
objAccessor tuple or str The accessor of the blender object.
normals bool Should the normals be included. Defaults to True.
tangents bool Should tangents be calculated. Defaults to False.
uvMaps bool or list[str] Include currently active UV map or explicitly include by name. Defaults to True.
vertexColors bool or list[str] Include currently active vertex color or explicitly include by name. Default to False.
skinID int ID of the skin to use for bone weights.
boneInfluenceCount int Maximum number of bone influences for each vertex. Must be multiple of 4. Defaults to 4.
shapeKeys bool or list[str] Include currently unmuted keys or explicitly include by name. Default to False.
shapeKeyNormals bool Should the shape key normals be included. Defaults to False.
checkRedundancy bool Prevent duplicates. Defaults to True.
autoAttach bool Try to automatically attach itself to it's own node. Defaults to True.
name str Override the name of the mesh.
origin tuple or str Object to use as origin point. Defaults to the same as objAccessor.

Returns: int ID of the mesh.

merged_based_on_hierarchy

Merge all the meshes in the hierarchy into one, using a custom origin point (top object by default). In case of UV maps, vertex colors and shape keys, all meshes must contain each one specified.

Argument Type Description
bucket Bucket
topObjectAccessor tuple or str The accessor of the top object.
blacklist set Exclude objects and its children.
filters list[tuple] List of object filters.
name str Specify the name of the mesh. Defaults to "NewMesh"
normals bool Should the normals be included. Defaults to True
tangents bool Should tangents be calculated. Defaults to False
uvMaps bool or list[str] Include currently active UV map or explicitly include by name, names must match in all included objects. Defaults to True.
vertexColors bool or list[str] Include currently active vertex color or explicitly include by name, names must match in all included objects. Default to False.
skinID int ID of the skin to use for bone weights.
boneInfluenceCount int Maximum number of bone influences for each vertex. Must be multiple of 4. Defaults to 4
shapeKeys bool or list[str] Include currently unmuted keys or explicitly include by name. Default to False.
shapeKeyNormals bool Should the shape key normals be included, names must match in all included objects. Defaults to False.
checkRedundancy bool Prevent duplicates. Defaults to True.
autoAttach bool Try to automatically attach itself to it's own node. Defaults to True.
origin tuple or str Object to use as origin point. Defaults to the same as topObjectAccessor

Returns: int ID of the merged mesh.

merged_based_on_list

WIP