IC Python API:Bounding Info

From Reallusion Wiki!
Revision as of 20:16, 20 August 2019 by Chuck (RL) (Talk | contribs)

Jump to: navigation, search
Main article: RL Python Samples.
Ic python api bounding info 01.png

This article will go over the handling of bounding area data in iClone and how to derive useful bounding box size information from it. Bounds of an object are the farthest extent of its vertices in world-space coordinates, therefore, they are subject to transformational changes. This can be counter-intuitive when it comes to changing rotations where one would expect the bounding box to stay the same. However, this is not the case and it more useful to think of the bounding box as a fixed orientation where the points represented do not rotate in the object's transform space.

Required Modules and Global Variables

Besides the fundamental Reallusion Python module, we'll also need Pyside2 and os to read the QT UI file and build the user interface. We'll also need a global variable to house our UI and callback events that we'll need to link the custom user controls with those of iClone.

import RLPy
import os
from PySide2 import *
from PySide2.shiboken2 import wrapInstance

bi_events = {}  # Global dict for events and callbacks