merge_mesh method

merge_mesh(, scene)

Convert a whole scene to a single transformed mesh Vertex elements like normal/texture coordinates are not supported yet

Returns

The merged mesh


@staticmethod
def merge_mesh(scene):
    ...
ParameterTypeDescription
sceneSceneThe scene to merge

Example

The following code shows how to merge all objects from a scene into a single mesh.

from aspose.threed import Scene
from aspose.threed.entities import PolygonModifier

# Input file may contains multiple objects
scene = Scene.from_file("input.fbx")
# now merge them into a single mesh
merged = PolygonModifier.merge_mesh(scene)
# then we save it to a file with only one mesh
newScene = Scene(merged)
newScene.save("test.obj")

merge_mesh(, nodes)


@staticmethod
def merge_mesh(nodes):
    ...
ParameterTypeDescription
nodeslist

merge_mesh(, node)

Convert a whole node to a single transformed mesh Vertex elements like normal/texture coordinates are not supported yet

Returns

Merged mesh


@staticmethod
def merge_mesh(node):
    ...
ParameterTypeDescription
nodeNodeThe node to merge

Example

The following code shows how to merge all objects from nodes into a single mesh.

from aspose.threed import Scene
from aspose.threed.entities import PolygonModifier

# Input file may contains multiple objects
scene = Scene.from_file("input.fbx")
# now merge them into a single mesh
merged = PolygonModifier.merge_mesh(scene.root_node)
# then we save it to a file with only one mesh
newScene = Scene(merged)
newScene.save("test.obj")

See Also