Làm việc với Animation -- Aspose.3D FOSS cho Python
Aspose.3D FOSS cho Python cung cấp các lớp học để làm việc với hoạt hình.
Tổng quan
Các lớp học chính liên quan là:
AnimationChannelAnimationClipAnimationNode
bắt đầu
Cài đặt Aspose.3D FOSS cho Python:
pip install aspose-3d-fossSử dụng cơ bản
from aspose.threed.animation import AnimationChannel, Interpolation
channel = AnimationChannel("Rotation.X")
channel.add(0.0, 0.0, Interpolation.LINEAR)
channel.add(1.0, 90.0, Interpolation.LINEAR)
channel.add(2.0, 0.0, Interpolation.LINEAR)
print(f"Channel '{channel.name}' has {len(channel.key_frames)} keyframe(s)")Mẹo và Thực hành Tốt nhất
- Luôn loại bỏ các tài liệu đối tượng sau khi sử dụng
- Chăm sóc các ngoại lệ I/O khi đọc hoặc viết tệp
- Kiểm tra The API tham chiếu Đối với các chữ ký mới nhất
Tóm tắt Tham chiếu API
| Class | Description |
|---|---|
AnimationChannel | Xem các tài liệu tham khảo |
AnimationClip | Xem các tài liệu tham khảo |
AnimationNode | Xem các tài liệu tham khảo |
Để biết chi tiết, xem các API tham chiếu.