Browse our Products

Aspose.3D for Python via .NET 24.3 Release Notes

Improvements and Changes

KeySummaryCategory
THREEDNET-1514Write more code examples o cover more methods and types.Task
THREEDNET-1523Optimize mesh causes distortionTask
THREEDNET-1516Model generated by SweptAreaSolid should not be flatBug fixing
THREEDNET-1517Metallic map and roughness map are not present when I am converting fbx to glbBug fixing

API changes

Added members to class aspose.threed.entities.Mesh:

        def optimize(self : Mesh, vertexElements : bool, toleranceControlPoint : float, toleranceNormal : float, toleranceUV : float) -> Mesh
                """ Optimize the mesh's memory usage by eliminating duplicated control points """

The new method allows you to control the tolerance for control point, normal and UV.

Added members to class aspose.threed.formats.FbxLoadOptions:

        @property
        def compatible_mode(self) -> bool:
                """Gets or sets whether to enable compatible mode.
                Compatible mode will try to support non-standard FBX definitions like PBR materials exported by Blender.
                Default value is false."""

        @compatible_mode.setter
        def compatible_mode(self, v : bool):
                """Gets or sets whether to enable compatible mode.
                Compatible mode will try to support non-standard FBX definitions like PBR materials exported by Blender.
                Default value is false."""

FBX doesn’t support PBR material, different exporter uses different definition for storing PBR material’s parameters, this parameter allows you to reconstruct PBR material as much as possible.

Added members to class aspose.threed.utilities.FileSystem:

        @staticmethod
        def create_local_file_system(directory : str) -> FileSystem
                """Initialize a new <see cref="FileSystem"/> that only access local directory.
                All file read/write on this FileSystem instance will be mapped to specified directory. """

        @staticmethod
        def create_memory_file_system(files : Optional[dict[str, Bytes]]) -> FileSystem
                """Create a memory-based file system which will maps the read/write operations to memory."""

        @staticmethod
        def create_dummy_file_system() -> FileSystem
                """Create a dummy file system, read/write operations are dummy operations."""

        @staticmethod
        def create_zip_file_system(stream : IO.BufferedIOBase, baseDir : Optional[str]) -> FileSystem
                """Create a file system to provide to the read-only access to speicified zip file or zip stream.
                File system will be disposed after the open/save operation."""

        @staticmethod
        def create_zip_file_system(fileName : str) -> FileSystem
                """File system to provide to the read-only access to speicified zip file or zip stream.
                File system will be disposed after the open/save operation."""

These methods provide quick ways to create built-in FileSystems for you.

Sample code:

    inputFile = "input.fbx"
    format = FileFormat.detect(inputFile)
    # create a load options instance and specify a local file system
    opt = format.create_load_options()
    opt.file_system = FileSystem.create_local_file_system("textures/")
    # load the file
    scene = Scene.from_file(inputFile, opt)