class MFnGeometryData

Jump to documentation

: public MFnData Geometry data function set. (OpenMaya) (OpenMaya.py)

Inheritance:

MFnGeometryData < MFnData < MFnBase

public members:

MFnGeometryData ()
MFnGeometryData ( MObject & object, MStatus * ReturnStatus = NULL )
virtual ~MFnGeometryData ()
virtual MFn::Type type () const
MStatus setMatrix ( const MMatrix & )
MStatus getMatrix ( MMatrix & ) const
bool matrixIsIdentity ( MStatus * ReturnStatus = NULL ) const
bool matrixIsNotIdentity ( MStatus * ReturnStatus = NULL ) const
bool hasObjectGroup ( unsigned int id, MStatus * ReturnStatus = NULL ) const
MStatus addObjectGroup ( unsigned int )
MStatus removeObjectGroup ( unsigned int )
MStatus changeObjectGroupId ( unsigned int , unsigned int )
unsigned int objectGroupCount ( MStatus * ReturnStatus = NULL ) const
unsigned int objectGroup ( unsigned int index, MStatus * ReturnStatus = NULL ) const
MFn::Type objectGroupType ( unsigned int, MStatus * ReturnStatus = NULL ) const
MObject objectGroupComponent ( unsigned int, MStatus * ReturnStatus = NULL ) const
MStatus setObjectGroupComponent ( unsigned int, MObject & )
MStatus addObjectGroupComponent ( unsigned int, MObject & )
MStatus removeObjectGroupComponent ( unsigned int, MObject & )
MStatus copyObjectGroups ( MObject & inGeom )
MFnGeometryData ( const MObject & object, MStatus * ReturnStatus = NULL )

Inherited from MFnData:

public members:

enum Type
kInvalid
kNumeric
Numeric, use MFnNumericData extract the node data.
kPlugin
Plugin Blind Data, use MFnPluginData to extract the node data.
kPluginGeometry
Plugin Geometry, use MFnGeometryData to extract the node data.
kString
String, use MFnStringData to extract the node data.
kMatrix
Matrix, use MFnMatrixData to extract the node data.
kStringArray
String Array, use MFnStringArrayData to extract the node data.
kDoubleArray
Double Array, use MFnDoubleArrayData to extract the node data.
kIntArray
Int Array, use MFnIntArrayData to extract the node data.
kPointArray
Point Array, use MFnPointArrayData to extract the node data.
kVectorArray
Vector Array, use MFnVectorArrayData to extract the node data.
kComponentList
Component List, use MFnComponentListData to extract the node data.
kMesh
Mesh, use MFnMeshData to extract the node data.
kLattice
Lattice, use MFnLatticeData to extract the node data.
kNurbsCurve
Nurbs Curve, use MFnNurbsCurveData to extract the node data.
kNurbsSurface
Nurbs Surface, use MFnNurbsSurfaceData to extract the node data.
kSphere
Sphere, use MFnSphereData to extract the node data.
kDynArrayAttrs
ArrayAttrs, use MFnArrayAttrsData to extract the node data.
kDynSweptGeometry
SweptGeometry, use MFnDynSweptGeometryData to extract the node data.
kSubdSurface
Subdivision Surface, use MFnSubdData to extract the node data.
kNObject
nObject data, use MFnNObjectData to extract node data
kLast

Inherited from MFnBase:

public members:

virtual MFn::Type type () const
bool hasObj ( MFn::Type ) const
bool hasObj ( const MObject & ) const
MObject object ( MStatus * ReturnStatus = NULL ) const
virtual MStatus setObject ( MObject & object )
virtual MStatus setObject ( const MObject & object )

Documentation

Geometry data function set. (OpenMaya) (OpenMaya.py)
Description

This class is the function set for geometry data.

Geometry data adds matrix and grouping (set) information to regular data and is used to pass geometry types such as mesh, lattice, and NURBS shape data through DG connections.

User defined geometry data types (MPxGeometryData) are also supported by this class.

The matrix within geometry data is the matrix used to convert the object into local space.

Functions

MFnGeometryData:: MFnGeometryData ()

Description

Default class constructor. The function set is not attached to an MObject.

MFnGeometryData:: MFnGeometryData ( MObject & object, MStatus * ReturnStatus )

Description

Class constructor that initializes the function set to the given MObject.

Arguments

  • object the MObject to attach the function set to
  • ReturnStatus the return status
    • MS::kSuccess if the function set is successfully attached
    • MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

MFnGeometryData:: MFnGeometryData ( const MObject & object, MStatus * ReturnStatus )

Description

Class constructor that initializes the function set to the given constant MObject.

