merge_mesh method
Contents
[
Hide
]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):
...
Parameter | Type | Description |
---|---|---|
scene | Scene | The 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):
...
Parameter | Type | Description |
---|---|---|
nodes | list |
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):
...
Parameter | Type | Description |
---|---|---|
node | Node | The 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
- module
aspose.threed.entities
- class
PolygonModifier