Home | Trees | Indices | Help |
|
---|
|
Initialization module.
This module implements the wrappers the Composite dynamic libraries require to safely perform initialization and finalization. The Composite libraries have a sophisticated system of initialization that implements a dependency-based initialization order.
Developers need only to remember that before importing a Composite module, you must always import the init module first as follows:
import autodesk_toxik.init
Script developers should never have to import the Composite dynamic libraries directly. Instead, a Python module has been implemented for each of the corresponding dynamic libraries. Each of these modules not only ensures that the initialization module is loaded first, it also provides additional functionality in Python itself. You import these modules within a script as follows:
import autodesk_toxik.<modulename>
Or as follows:
from autodesk_toxik import <modulename>
When a script is ran in an external python interpreter, the files of the current project and user are automatically saved on finalization by default (however, project and user files are never automatically saved in the Composite embedded interpreter). The following functions control this behavior:
enableProjectSaveOnFinalization()
enableUserSaveOnFinalization()
As mentioned in the script execution section, there are two types of Python interpreter in which a script can be run. First, in the Composite embedded Python interpreter, i.e. within the Composite process ("composite.exe" executable). And secondly, in an external Python interpreter, i.e. within a Python process, typically from a shell ("python.exe" executable).
See also: inEmbeddedInterpreter.
Variables | |
inEmbeddedInterpreter = False This global variable is a bool , set to True
when the initialization module was loaded by an embedded Composite
Python interpreter, and False when loaded by in an
external (command-line) interpreter.
|
|
init = sys.modules [__name__]
|
Variables Details |
inEmbeddedInterpreterThis global variable is a
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Apr 12 15:24:51 2013 | http://epydoc.sourceforge.net |