class MAttributeSpec

Jump to documentation

An attribute specification. (OpenMaya) (OpenMaya.py)

public members:

MAttributeSpec ()
MAttributeSpec ( const char * name )
MAttributeSpec ( const MString & name )
MAttributeSpec ( const MAttributeSpec & other)
~MAttributeSpec ()
const MString name () const
int dimensions () const
void setName ( const MString & name )
void setDimensions ( int value)
MAttributeSpec & operator = (const MAttributeSpec & rhs)
const MAttributeIndex operator [] (int index) const
bool operator== (const MAttributeSpec & other) const
MAttributeIndex operator[] (int index)
NO SCRIPT SUPPORT

Documentation

An attribute specification. (OpenMaya) (OpenMaya.py)
Description

Class that encapsulates component/attribute information for generating selection items.

This class is used by MPxSurfaceShape::matchComponent for validating attributes specified as strings and converting that specification to a component object.

The attribute specification ".foo.bar[3].x" would be expressed like this (using a pseudo-structure description):

    MAttributeSpecArray[0..3] {
        MAttributeSpec[0] {
            name      = "foo"
            dimension = 0
        }
        MAttributeSpec[1] {
            name      = "bar"
            dimension = 1
            MAttributeIndex[0] = {
                type      = kInteger
                isRange   = false
                isBounded = true
                value     = 3
            }
        }
        MAttributeSpec[2] {
            name      = "x"
            dimension = 0
        }
    }

Functions

MAttributeSpec:: MAttributeSpec ()

Description

Constructor.

MAttributeSpec:: MAttributeSpec ( const char * name )

Description

Constructor.

Creates an attribute specification with the given attribute name.

Arguments

  • name the attribute name to set

MAttributeSpec:: MAttributeSpec ( const MString & name )

Description

Constructor.

Creates an attribute specification with the given attribute name.

Arguments

  • name the attribute name to set

MAttributeSpec:: MAttributeSpec ( const MAttributeSpec & other )

Description

Copy constructor.

Arguments

  • other the attribute specification to copy

MAttributeSpec:: ~MAttributeSpec ()

Description

Destructor.

const MString MAttributeSpec:: name () const

Description

Returns the attribute name part of the specification.

Return Value

  • the attribute name

int MAttributeSpec:: dimensions () const

Description

Returns the dimension of the attribute specification. For array attributes the dimension is > 0.

Return Value

  • the attributes dimension

void MAttributeSpec:: setName ( const MString & name )

Description

Set the attribute name part of the specification.

Arguments

  • name the name to be set

void MAttributeSpec:: setDimensions ( int value )

Description

Set the dimension of the attribute specification. Array attribute dimensions are > 0.

Arguments

  • value the dimension value to be set

MAttributeSpec & MAttributeSpec:: operator= ( const MAttributeSpec & rhs )

Description

Assignment operator.

Arguments

  • rhs attribute specification to copy

Return Value

  • A reference to the copied MAttributeSpec object.

const MAttributeIndex MAttributeSpec:: operator[] ( int index ) const

Description

Returns an attribute index object for the specified element.

Arguments

  • index attribute index to return

Return Value

  • returns the MAttributeIndex associated with the given index.

MAttributeIndex MAttributeSpec:: operator[] ( int index )

Description

Returns an attribute index object for the specified element.

Arguments

  • index attribute index to return

Return Value

  • returns the MAttributeIndex associated with the given index.

bool MAttributeSpec:: operator== (const MAttributeSpec & other) const

Description

Comparison operator.

Arguments

  • other attribute specifier to be compared

Return Value

  • returns the boolean indicating whether the object are same or not.

This class has no child classes.


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