Difference between revisions of "IC Python API:Bounding Info"

From Reallusion Wiki!
Jump to: navigation, search
m
m
Line 2: Line 2:
 
{{Parent|IC_Python_API:RL_Python_Samples|RL Python Samples}}
 
{{Parent|IC_Python_API:RL_Python_Samples|RL Python Samples}}
  
[[File:Ic_python_api_bounding_info_01.png|frame|left]]
+
[[File:Ic_python_api_bounding_info_01.png|frame]]
  
 
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.
 
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.
 
{{clear}}
 
  
 
== Required Modules and Global Variables ==
 
== Required Modules and Global Variables ==

Revision as of 19:17, 20 August 2019

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