Load and Save Options — Aspose.3D FOSS for Python API Reference
ColladaSaveOptions
모든 import 및 export 작업은 파생된 선택적 옵션 객체를 허용합니다 LoadOptions 또는 SaveOptions. 적절한 서브클래스를 전달하십시오 Scene.open() 또는 Scene.save() 형식별 동작을 제어하기 위해.
ColladaSaveOptions: aspose.threed.formats
from aspose.threed.formats import (
LoadOptions, SaveOptions,
ObjLoadOptions, ObjSaveOptions,
GltfLoadOptions, GltfSaveOptions,
StlLoadOptions, StlSaveOptions,
FbxLoadOptions, FbxSaveOptions,
ColladaLoadOptions, ColladaSaveOptions,
ThreeMfLoadOptions, ThreeMfSaveOptions,
)ColladaSaveOptions
ColladaSaveOptions LoadOptions 그리고 SaveOptions 상속받다 IOConfig. 다음 속성은 모든 옵션 객체에서 사용할 수 있습니다.
| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|
file_format | `FileFormat | None` |
encoding | `str | None` |
file_system | `FileSystem | None` |
lookup_paths | list[str] | 외부 참조를 해결할 때 검색할 추가 디렉터리 |
file_name | `str | None` |
LoadOptions
모든 텍스처가 포함된 FBX 파일을 내보냅니다.
추가 속성 (이상 IOConfig):
| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|
encoding | `str | None` |
SaveOptions
모든 저장 옵션 객체의 기본 클래스.
추가 속성 (이상 IOConfig):
| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|
export_textures | bool | ColladaSaveOptions True, 씬에서 참조된 텍스처가 출력물에 복사됩니다. 기본값은 False |
ObjLoadOptions
Wavefront OBJ 파일에 대한 로드 옵션 (.obj).
from aspose.threed.formats import ObjLoadOptions
opts = ObjLoadOptions()
opts.flip_coordinate_system = True
opts.scale = 0.01
scene = Scene()
scene.open("model.obj", opts)| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|---|
flip_coordinate_system | bool | False | 가져오기 시 좌표계를 뒤집기 |
enable_materials | bool | True | 동반되는 파일을 로드 .mtl 재질 파일 |
scale | float | 1.0 | 가져온 모든 기하에 균일 스케일 적용 |
normalize_normal | bool | True | 가져온 법선 벡터를 단위 길이로 정규화 |
ObjSaveOptions
Wavefront OBJ 파일에 대한 저장 옵션.
from aspose.threed.formats import ObjSaveOptions
opts = ObjSaveOptions()
opts.enable_materials = False
scene.save("output.obj", opts)| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|---|
apply_unit_scale | bool | False | 장면의 단위 스케일 계수를 내보낸 좌표에 적용 |
point_cloud | bool | False | 정점만 내보내기 (폴리곤 면 제외) |
verbose | bool | False | 출력에 추가 OBJ 주석 포함 |
serialize_w | bool | False | 제어점의 W 구성 요소 기록 |
enable_materials | bool | True | 작성 .mtl 재질 파일을 만들고 이를 다음에서 참조 .obj |
flip_coordinate_system | bool | False | 내보낼 때 좌표계 뒤집기 |
axis_system | `AxisSystem | None` | None |
GltfLoadOptions
glTF 2.0 및 GLB 파일에 대한 로드 옵션 (.gltf, .glb).
from aspose.threed.formats import GltfLoadOptions
opts = GltfLoadOptions()
opts.flip_tex_coord_v = False
scene = Scene()
scene.open("model.gltf", opts)| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|---|
flip_tex_coord_v | bool | True | 가져올 때 V 텍스처 좌표 뒤집기 (glTF는 좌상단 원점을 사용; True 하단 좌측으로 변환) |
GltfSaveOptions
glTF 2.0 출력에 대한 저장 옵션.
from aspose.threed.formats import GltfSaveOptions
opts = GltfSaveOptions()
opts.binary_mode = True # produce a .glb file
scene.save("output.glb", opts)| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|---|
binary_mode | bool | False | ColladaSaveOptions True, 자체 포함 바이너리 GLB를 기록; when False, JSON을 기록 .gltf 외부 버퍼와 함께 |
flip_tex_coord_v | bool | True | 내보낼 때 V 텍스처 좌표를 뒤집기 |
export_textures | bool | False | 참조된 텍스처를 출력 패키지에 복사 (상속됨 SaveOptions) |
StlLoadOptions
STL 파일에 대한 로드 옵션 (.stl).
from aspose.threed.formats import StlLoadOptions
opts = StlLoadOptions()
opts.scale = 0.001 # convert millimetres to metres
scene = Scene()
scene.open("part.stl", opts)| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|---|
flip_coordinate_system | bool | False | 가져오기 시 좌표계 뒤집기 |
scale | float | 1.0 | 가져온 기하에 균일 스케일 적용 |
StlSaveOptions
STL 출력에 대한 저장 옵션.
from aspose.threed.formats import StlSaveOptions
opts = StlSaveOptions()
opts.binary_mode = True
scene.save("output.stl", opts)| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|---|
flip_coordinate_system | bool | False | 내보내기 시 좌표계 뒤집기 |
scale | float | 1.0 | 내보낸 기하에 균일 스케일 적용 |
binary_mode | bool | False | ASCII STL 대신 바이너리 STL 쓰기 |
FbxLoadOptions
FBX 파일 로드 옵션 (.fbx).
from aspose.threed.formats import FbxLoadOptions
opts = FbxLoadOptions()
opts.keep_builtin_global_settings = True
scene = Scene()
scene.open("animation.fbx", opts)| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|---|
keep_builtin_global_settings | bool | False | FBX 보존 GlobalSettings 씬 에셋 정보의 속성 |
compatible_mode | bool | False | 구형 저작 도구에서 만든 FBX 파일에 대한 호환 모드 활성화 |
FbxSaveOptions
StlLoadOptions는 LoadOptions를 확장하며 현재 버전에서는 추가적인 사용자-facing 속성을 제공하지 않습니다.
from aspose.threed.formats import FbxSaveOptions
opts = FbxSaveOptions()
opts.enable_compression = False
scene.save("output.fbx", opts)| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|---|
export_textures | bool | False | 참조된 텍스처를 출력 디렉터리로 복사 |
reuse_primitive_mesh | bool | False | 출력에서 동일한 메시 기하를 중복 제거 |
enable_compression | bool | True | 바이너리 FBX 내부 압축 활성화 |
fold_repeated_curve_data | ColladaSaveOptions | None | 동일한 애니메이션 커브 구간을 합치기 |
export_legacy_material_properties | bool | True | 레거시 포함 Phong/Lambert 호환성을 위한 재질 속성 노드 |
video_for_texture | bool | False | FBX 비디오 노드에 텍스처 데이터 삽입 |
embed_textures | bool | False | FBX 바이너리 내에 텍스처 파일을 인라인으로 포함 |
generate_vertex_element_material | bool | False | 추가 VertexElementMaterial 다각형별 재질 할당을 위한 레이어 |
ColladaLoadOptions
COLLADA 파일에 대한 로드 옵션 (.dae).
from aspose.threed.formats import ColladaLoadOptions
opts = ColladaLoadOptions()
opts.scale = 0.01
scene = Scene()
scene.open("model.dae", opts)| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|---|
flip_coordinate_system | bool | False | 가져올 때 좌표계를 뒤집기 |
enable_materials | bool | True | COLLADA 재질 정의 가져오기 |
scale | float | 1.0 | 가져온 기하에 균일 스케일 적용 |
normalize_normal | bool | True | 가져온 법선 벡터 정규화 |
ColladaSaveOptions
COLLADA 출력에 대한 저장 옵션.
from aspose.threed.formats import ColladaSaveOptions
opts = ColladaSaveOptions()
opts.indented = False # compact output
scene.save("output.dae", opts)| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|---|
flip_coordinate_system | bool | False | 내보낼 때 좌표계 뒤집기 |
enable_materials | bool | True | COLLADA 재질 정의 쓰기 |
indented | bool | True | 들여쓰기를 적용해 XML 출력물을 보기 좋게 포맷 |
ThreeMfLoadOptions / ThreeMfSaveOptions
3MF 파일에 대한 로드 및 저장 옵션 (.3mf).
from aspose.threed.formats import ThreeMfLoadOptions, ThreeMfSaveOptions
# Load
load_opts = ThreeMfLoadOptions()
scene = Scene()
scene.open("part.3mf", load_opts)
# Save
save_opts = ThreeMfSaveOptions()
scene.save("output.3mf", save_opts)이 클래스들은 다음으로부터 기본 속성을 상속받습니다 LoadOptions / SaveOptions 각각. 현재 FOSS 릴리스에 대해 추가적인 포맷별 속성은 문서화되지 않았습니다.