class MClothSolverRegister

Jump to documentation

Manages cloth solvers

public members:

static MStatus registerClothSolver ( MString solverTypeName, MClothSolverCreatorFnPtr fnPtr)
registers a new cloth solver creation function by name.
static MStatus unregisterClothSolver ( MString solverTypeName)
removes the previously registered solver

Documentation

Provides an interface for plugins to register/unregister cloth solver classes with Maya. Whenever a new solver needs to be generated, it checks the classification string of the node for the preferred solver. If a match is found, it creates and manages the solver object (that is it deletes the solver object once the solver is removed from scene).
Description

Provides an interface to register/unregister the plug-in cloth solver objects.

Functions

MStatus MClothSolverRegister:: registerClothSolver ( MString solverTypeName, MClothSolverCreatorFnPtr fnPtr)

Description

Register the cloth solver object creation function with the cloth solvers manager.

Arguments

  • solverTypeName a name to identify the cloth solver.
  • fnPtr Pointer to a function which creates the cloth system object.

    The MClothSolverCreatorFnPtr type is defined as follows.

    Hence the signature of the function needs to be as follows:

    MClothSystem* <fn_name> ()

    This function needs to allocate the cloth system object using new and return the pointer. (This is necessary because delete is called on the returned pointer by Maya when work is done.)

Return Value

  • MS::kFailure if an error occurred. Common potential errors include: the cloth solver name has already been used.
  • MS::kSuccess otherwise.

MStatus MClothSolverRegister:: unregisterClothSolver ( MString solverTypeName)

Description

Un-register the cloth solver object from the cloth solver's manager.

Arguments

  • solverTypeName the name which was used for the cloth system. Should match the name used during registration.

Return Value

  • MS::kFailure if an error occurred. Common potential errors include: the cloth solver has already been unregistered.
  • MS::kSuccess otherwise.

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright