AssetInfo — Aspose.3D FOSS for Python API Reference

Example

AssetInfo は、…に添付されるメタデータコンテナです Scene を介して Scene.asset_info (または…へ Node を介して Node.asset_info)。ファイルの起源に関する情報を保存します:それを作成したツール、測定単位、作成/変更タイムスタンプ、そしてオプションの軸系設定です。.

AssetInfo は…から継承します A3DObject.

Example: aspose.threed

from aspose.threed import AssetInfo

Example

ExampleExample
AssetInfo()は、すべてのフィールドが空またはデフォルトの状態で構築されます
AssetInfo(name)は、オプションのオブジェクト名を指定して構築されます

Example

すべてのフィールドは読み取り可能かつ書き込み可能なプロパティです。.

作成と識別

ExampleExampleExample
titlestr資産の人間が読めるタイトル
subjectstr資産の主題またはトピック
authorstrファイルの作者名
keywordsstrアセットに関連付けられたキーワード
revisionstrバージョンまたはリビジョン文字列
commentstr自由形式のコメントまたは説明
copyrightstr著作権表示
urlstrソースURLまたは参照URI

アプリケーション情報

ExampleExampleExample
application_namestr作成アプリケーションの名前(例:., "Blender")
application_vendorstr作成アプリケーションのベンダー
application_versionstr作成アプリケーションのバージョン文字列

Example

ExampleExampleExample
creation_time`datetimeNone`
modification_time`datetimeNone`

Example

ExampleExampleExample
unit_namestr測定単位の名前(例:., "centimeter", "meter")
unit_scale_factorfloatファイルの単位からメートルへの変換スケールファクタ;デフォルトは 1.0

座標系(スタブプロパティ)

以下のプロパティは存在しますが、返されるのは None 現在のFOSSリリースでは利用できません。将来の軸リマッピングサポートのために予約されています。.

ExampleExample
coordinate_systemハンドネスの規約(右手系または左手系)
up_vectorどの軸が上方向を指すか
front_vectorどの軸が前方向を指すか
axis_system結合された軸系記述子
ambientシーンのアンビエントカラー

Example

from aspose.threed import Scene, AssetInfo
from datetime import datetime

# Load a scene and inspect its metadata
scene = Scene.from_file("model.fbx")
info = scene.asset_info

if info is not None:
    print(info.application_name)    # e.g. "Blender"
    print(info.unit_name)           # e.g. "centimeter"
    print(info.unit_scale_factor)   # e.g. 0.01

# Create metadata for an exported scene
out_scene = Scene()
out_info = AssetInfo()
out_info.title = "My Model"
out_info.author = "Alice"
out_info.application_name = "MyPipeline"
out_info.unit_name = "meter"
out_info.unit_scale_factor = 1.0
out_info.creation_time = datetime.now()
out_scene.asset_info = out_info

out_scene.save("output.glb")

参照

 日本語