3. IVuPy Specifics

The lifetime of Python objects is managed by reference counting which is almost completely hidden from the Python programmer. Open Inventor implements a colloborative form of reference counting and the the C++ programmer has to know when to use it. Section 3.2 explains how IVuPy does the Open Inventor reference counting for you.

Section 3.3 deals with the transfer of data between the Open Inventor data structures and the Numerical Python arrays.

SIP does not wrap the public member data of C++ classes as well as the member functions. Section 3.4 gives a few tips on how to access the class attributes.

Section 3.5 explains the (automatic) conversion from Python strings to the Open Inventor classes SbName and SbString.

Open Inventor and Qt handle null pointer arguments differently; and the difference is reflected in the handling of a None argument in IVuPy. Section 3.6 explains why IVuPy raises an exception to prevent abnormal program termination by intercepting None arguments.

C++ callback functions in Open Inventor play the role of slots in Qt. The Python interface to the C++ callback functions is explained in section 3.7.



Subsections