AssetInfo — Aspose.3D FOSS for Python API Reference

Overview

AssetInfo เป็นคอนเทนเนอร์เมตาดาต้าที่แนบกับ Scene ผ่าน Scene.asset_info (หรือกับ Node ผ่าน Node.asset_info) มันเก็บข้อมูลเกี่ยวกับที่มาของไฟล์: เครื่องมือที่สร้างไฟล์, หน่วยวัด, เวลาในการสร้าง/แก้ไข, และการตั้งค่าระบบแกนที่เป็นตัวเลือก.

AssetInfo สืบทอดจาก A3DObject.

Overview: aspose.threed

from aspose.threed import AssetInfo

Overview

OverviewOverview
AssetInfo()สร้างด้วยฟิลด์ทั้งหมดว่าง/ค่าเริ่มต้น
AssetInfo(name)สร้างด้วยชื่ออ็อบเจกต์ที่เป็นตัวเลือก

Overview

ฟิลด์ทั้งหมดเป็นคุณสมบัติที่สามารถอ่านและเขียนได้.

การสร้างและการระบุตัวตน

OverviewOverviewOverview
titlestrชื่อเรื่องที่อ่านได้โดยมนุษย์ของสินทรัพย์
subjectstrหัวข้อหรือเรื่องของสินทรัพย์
authorstrชื่อของผู้เขียนไฟล์
keywordsstrคำสำคัญที่เกี่ยวข้องกับสินทรัพย์
revisionstrสตริงเวอร์ชันหรือการแก้ไข
commentstrความคิดเห็นหรือคำอธิบายแบบอิสระ
copyrightstrประกาศลิขสิทธิ์
urlstrURL แหล่งที่มาหรือ URI อ้างอิง

ข้อมูลแอปพลิเคชัน

OverviewOverviewOverview
application_namestrชื่อของแอปพลิเคชันการสร้าง (เช่น,., "Blender")
application_vendorstrผู้จำหน่ายของแอปพลิเคชันการสร้าง
application_versionstrสตริงเวอร์ชันของแอปพลิเคชันการสร้าง

Overview

OverviewOverviewOverview
creation_time`datetimeNone`
modification_time`datetimeNone`

Overview

OverviewOverviewOverview
unit_namestrชื่อของหน่วยวัด (เช่น,., "centimeter", "meter")
unit_scale_factorfloatปัจจัยสเกลเพื่อแปลงจากหน่วยของไฟล์เป็นเมตร; ค่าเริ่มต้นคือ 1.0

ระบบพิกัด (คุณสมบัติเบื้องต้น)

คุณสมบัติดังต่อไปนี้มีอยู่แต่จะคืนค่า None ในรุ่น FOSS ปัจจุบัน พวกมันถูกสงวนไว้เพื่อการสนับสนุนการแมปแกนใหม่ในอนาคต.

OverviewOverview
coordinate_systemการกำหนดมือ (ขวาหรือซ้าย)
up_vectorแกนที่ชี้ขึ้น
front_vectorแกนที่ชี้ไปข้างหน้า
axis_systemตัวบรรยายระบบแกนแบบรวม
ambientสีแสงรอบด้านของฉาก

Overview

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")

ดูเพิ่มเติม

 ภาษาไทย