Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 17

...

This is the main interface to the Maxwell plug-in API. You obtain a pointer to this class by calling the GetMaxwellMayaAPI() function exported by the maxwell plug-in, or by using the convenience static method MaxwellMayaAPI::LoadAPI. For details on the loading process, see this page.

...

  • query the exporter state and scene settings.
  • create new objects in the Maxwell scene.
  • locate existing objects in the Maxwell scene.
  • translate, create or find materials.
  • add extension objects to the scene (Maxwell plug-ins which perform modifications at render time).
  • list the available Maxwell extensions and their parameters.

Methods

voidEnableDebugMessages(bool enable)
ExporterStateGetExporterState() const
doubleGetScalingFactor() const
MotionBlurTypeGetGlobalMotionBlurType() const
MObjectGetMaxwellRenderOptionsNode() const
unsigned int

GetNumMotionSteps() const

doubleGetRenderCamExposure() const
doubleGetShutterOpenTime() const
doubleGetShutterCloseTime() const
doubleGetCurrentMotionTime() const
boolGetCurrentShapePath(MDagPath& path) const
const MObjectArray&GetCurrentShapeShaders() const
boolGetCurrentShapeWorldMatrix(MMatrix& worldMatrix) const
boolSetCurrentShapeOutput(MaxwellMayaShape* shape, unsigned int processingFlags)
MaxwellMayaShape*GetCurrentMotionShape() const
boolGetExportedShapeName(MString& name, const MDagPath& path) const
MaxwellMayaShape*FindShape(const MString& name) const
MaxwellMayaCamera*CreateCamera(const MString& name, unsigned int numMotionSteps)
MaxwellMayaCamera*FindCamera(const MString& name) const
MaxwellMayaCamera*GetActiveCamera() const
MaxwellMayaMaterial*TranslateMaterial(const MObject& materialNode)
MaxwellMayaMaterial*FindMaterial(const MString& name) const
MaxwellMayaReferencedMaterial*CreateReferencedMaterial(const MString& name)
MaxwellMayaEmbeddedMaterial*CreateEmbeddedMaterial(const MString& name)
MaxwellMayaEmbeddedMaterial*LoadMaterial(const MString& fileName)
MaxwellMayaExtensionParams*CreateExtensionParamBlock(const MString& extensionName)
MaxwellMayaMesh*CreateMesh(const MString& name, unsigned int numVertices, unsigned int numNormals, unsigned int numTriangles, unsigned int numSteps)
MaxwellMayaInstance*CreateInstance(const MString& name, const MaxwellMayaShape* originalShape)
MaxwellMayaInstance*CreateInstance(const MString& name, const MString& originalShapeName)
MaxwellMayaExtensionShape*CreateExtensionShape(const MString& name, ExtensionShapeType type, const MaxwellMayaExtensionParams* params)
MaxwellMayaMXSReference*CreateMXSReference(const MString& name, const MString& fileName)
boolAddSceneModifierExtension(const MaxwellMayaExtensionParams* params)
boolAddSkyExtension(const MaxwellMayaExtensionParams* params)
unsigned intGetNumExtensions(MaxwellMayaExtensionInfo::ExtensionType type) const
MaxwellMayaExtensionInfo*GetExtensionInfo(MaxwellMayaExtensionInfo::ExtensionType type, unsigned int index) const
MaxwellMayaExtensionInfo*GetExtensionInfo(const MString& name) const
unsigned intGetCurrentAPIVersion() const
unsigned intGetLowestSupportedAPIVersion() const
static const char*GetStateName(ExporterState state)
static boolSetExportCallback(const MString& pluginName, ExportCallbackType type, const MString& command, ExportCallbackLanguage language)
static boolRemoveExportCallback(const MString& pluginName, ExportCallbackType type)
static boolRemoveExportCallbacks(const MString& pluginName)
static MaxwellMayaAPI*LoadAPI()

void EnableDebugMessages(bool enable)

...

Returns the current time inside the movement interval as a fraction of the exposure time. The value ranges from 0.0 (shutter open) to 1.0 (shutter close). The value will be 0 when the exporter is in the shape processing state and will increase with 1.0/(GetNumMotionSteps() - 1) at each step during motion processing, reaching 1.0 in the last step.

...

MaxwellMayaShape* GetCurrentMotionShape() const

If you have used SetCurrentShapeOutput during the shape processing stage, you can call this method during motion processing to retrieve a pointer to the object you have created. Otherwise, this method returns NULL in C++ or raises an exception in Python.

...

Creates an embedded material and loads its settings from the specified MXM file. This method can be called outside the export process if you need to parse MXM files. When the exporter is running, it is equivalent to using CreateEmbeddedMaterial and then calling LoadFromFile on the returned pointer. The method returns NULL in C++ if the file cannot be read, or raises an exception in Python.

...

Creates an instance of an object. The object can either be specified as a shape pointer, or by name. The second form is equivalent to first calling FindShape to locate the object, then using the first form on the returned pointer. The methods return NULL if the instance creation fails. These functions don't exist in Python, where you can construct the type directly, e.g. inst = maxwell.Instance(shape). The constructor of the maxwell.Instance Python class accepts either a shape, corresponding to the first form of the method, or a string, corresponding to the second form.

...

Returns an interface which can be used to query the attributes of the extension with the given name. This method is called GetExtensionByName in Python. If no extension with the given name is present, it returns NULL in C++ and raises an exception in Python.

unsigned int GetCurrentAPIVersion() const

Returns the API version for the Maxwell plug-in. This is not necessarily the same value as the macro MAXWELL_MAYA_API_VERSION; if your plug-in uses an older API version which is still supported, the API will load correctly and this method will return a number larger than the API version you used when building your plug-in.

unsigned int GetLowestSupportedAPIVersion() const

Returns the earliest API version which is supported by the Maxwell plug-in.

static const char* GetStateName(ExporterState state)

...