Arguments

  • object the const MObject to attach the function set to
  • ReturnStatus the return status
    • MS::kSuccess if the function set is successfully attached
    • MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

MFnGeometryData:: ~MFnGeometryData ()

Description

The class destructor.

MFn::Type MFnGeometryData:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kGeometryData

MStatus MFnGeometryData:: setMatrix ( const MMatrix & matrix )
Description

Reset the matrix the the specified matrix and set the identity flag if the new matrix is the identity.

Arguments

  • matrix the new matrix to be set

Return Value

  • Status code

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

MStatus MFnGeometryData:: getMatrix ( MMatrix & matrix ) const
Description

Get the matrix associated with the geometry data.

Arguments

  • matrix storage for the returned matrix

Return Value

  • Status code

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

bool MFnGeometryData:: matrixIsIdentity ( MStatus * ReturnStatus ) const
Description

Return true if the matrix is the identity.

Arguments

  • ReturnStatus return status

Return Value

  • true if the matrix for the geometry is identity, false otherwise

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

bool MFnGeometryData:: matrixIsNotIdentity ( MStatus * ReturnStatus ) const
Description

Return true if the matrix is different from identity.

Arguments

  • ReturnStatus return status

Return Value

  • true if the matrix for the geometry is NOT the identity, false otherwise

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

bool MFnGeometryData:: hasObjectGroup ( unsigned int id, MStatus * ReturnStatus ) const
Description

This method returns true if an object group with the given id is contained in the data.

Arguments

  • ReturnStatus return status

Return Value

  • true is there is an object group with the given id, false otherwise

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

MStatus MFnGeometryData:: addObjectGroup ( unsigned int id )
Description

This method adds an object group to the object with the given id.

Arguments

  • ReturnStatus return status

Return Value

  • Status code

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

MStatus MFnGeometryData:: removeObjectGroup ( unsigned int id )
Description

This method removes an object group with the given id from the object.

Arguments

  • ReturnStatus return status

Return Value

  • Status code

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

MStatus MFnGeometryData:: changeObjectGroupId ( unsigned int sourceId, unsigned int destId )
Description

This method changes the id of the object group with the given id to the new id.

Arguments

  • sourceId id to change
  • destId new id to set

Return Value

  • Status code

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

unsigned int MFnGeometryData:: objectGroupCount ( MStatus * ReturnStatus ) const
Description

This method returns the number of object groups contained by the object.

Arguments

  • ReturnStatus return status

Return Value

  • the number of object groups

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

unsigned int MFnGeometryData:: objectGroup ( unsigned int index, MStatus * ReturnStatus ) const
Description

This method returns the id of the i'th object group contained by the object.

Arguments

  • ReturnStatus return status

Return Value

  • the id of the i'th object group

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

MFn::Type MFnGeometryData:: objectGroupType ( unsigned int id, MStatus * ReturnStatus ) const
Description

This method returns the type of the component that the object group with the given id contains.

Arguments

  • ReturnStatus return status

Return Value

  • the type of the specified object group component

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

MObject MFnGeometryData:: objectGroupComponent ( unsigned int id, MStatus * ReturnStatus ) const
Description

This method returns a component which contains the members of the object group with the given id.

Arguments

  • ReturnStatus return status

Return Value

  • a component containing the members of the specified object group

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

MStatus MFnGeometryData:: setObjectGroupComponent ( unsigned int id, MObject & component )
Description

This method sets the members of the object group with the given id to be only those in the given component.

Arguments

  • id id of object group to set
  • component new component for specified object group

Return Value

  • Status code

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

MStatus MFnGeometryData:: addObjectGroupComponent ( unsigned int id, MObject & component )
Description

This method adds the members of the given component to the object group with the given id.

Arguments

  • id id of object group to add to
  • component new component to be added to specified object group

Return Value

  • Status code

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

MStatus MFnGeometryData:: removeObjectGroupComponent ( unsigned int id, MObject & component )
Description

This method removes the members of the given Tcomponent to the object group with the given id.

Arguments

  • id id of object group to be changed
  • component component specifying the members to remove

Return Value

  • Status code

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure this function set does not have a valid object

MStatus MFnGeometryData:: copyObjectGroups ( MObject & inGeom )
Description

Copies the object groups from the given geometry data object.

Arguments

  • inGeom the geometry data to be copied

Return Value

  • Status code

Status Codes

  • MS::kSuccess operation successful
  • MS::kInvalidParameter parameter is not a kGeometryData type
  • MS::kFailure this function set does not have a valid object

Direct child classes:

- MFnSubdData
- MFnNurbsSurfaceData
- MFnNurbsCurveData
- MFnMeshData
- MFnLatticeData

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