IC8 Python API
Contents
- Main article: Main Page.
Scripting in iClone
Scripting can be a powerful part of your arsenal for dealing with 3D art production. Whether you are looking for a way to automate some parts of your workflow or develop more advanced toolkits and plugins, scripting can offer something for everyone. iClone Python API gives access to the robust low-level implementations hidden within iClone while abstracting its complexity to a manageable level.
Why Python?
Python is a general-purpose language, which means it can be used to build just about any program — a process made easy with the right tools and code libraries. Professionally, Python is great for backend web development, data analysis, artificial intelligence, and scientific computing. Many developers have also used Python to build productivity tools, games, and desktop apps, so there are plenty of resources to help you learn how to create those as well.
Python is easy to pick up for experienced programmers coming from other languages and easy to learn for beginners and novices. Which can also explain its widespread support with 3D software with the likes of Autodesk 3dsMax, Autodesk Maya, Maxon Cinema4d, Blender, etc.
Reallusion cannot be held responsible for any damages to your code or project schedule as a result of your study and use of this documentation or correspondence with our SDK support team. Reallusion is not obliged to make any changes to the SDK at your request. When using this reference or inquiring for support, you do so at your own risk.
Module & Class Documentation
iClone 8 Code Examples
- Enforcing Plugin Compatibility
- Dealing with Custom FPS
- End Effector Animation
- Facial Animation
- Smart Content Manager
Getting Started
iClone Conventions
- World Axis: Z up, -Y forward, Right-handed Coordinate system
- Rotational System: Quaternion, Matrix3 or Euler Angle ( Radians )
- Scale Units: 1 equals to 100% scale.
- Time Units: 1 equals to 1 millisecond and 1,000 equals to 1 second.
User Interface
iClone 8 adopts Python 3.8 and Qt 5.15.2. You'll need to initialize PySide2 with the following code, otherwise, the script will not load correctly and a syntax error will appear in the console log.
1 from shiboken2 import wrapInstance
2 QtCore.QStringListModel
For more information, see the Qt for Python Documentation.
Deprecation of Motion Bones
In iClone 7, all character movements are driven by motion bones which is a set of standard bone structures with a fixed structure and names. Animations are first applied to motion bones, and then retargeted to the character's skin bones in real-time (as shown below).
However, motion bone offsets became incrementally severe as animations were repeatedly exported and imported to and from third-party 3D software. For iClone 8, the entire motion bone skeleton has been removed with two major implications. One is that multiple transfers of animation between similar skeleton structures are guaranteed to have consistently identical results. The other implication is that retargeting is only performed for skeletons of different structures.
Deprecated Functions
Due to the removal of motion bones, the corresponding functions in the Python API have also been removed. Functions related to motion bones in iClone 7, such as GetMotionBones() and GetRootPositionRetargetingRatio() in the RISkeletonComponent class, is no longer available in iClone 8.
External Resources
Uploading and Managing Marketplace Plugins
Developers wishing to offer their plugins in the Reallusion Marketplace will find the following guide useful.
Release Cycles
The Python APIs are continuously being expanded which lends to shorter release cycles that expose features in the early to intermediate stages of development. This strategy provides instantaneous feedback for developing features while providing insights into user requirements. Feature releases come in two forms:
- Early Access Features - We may deprecate this functionality at our discretion. However, we support backward compatibility for assets, and this feature's API should be stable.
- Experimental Features - We do not support backward compatibility for assets, the API for this feature is subject to change, and we may remove functionality at our discretion.