Load and Save Options — Aspose.3D FOSS for Python API Reference
ColladaSaveOptions
すべてのインポートおよびエクスポート操作は、から派生したオプションオブジェクト(任意)を受け入れます 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
ObjLoadOptions.
追加プロパティ(超えて IOConfig):
| ColladaSaveOptions | ColladaSaveOptions | ColladaSaveOptions |
|---|---|---|
encoding | `str | None` |
SaveOptions
Properties.
追加プロパティ(超えて 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 material file を書き出し、そこから参照する .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 | 参照されたテクスチャを出力パッケージにコピーします (inherited from 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
GltfSaveOptions.
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
シーンをバイナリ GLB としてエクスポートし、UV 座標をそのまま保持します。.
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リリースでは、追加のフォーマット固有プロパティは文書化されていません。.