API reference for aspose-3d-foss 26.1.0 (Python 3.7 – 3.12, MIT license).
All classes are imported from the aspose.threed package or its sub-packages. The root import is:
Core Scene Graph
| Class | Description |
|---|
Scene | Top-level container for all 3D scene data. Holds the root node, asset metadata, and animation clips. Exposes from_file(), open(), and save() as the primary I/O entry points. |
Node | A named node in the scene hierarchy. Owns a list of child nodes and a list of attached Entity objects such as meshes, cameras, and lights. Carries a local Transform. |
Entity | Abstract base class for all objects that can be attached to a Node. Provides name and identity but no geometry of its own. |
SceneObject | Base class shared by Node and Entity. Provides the property collection interface used for user-defined metadata. |
A3DObject | Root base class for all Aspose.3D managed objects. Exposes the name property and the Properties collection. |
INamedObject | Interface that guarantees a name property. Implemented by Node, Entity, and several format-specific descriptor types. |
Geometry and Mesh
| Class | Description |
|---|
Mesh | Polygon mesh entity. Stores control points (vertex positions as Vector4), polygon face lists (lists of control-point indices), and vertex element layers (normals, UVs, vertex colours). |
Geometry | Abstract base for mesh-like geometry types. Defines the control-point array and the collection of VertexElement layers. Mesh inherits from Geometry. |
VertexElement | Abstract base for a data layer attached to geometry (normals, UVs, colours, etc.). Carries mapping_mode, reference_mode, and a data list. |
VertexElementNormal | Stores one normal vector per vertex or per polygon corner, depending on mapping_mode. Data values are Vector4 instances with w unused. |
VertexElementUV | Stores texture-coordinate pairs (Vector2) per vertex or per polygon corner. A mesh may carry multiple UV layers for different texture channels. |
VertexElementVertexColor | Stores per-vertex or per-corner RGBA colour data as Vector4 (r, g, b, a in the range 0–1). |
VertexElementSmoothingGroup | Stores per-polygon smoothing group integer IDs, used by the OBJ importer to reproduce the original smoothing group assignments from the source file. |
VertexElementType | Enumeration identifying the semantic role of a vertex element layer: NORMAL, UV, VERTEX_COLOR, SMOOTHING_GROUP, and others. Pass values to Mesh.get_element(). |
MappingMode | Enumeration controlling which primitive a vertex element value maps to: CONTROL_POINT, POLYGON_VERTEX, POLYGON, EDGE, or ALL_SAME. |
ReferenceMode | Enumeration controlling how values are indexed: DIRECT (one value per mapping primitive) or INDEX_TO_DIRECT (values array plus a separate indices array). |
PolygonModifier | Static utility class with methods to triangulate Mesh objects and entire Scene graphs. |
Transform and Spatial
| Class | Description |
|---|
Transform | Local transformation attached to a Node. Provides translation, rotation (as Quaternion), and scale components, plus convenience properties for Euler angles. |
GlobalTransform | Read-only view of a node’s world-space transformation after composing all ancestor transforms. Accessed via Node.global_transform. |
AssetInfo | Metadata block attached to a Scene. Stores authoring application name, unit name, unit scale factor, coordinate system axis definitions, and creation/modification timestamps. |
Materials and Shading
| Class | Description |
|---|
Material | Abstract base class for all material types. Provides a name and a property collection for numeric and colour parameters. |
LambertMaterial | Diffuse-only material model. Stores ambient colour, diffuse colour, emissive colour, and transparency. Loaded from OBJ files that use basic Ka/Kd/Ke declarations. |
PhongMaterial | Extends LambertMaterial with specular colour and shininess (specular exponent). Loaded from OBJ files that use Ks/Ns declarations. |
PbrMaterial | Physically Based Rendering material. Stores albedo, metallic factor, roughness factor, and associated textures. Used by glTF 2.0 and other PBR-capable formats. |
Camera and Lighting
| Class | Description |
|---|
Camera | Camera entity. Only projection_type and name are functional in this edition; all other numeric properties (near_plane, far_plane, field_of_view, aspect_ratio) are stubs that return default values. Attached to a Node to define viewpoint transforms. |
Light | Light-source entity. Stores light type (light_type). Inherits from Camera as a stub class. |
LightType | Enumeration of supported light categories: POINT, DIRECTIONAL, SPOT, AREA, VOLUME. |
ProjectionType | Enumeration of camera projection modes: PERSPECTIVE and ORTHOGRAPHIC. |
Math Utilities
| Class | Description |
|---|
Vector2 | Double-precision 2-component vector (x, y). Used for UV texture coordinates. |
Vector3 | Double-precision 3-component vector (x, y, z). Used for positions, directions, and scale. |
Vector4 | Double-precision 4-component vector (x, y, z, w). Used for control points (homogeneous positions) and normal data. |
FVector2 | Single-precision 2-component float vector. Used internally for compact storage in vertex element data arrays. |
FVector3 | Single-precision 3-component float vector. Appears in vertex element data arrays for normals and tangents. |
FVector4 | Single-precision 4-component float vector. The storage type of VertexElementFVector.data. |
Quaternion | Unit quaternion for representing rotations (w, x, y, z). Used by Transform.rotation. |
Matrix4 | 4×4 double-precision transformation matrix. Used for world/local transform computations and can be constructed from TRS decompositions. |
BoundingBox | Axis-aligned bounding box defined by minimum and maximum Vector3 corners. Used for spatial queries and frustum culling helpers. |
Animation
| Class | Description |
|---|
AnimationClip | Named container for a set of animated channels covering one playback range. A Scene may hold multiple clips (e.g., “Walk”, “Run”). |
AnimationNode | Binds an AnimationClip to a specific scene node or property. Acts as the bridge between clip data and scene graph objects. |
AnimationChannel | A single animated property stream within a clip, targeting a named property on an object (e.g., Transform.translation.x). |
KeyFrame | A single time–value sample within a KeyframeSequence. Stores the time (in seconds) and the value at that time. |
KeyframeSequence | An ordered list of KeyFrame objects for one scalar channel, together with interpolation and extrapolation settings. |
Interpolation | Enumeration of interpolation modes between keyframes: CONSTANT, LINEAR, BEZIER, B_SPLINE, CARDINAL_SPLINE, TCB_SPLINE. |
ExtrapolationType | Enumeration of behaviours beyond the first and last keyframe: CONSTANT, GRADIENT, CYCLE, CYCLE_RELATIVE, OSCILLATE. |
Format I/O
| Symbol | Description |
|---|
Scene.from_file(path) | Static method. Opens the file at path, detects the format from the extension, and returns a populated Scene. Raises on file-not-found or unsupported format. |
Scene.open(path, options=None) | Instance method. Opens a file into an existing Scene instance, optionally using a format-specific LoadOptions subclass. |
Scene.save(path, options=None) | Instance method. Serialises the scene to path using the format inferred from the extension, optionally using a format-specific SaveOptions subclass. |
FileFormat | Registry of supported file formats. Contains entries such as FileFormat.WAVEFRONT_OBJ(), FileFormat.GLTF2(), FileFormat.FBX7400ASCII(), FileFormat.COLLADA. |
IOService | Internal I/O abstraction used by format importers and exporters. Not typically used directly by application code. |
LoadOptions | Base class for all format-specific load-option objects. Subclassed by ObjLoadOptions, StlLoadOptions, GltfLoadOptions, FbxLoadOptions, ColladaLoadOptions, ThreeMfLoadOptions. |
SaveOptions | Base class for all format-specific save-option objects. Subclassed by ObjSaveOptions, StlSaveOptions, GltfSaveOptions, FbxSaveOptions, ColladaSaveOptions, ThreeMfSaveOptions. |
OBJ Format
| Class | Description |
|---|
ObjImporter | Internal importer class that parses Wavefront OBJ and MTL files. Invoked automatically by Scene.from_file() for .obj extensions. |
ObjLoadOptions | Load options for Wavefront OBJ files. Key properties: flip_coordinate_system, scale, enable_materials, normalize_normal. |
ObjSaveOptions | Save options for Wavefront OBJ output. Controls normals, UVs, material references, and point-cloud mode. |
ObjFormat | Format descriptor for Wavefront OBJ. Accessible as FileFormat.WAVEFRONT_OBJ(). |
STL Format
| Class | Description |
|---|
StlImporter | Internal importer that reads both binary and ASCII STL files. Selected automatically by extension. |
StlExporter | Internal exporter that writes STL. |
StlLoadOptions | Load options for STL files. Supports flip_coordinate_system and scale. |
StlSaveOptions | Save options for STL output. Controls binary_mode, scale, and flip_coordinate_system. |
StlFormat | Format descriptor for STL. |
glTF Format
| Class | Description |
|---|
GltfLoadOptions | Load options for glTF 2.0 and GLB files. Key property: flip_tex_coord_v. |
GltfSaveOptions | Save options for glTF 2.0 output. Use binary_mode=True for a self-contained GLB package. |
GltfFormat | Format descriptor for glTF 2.0 / GLB. Accessible as FileFormat.GLTF2(). |
FBX Format
| Class | Description |
|---|
FbxLoadOptions | Load options for FBX files. Key properties: keep_builtin_global_settings, compatible_mode. |
FbxSaveOptions | Save options for FBX output. Controls compression, texture embedding, and material properties. |
FbxFormat | Format descriptor for FBX. Accessible as FileFormat.FBX7400ASCII(). |
COLLADA Format
| Class | Description |
|---|
ColladaLoadOptions | Load options for COLLADA (.dae) files. Controls axis remapping and unit scale on import. |
ColladaSaveOptions | Save options for COLLADA output. Controls indented, flip_coordinate_system, and material export. |
ColladaFormat | Format descriptor for COLLADA. Accessible as FileFormat.COLLADA. |
3MF Format
| Class | Description |
|---|
ThreeMfLoadOptions | Load options for 3MF (.3mf) files. |
ThreeMfSaveOptions | Save options for 3MF output. 3MF is the preferred format for 3D printing workflows. |
ThreeMfFormat | Format descriptor for 3MF. Accessible as FileFormat.MICROSOFT_3MF_FORMAT(). |
Enumerations
| Enumeration | Description |
|---|
Axis | Identifies a coordinate axis: X_AXIS, Y_AXIS, Z_AXIS. Used in coordinate-system remapping options. |
CoordinateSystem | Specifies handedness convention: RIGHT_HAND or LEFT_HAND. |
TextureMapping | Identifies how a texture is mapped to geometry: DIFFUSE, SPECULAR, EMISSIVE, NORMAL, AMBIENT, etc. |
BooleanOperation | CSG Boolean operation type recorded in source files: ADD (union), SUB (subtraction), INTERSECT. |
Properties System
| Class | Description |
|---|
Property | A single named typed property on an A3DObject. Stores the property name, type descriptor, and current value. |
PropertyCollection | Iterable collection of Property objects attached to an A3DObject. Supports lookup by name and iteration over all defined properties. |
CustomObject | A lightweight A3DObject subclass that carries only a name and an arbitrary PropertyCollection. Used for storing user-defined metadata on scene objects. |
Image and Render
| Class | Description |
|---|
ImageRenderOptions | Options for software rasterisation when rendering a scene to an image buffer. Stores background colour, image dimensions, and camera reference. This feature is available in supported configurations. |
See Also