Public Member Functions
ShapeKey Class Reference

Detailed Description

A ShapeKey represents a special ClusterProperty which is used to store a specific geometry. ShapeKeys provide information about how the shape of a cluster changes by either storing its absolute value, an offset based on the object referential or values base on the local reference frame of vertices.

In the context of a ShapeKey, values returned by ClusterProperty::GetValues are automatically converted to object-based referential, which is not the case for ClusterProperty::GetElements.

You can find out the key's reference mode by getting the value of the KeyType parameter. To convert from one reference mode to the other, use the ConvertShapeReferenceMode command.

Warning:
The KeyType parameter uses a different set of values from the siShapeReferenceMode enum. For more information, see ShapeAnimation Shape Animation

Because a ShapeKey modifies scene content when instantiated, it is an AnimationSource and as such can be accessed by using AnimationSourceItem::GetSource.

See also:
ClusterProperty::GetValues, AnimationSourceItem::GetSource, ActionSource::GetItems, ShapeClip, ActionSource, Clip::GetSource, StoreShapeKey, SelectShapeKey
Since:
4.0
Example:
This example illustrates how to create a ShapeKey
        using namespace XSI;
        Application app;
        Model root = app.GetActiveSceneRoot();

        X3DObject myCube;
        root.AddGeometry( L"Cube", L"MeshSurface", L"", myCube );

        // Creating the first animation source
        CValueArray args(3);
        CValue      outArg;
        args[0] = myCube;
        args[1] = L"myShapeKey";
        args[2] = (LONG)siShapeAbsoluteReferenceMode;
        app.ExecuteCommand( L"StoreShapeKey", args, outArg );

        ShapeKey myShapeKey(outArg);
        app.LogMessage(L"ShapeKey " + myShapeKey.GetFullName());

#include <xsi_shapekey.h>

Inheritance diagram for ShapeKey:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  ShapeKey ()
  ~ShapeKey ()
  ShapeKey (const CRef &in_ref)
  ShapeKey (const ShapeKey &in_obj)
bool  IsA (siClassID in_ClassID) const
siClassID  GetClassID () const
ShapeKey operator= (const ShapeKey &in_obj)
ShapeKey operator= (const CRef &in_ref)
CString  GetShapeGroupName () const
CStatus  PutShapeGroupName (const CString &in_shapeGroupName)

Constructor & Destructor Documentation

ShapeKey ( )

Default constructor.

~ShapeKey ( )

Default destructor.

ShapeKey ( const CRef in_ref )

Constructor.

Parameters:
in_ref constant reference object.
ShapeKey ( const ShapeKey in_obj )

Copy constructor.

Parameters:
in_obj constant class object.

Member Function Documentation

bool IsA ( siClassID  in_ClassID ) const [virtual]

Returns true if a given class type is compatible with this API class.

Parameters:
in_ClassID class type.
Returns:
true if the class is compatible, false otherwise.

Reimplemented from ClusterProperty.

siClassID GetClassID ( ) const [virtual]

Returns the type of the API class.

Returns:
The class type.

Reimplemented from ClusterProperty.

ShapeKey& operator= ( const ShapeKey in_obj )

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:
in_obj constant class object.
Returns:
The new ShapeKey object.
ShapeKey& operator= ( const CRef in_ref )

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:
in_ref constant class object.
Returns:
The new ShapeKey object.

Reimplemented from ClusterProperty.

CString GetShapeGroupName ( ) const

Returns the name of the shape group to which the shape key object belongs. Shape groups are a way to semantically organize shape keys within a given cluster. This organization is visible within the shape manager view.

Since:
5.0
CStatus PutShapeGroupName ( const CString in_shapeGroupName )

Sets the name of the shape group to which the shape key object belongs. Shape groups are a way to semantically organize shape keys within a given cluster. This organization is visible within the shape manager view.

Note:
If you attempt to assign a non-existing shape group name to a shape key, a new shape group will be created.
Parameters:
in_shapeGroupName name of the shape group to which you want to associate the shape key.
Since:
5.0

The documentation for this class was generated from the following file: