added everything

This commit is contained in:
Metario
2017-04-17 06:17:10 -06:00
commit 9c6ff74f19
6121 changed files with 1625704 additions and 0 deletions

View File

@ -0,0 +1,437 @@
#ifndef _M3dView
#define _M3dView
//
// *****************************************************************************
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// *****************************************************************************
//
// CLASS: M3dView
//
// *****************************************************************************
//
// CLASS DESCRIPTION (M3dView)
//
// M3dView provides methods for working with 3D model views. 3D views are
// based on OpenGL drawing areas.
//
// Maya can operate in two different color modes, RGBA and color index. Color
// index mode is used to increase performance when shading is not required.
// Drawing in color index mode is more complicated, but this class provides
// methods to simplify color selection.
//
// Maya has four color tables that can be used in RGBA, and that must be used
// in color index mode. These four color tables represent four sets of bit
// planes that are independent of each other. So, for example, it is possible
// to clear all active objects from the display and redraw them without
// redrawing the dormant and templated objects.
//
// The extra performance of color index mode comes at the cost of a
// limited number of colors. If this restriction causes difficulty, then
// it is possible for the user to force all displays into RGBA mode
// where any color may be used.
//
// When an object is affected by another in the scene, it is drawn in a
// magenta colour by default. This is denoted in the DisplayStatus enum by
// kActiveAffected. These objects are drawn in the active planes even though
// they are dormant for performance reasons.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#if ( defined (OSMac_) && !defined (MAC_PLUGIN) )
#include "HOS.h"
#endif
#include <maya/MStatus.h>
#include <maya/MObject.h>
#if defined(OSMac_)
#include <agl.h>
typedef WindowRef MWindow;
#elif defined (SGI) || defined (LINUX)
#include <GL/glx.h>
#include <X11/Intrinsic.h>
typedef Widget MWindow;
#elif defined (_WIN32)
#include "windows.h"
#include <gl/Gl.h>
typedef HWND MWindow;
#else
#error Unknown OS
#endif //OSMac_
// *****************************************************************************
// DECLARATIONS
class MString;
class MDagPath;
class MPoint;
class MVector;
class MMatrix;
class MColor;
class MPxGlBuffer;
// *****************************************************************************
// CLASS DECLARATION (M3dView)
/// A 3-D view (OpenMayaUI)
/**
3-D view class.
*/
#if (defined (SGI) || defined (LINUX) || defined (OSMac_))
typedef Window M3dWindow;
#elif defined(_WIN32)
typedef HWND M3dWindow;
#else
#error Unknown OS
#endif // OSUnix_
#if defined (_WIN32)
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT M3dView {
public:
///
enum DisplayStyle {
/// bounding box display
kBoundingBox,
/// flat shaded display
kFlatShaded,
/// gouraud shaded display
kGouraudShaded,
/// wire frame display
kWireFrame,
/// points only display
kPoints
};
///
enum DisplayStatus {
/// object is active (selected)
kActive,
/// object is live (construction surface)
kLive,
/// object is domant
kDormant,
/// object is invisible (not drawn)
kInvisible,
/// object is hilited (has selectable components)
kHilite,
/// object is templated (Not renderable)
kTemplate,
/// object is active and templated
kActiveTemplate,
/// object has active components
kActiveComponent,
/// Last selected object
kLead,
/// Construction object (not drawn)
kIntermediateObject,
/// Affected by active object(s)
kActiveAffected,
/// object does not have a valid display status
kNoStatus
};
///
enum ColorTable {
/// colors for active objects
kActiveColors = kActive,
/// colors for dormant objects
kDormantColors = kDormant,
/// colors for templated objects
kTemplateColor = kTemplate,
/// colors for background color
kBackgroundColor
};
///
enum TextPosition {
/// draw text to the left of the point
kLeft,
/// draw text centered around the point
kCenter,
/// draw text to the right of the point
kRight
};
///
enum DisplayObjects {
/// show everything
kDisplayEverything = 0,
/// show nurbs curves
kDisplayNurbsCurves,
/// show nurbs surfaces
kDisplayNurbsSurfaces,
/// show meshes
kDisplayMeshes,
/// show planes
kDisplayPlanes,
/// show lights
kDisplayLights,
/// show camera
kDisplayCameras,
/// show joints
kDisplayJoints,
/// show IK handles
kDisplayIkHandles,
/// show deformers
kDisplayDeformers,
/// show dynamics
kDisplayDynamics,
/// show locators
kDisplayLocators,
/// show dimensions
kDisplayDimensions,
/// show selection handles
kDisplaySelectHandles,
/// show pivots
kDisplayPivots,
/// show textures
kDisplayTextures,
/// show the grid
kDisplayGrid,
/// show NURBS CVs
kDisplayCVs,
/// show NURBS hulls
kDisplayHulls,
/// show strokes
kDisplayStrokes,
/// show subdivision surfaces
kDisplaySubdivSurfaces
};
enum LightingMode {
kLightAll, // All lights ON mode
kLightSelected, // Selected lights ON mode
kLightActive, // Active lights ON mode
kLightDefault // Default light ON mode
};
///
M3dView();
///
virtual ~M3dView();
// global methods
///
static M3dView active3dView( MStatus * ReturnStatus = NULL );
///
static unsigned numberOf3dViews();
///
static MStatus get3dView( const unsigned index,
M3dView & view );
///
#if defined(OSMac_)
AGLContext display ( MStatus * ReturnStatus = NULL );
// deviceContext() method not needed on the Mac
#elif defined (SGI) || defined (LINUX)
Display * display( MStatus * ReturnStatus = NULL );
///
GLXContext glxContext( MStatus * ReturnStatus = NULL );
#elif defined (_WIN32)
HGLRC display( MStatus * ReturnStatus = NULL );
///
HDC deviceContext( MStatus * ReturnStatus = NULL );
#else
#error Unknown OS
#endif
///
static MWindow applicationShell( MStatus * ReturnStatus = NULL );
///
M3dWindow window( MStatus * ReturnStatus = NULL );
///
int portWidth( MStatus * ReturnStatus = NULL );
///
int portHeight( MStatus * ReturnStatus = NULL );
// OpenGL wrapper methods
///
MStatus beginGL();
///
MStatus endGL();
// OpenGL Selection
//
///
void beginSelect (GLuint *buffer = NULL, GLsizei size = 0);
///
GLint endSelect ();
///
bool selectMode () const;
///
void loadName (GLuint name);
///
void pushName (GLuint name);
///
void popName ();
///
void initNames ();
// Overlay plane methods
///
MStatus beginOverlayDrawing();
///
MStatus endOverlayDrawing();
///
MStatus clearOverlayPlane();
// Color methods
///
MStatus setDrawColor( unsigned index,
ColorTable table = kActiveColors );
///
MStatus setDrawColor( const MColor & color );
///
bool isColorIndexMode( MStatus * ReturnStatus = NULL );
///
unsigned numDormantColors( MStatus * ReturnStatus = NULL );
///
unsigned numActiveColors( MStatus * ReturnStatus = NULL );
///
unsigned numUserDefinedColors( MStatus * ReturnStatus = NULL );
///
MStatus setUserDefinedColor( unsigned index, const MColor & color );
///
unsigned userDefinedColorIndex( unsigned index,
MStatus * ReturnStatus = NULL );
///
MColor templateColor( MStatus * ReturnStatus = NULL );
///
MColor backgroundColor( MStatus * ReturnStatus = NULL );
///
MColor colorAtIndex( unsigned index, ColorTable table = kActiveColors,
MStatus * ReturnStatus = NULL );
///
MStatus getColorIndexAndTable( unsigned glindex, unsigned &index,
ColorTable &table ) const;
// Text drawing methods
///
MStatus drawText( const MString & text, const MPoint position,
TextPosition textPosition = kLeft );
// Camera methods
///
MStatus getCamera( MDagPath & camera );
///
MStatus setCamera( MDagPath & camera );
///
MStatus refresh( bool all = false, bool force = false );
///
MStatus refresh( MPxGlBuffer &buffer );
// Light methods
MStatus getLightCount( unsigned int &count, bool visible = TRUE );
MStatus getLightingMode(LightingMode &mode );
MStatus getLightPath( unsigned int lightNumber, MDagPath &light );
MStatus isLightVisible( unsigned int lightNumber, bool &visible );
MStatus getLightIndex( unsigned int lightNumber, unsigned int &lightIndex );
// Transformation methods
///
MStatus viewToWorld( short x_pos, short y_pos,
MPoint & worldPt, MVector & worldVector ) const;
///
MStatus viewToWorld( short x_pos, short y_pos,
MPoint & nearClipPt, MPoint & farClipPt ) const;
///
MStatus viewToObjectSpace( short x_pos, short y_pos,
const MMatrix & localMatrixInverse,
MPoint & oPt, MVector & oVector ) const;
///
bool worldToView( const MPoint& worldPt,
short& x_pos, short& y_pos,
MStatus * ReturnStatus = NULL ) const;
// View selected prefix
//
///
MString viewSelectedPrefix(MStatus *ReturnStatus) const;
///
MStatus setViewSelectedPrefix(MString &prefix);
// isolateSelect behavior
//
//
bool showViewSelectedChildren(MStatus *ReturnStatus) const;
///
MStatus setShowViewSelectedChildren(bool);
// Method to get a M3dView from a modelPanel
//
///
static MStatus getM3dViewFromModelPanel(const MString &modelPaneName,
M3dView &view);
// Method to get a M3dView from a modelEditor
//
///
static MStatus getM3dViewFromModelEditor(const MString &modelPaneName,
M3dView &view);
// Display style methods
//
///
DisplayStyle displayStyle( MStatus * ReturnStatus = NULL ) const;
///
bool isShadeActiveOnly( MStatus * ReturnStatus = NULL ) const;
///
MStatus setDisplayStyle ( DisplayStyle style, bool activeOnly = false);
protected:
// No protected members
private:
static const char* className();
M3dView( const void * );
const void * fPtr;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
#endif /* __cplusplus */
#endif /* _M3dView */

View File

@ -0,0 +1,136 @@
#ifndef _MAngle
#define _MAngle
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MAngle
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MAngle)
//
// The MAngle class provides a fundamental type for the Maya API to hold
// and manipulate angular data. All API methods that require or return
// angular information do so through variables of this type.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MStatus.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MAngle)
/// Manipulate Angular Data
/**
Methods for setting and retreiving angular data in various unit systems
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MAngle
{
public:
/// Available Unit Systems
enum Unit
{
///
kInvalid,
/// Radians
kRadians,
/// Degrees
kDegrees,
/// Minutes of Arc
kAngMinutes,
/// Seconds of Arc
kAngSeconds,
///
kLast
};
///
MAngle();
///
MAngle( const MAngle & src );
///
MAngle( double value, Unit u = kRadians );
///
~MAngle();
///
MAngle & operator=( const MAngle & other );
///
Unit unit() const;
///
double value() const;
///
MStatus setUnit( Unit newUnit );
///
MStatus setValue( double newValue );
///
double as( Unit otherUnit, MStatus *ReturnStatus = NULL ) const;
///
double asRadians() const;
///
double asDegrees() const;
///
double asAngMinutes() const;
///
double asAngSeconds() const;
///
static Unit uiUnit();
///
static MStatus setUIUnit( Unit newUnit );
///
static Unit internalUnit();
///
static double internalToUI( double internalValue );
///
static double uiToInternal( double uiValue );
///OBSOLETE Changing the internal units is generally not a good idea and using this method may often produce unexpected results.
static MStatus setInternalUnit( Unit internalUnit );
protected:
double val;
Unit valUnit;
private:
static const char* className();
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MAngle */

View File

@ -0,0 +1,166 @@
#ifndef _MAnimControl
#define _MAnimControl
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MAnimControl
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MAnimControl)
//
// This class provide access to the values that control how an animation is
// played. This includes the minimum and maximum frames included in the
// playback, whether the playback loops, and whether the animation runs
// in all views, or only the active view, etc.
//
// Methods also exist that mirror the functionality of the controls found
// on the time slider in the UI to start and stop the playback.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTime.h>
#include <maya/MTypes.h>
#include <maya/MFnAnimCurve.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MAnimControl)
/// Control over animation playback and values (OpenMayaAnim)
/**
Retrieve and set animation parameters and control playback
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MAnimControl
{
public:
///
enum PlaybackMode {
/// Play the animation once then stop
kPlaybackOnce,
/// Play the animation continuously
kPlaybackLoop,
/// Play the animation forwards, then backwards continuously
kPlaybackOscillate
};
///
enum PlaybackViewMode {
/// The animation plays back in all views
kPlaybackViewAll,
/// The animation plays back in only the active view
kPlaybackViewActive
};
///
MAnimControl();
///
virtual ~MAnimControl();
///
static MAnimControl::PlaybackMode playbackMode();
///
static MStatus setPlaybackMode( PlaybackMode
newMode );
///
static MAnimControl::PlaybackViewMode viewMode();
///
static MStatus setViewMode( PlaybackViewMode
newMode );
///
static double playbackBy();
///
static MStatus setPlaybackBy( const double& );
///
static MTime minTime();
///
static MTime maxTime();
///
static MStatus setMinTime( MTime newMinTime );
///
static MStatus setMaxTime( MTime newMaxTime );
///
static MStatus setMinMaxTime( MTime min,
MTime max );
///
static MTime currentTime();
///
static MStatus setCurrentTime( const MTime&
newTime );
///
static double playbackSpeed();
///
static MStatus setPlaybackSpeed( double speed );
///
static MStatus playForward();
///
static MStatus playBackward();
///
static bool isPlaying();
///
static MStatus stop();
///
static bool autoKeyMode ();
///
static MStatus setAutoKeyMode ( bool mode );
///
static MFnAnimCurve::TangentType globalInTangentType (
MStatus * ReturnStatus = NULL );
///
static MStatus setGlobalInTangentType (const MFnAnimCurve::TangentType
&tangentType );
///
static MFnAnimCurve::TangentType globalOutTangentType (
MStatus * ReturnStatus = NULL );
///
static MStatus setGlobalOutTangentType (const MFnAnimCurve::TangentType
&tangentType );
///
static bool weightedTangents( MStatus * ReturnStatus = NULL );
///
static MStatus setWeightedTangents( bool weightState );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MAnimControl */

View File

@ -0,0 +1,102 @@
#ifndef _MAnimCurveChange
#define _MAnimCurveChange
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MAnimCurveChange
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MAnimCurveChange)
//
// Anim Curve Change caches are used as persistent storage for information
// concerning changes to Anim Curve Nodes.
//
// When invoked with a valid Anim Curve change parameter, the remove keyframe
// and add keyframe methods of the Anim Curve Function Set
// (MFnAnimCurve::remove() and MFnAnimCurve::addKeyframe(), respectively)
// cache the change information in the Anim Curve Change cache so that the
// caller can undo and redo the changes as required.
//
// Caching of the undo and redo information in a Anim Curve Change cache is
// required primarily to support interactive editing of Anim Curves in the UI.
//
// Use Anim Curve Change caches in conjunction with the Anim Curve Function
// Set (MFnAnimCurve) to perform undoable and redoable edits on Anim Curves.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MAnimCurveChange)
/// Anim Curve Change Cache (OpenMayaAnim)
/**
Create Anim Curve change caches.
Undo Anim Curve changes which have been cached.
Redo Anim Curve changes which were previously undone.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MAnimCurveChange
{
public:
///
MAnimCurveChange( MStatus * ReturnStatus = NULL );
///
~MAnimCurveChange();
///
MStatus undoIt();
///
MStatus redoIt();
protected:
// No protected members
private:
static const char* className();
void* data;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MAnimCurveChange */

View File

@ -0,0 +1,169 @@
#ifndef _MAnimCurveClipboard
#define _MAnimCurveClipboard
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MAnimCurveClipboard
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MAnimCurveClipboard)
//
// The clipboard is a list of MAnimCurveClipboardItems (i.e. an
// MAnimCurveClipboardItemArray).
//
// The items on the clipboard must be ordered. In the case where the
// clipboard info represents animation of a hierarchy, the order in which
// items appear in the clipboard is reliant on a depth-first-iteration from
// the root or the hierarchy. This ordering, is essential to properly match
// up hierarchies of objects
//
// As an example, consider that animation from the following hierarchy
// is placed into the clipboard. (Dag Objects with "/" for sides
// are animated, as in the Hypergraph)
// ____
// / A /
// /___/\_______
// |\_____ \__
// ____ _|__ _|__
// | B | / E / | F |
// |___| /___/ |___|
// | |\________
// ____ ____ _|__
// / C / / G / / H /
// /___/ /___/ /___/
// |
// ____
// / D /
// /___/
//
// In this example, the object labelled "C" has translate{X,Y,Z} animated,
// while all the others only have one animated attribute (excluding objects
// B and F, which have no animated attributes).
//
// Using notation where A(r,c,a) represents the animCurve driving object
// "A", which is at row "r" in its subhierarchy, has "c" children, and
// "a" animated attributes these items would appear in the clipboard in this
// order (i.e. depth-first with each object's attributes explicitly indexed
// before continuing down the heirarchy):
//
// A(0,3,0) , B(1,1,0) , C(2,1,0) , C(2,1,1) , C(2,1,2) , D(3,0,0) ,
// E(1,0,0) , F(1,2,0) , G(2,0,0) , H(2,0,0)
//
// For example C(2,1,2) would mean that the object C resides on the second
// level of the subheirarchy and has one child. The last "2" is simply
// used as an index to count the number of animated attributes on this
// object.
//
// Multiple objects can be represented on the clipboard in this manner. In
// the example above, if we had a separate second object with no children,
// "J", it would appear at the end of the array as J(0,0,0).
//
// Note that although B and F contain no animation data themselves, they
// must still be placed on the clipboard as placeholders to preserve the
// heirarchy information. A placeholder object is defined by a NULL value
// for the MAnimCurveClipboardItem's animCurve.
//
// There is a special clipboard that remains static. It can be accessed by
// MAnimCurveClipboard::theAPIClipboard().
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
#include <maya/MAnimCurveClipboardItemArray.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MAnimCurveClipboard)
/// Control over the animation clipboard (OpenMayaAnim)
/**
This class provide access to the animation or API clipboard which are used
to hold on to anim curves during cut/copy/paste operations.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MAnimCurveClipboard
{
public:
///
MAnimCurveClipboard();
///
~MAnimCurveClipboard();
///
// For accessing the static API clipboard
static MAnimCurveClipboard & theAPIClipboard();
///
MStatus set( const MAnimCurveClipboard &cb );
///
MStatus set( const MAnimCurveClipboardItemArray &clipboardItemArray );
///
MStatus set( const MAnimCurveClipboardItemArray &clipboardItemArray,
const MTime &startTime, const MTime &endTime,
const float &startUnitlessInput,
const float &endUnitlessInput );
///
MStatus clear ();
///
bool isEmpty( MStatus * ReturnStatus = NULL ) const;
///
const MAnimCurveClipboardItemArray clipboardItems( MStatus *
ReturnStatus = NULL) const;
///
MTime startTime( MStatus * ReturnStatus = NULL ) const;
///
MTime endTime( MStatus * ReturnStatus = NULL ) const;
///
float startUnitlessInput( MStatus * ReturnStatus = NULL ) const;
///
float endUnitlessInput( MStatus * ReturnStatus = NULL ) const;
protected:
// No protected members
private:
void * fClipboard;
static MAnimCurveClipboard fsAPIClipboard;
MAnimCurveClipboard& operator = (const MAnimCurveClipboard&) const;
MAnimCurveClipboard& operator = (const MAnimCurveClipboard&);
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MAnimCurveClipboard */

View File

@ -0,0 +1,122 @@
#ifndef _MAnimCurveClipboardItem
#define _MAnimCurveClipboardItem
//
//
//******************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
//
//******************************************************************************
//
// CLASS: MAnimCurveClipboardItem
//
//
//******************************************************************************
//
// CLASS DESCRIPTION (MAnimCurveClipboardItem)
//
// This class provides a wrapper to the clipboard item used to hold
// on to cut/copy/paste information
//
//******************************************************************************
#if defined __cplusplus
//******************************************************************************
// INCLUDED HEADER HILES
//******************************************************************************
#include <maya/MFnAnimCurve.h>
#include <maya/MObject.h>
//******************************************************************************
// DECLARATIONS
//******************************************************************************
// CLASS DECLARATION (MAnimCurveClipboardItem)
/// Wrapper for a clipboard item. (OpenMayaAnim)
/**
This class provides a wrapper to the clipboard item used to hold
on to cut/copy/paste information
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MAnimCurveClipboardItem
{
public:
///
MAnimCurveClipboardItem();
///
MAnimCurveClipboardItem( const MAnimCurveClipboardItem & );
///
~MAnimCurveClipboardItem();
///
const MObject animCurve( MStatus * ReturnStatus = NULL ) const;
///
MStatus getAddressingInfo( unsigned &rowCount,
unsigned &childCount,
unsigned &attrCount) const;
///
const MString & fullAttributeName( MStatus * ReturnStatus=NULL ) const;
///
const MString & leafAttributeName( MStatus * ReturnStatus=NULL ) const;
///
const MString & nodeName( MStatus * ReturnStatus=NULL ) const;
///
MFnAnimCurve::AnimCurveType animCurveType( MStatus
* ReturnStatus=NULL ) const;
///
MStatus setAnimCurve( const MObject & curve );
///
MStatus setAddressingInfo( unsigned rowCount,
unsigned childCount,
unsigned attributeCount );
///
MStatus setNameInfo( const MString & nodeName,
const MString & fullName,
const MString & leafName );
///
MAnimCurveClipboardItem &operator = (const MAnimCurveClipboardItem &);
///
bool operator == (const MAnimCurveClipboardItem &) const;
protected:
// No protected members
private:
void * fCurve;
MFnAnimCurve::AnimCurveType fAnimCurveType;
unsigned fRowCount;
unsigned fChildCount;
unsigned fAttrCount;
MString fFullAttrName;
MString fLeafAttrName;
MString fNodeName;
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
//******************************************************************************
#endif /* __cplusplus */
#endif /* _MAnimCurveClipboardItem */

View File

@ -0,0 +1,121 @@
#ifndef _MAnimCurveClipboardItemArray
#define _MAnimCurveClipboardItemArray
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MAnimCurveClipboardItemArray
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MAnimCurveClipboardItemArray)
//
// This class implements an array of MAnimCurveClipboardItems. Common
// convenience functions are available, and the implementation is compatible
// with the internal Maya implementation so that it can be passed efficiently
// between plugins and internal maya data structures.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MAnimCurveClipboardItem.h>
#include <maya/MStatus.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MAnimCurveClipboardItemArray)
/// Array of MAnimCurveClipboardItem data type (OpenMayaAnim)
/**
Implement an array of MAnimCurveClipboardItem data type.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MAnimCurveClipboardItemArray
{
public:
///
MAnimCurveClipboardItemArray();
///
MAnimCurveClipboardItemArray(
const MAnimCurveClipboardItemArray& other );
///
MAnimCurveClipboardItemArray(
const MAnimCurveClipboardItem src[],
unsigned count );
///
~MAnimCurveClipboardItemArray();
///
const MAnimCurveClipboardItem& operator[]( unsigned index ) const;
///
MAnimCurveClipboardItem& operator[]( unsigned index );
///
MStatus set( const MAnimCurveClipboardItem& element,
unsigned index );
///
unsigned length() const;
///
MStatus remove( unsigned index );
///
MStatus insert( const MAnimCurveClipboardItem & element,
unsigned index );
///
MStatus append( const MAnimCurveClipboardItem & element );
///
MStatus clear();
///
MStatus get( MAnimCurveClipboardItem array[] ) const;
///
void setSizeIncrement ( unsigned newIncrement );
///
unsigned sizeIncrement () const;
///
bool isValid( unsigned & failedIndex ) const;
protected:
// No protected members
private:
bool validate( unsigned int & index,
unsigned int rowCount ) const;
MAnimCurveClipboardItemArray& operator = (
const MAnimCurveClipboardItemArray&)
const;
MAnimCurveClipboardItemArray& operator = (
const MAnimCurveClipboardItemArray&);
void* fArray;
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MAnimCurveClipboardItemArray */

View File

@ -0,0 +1,84 @@
#ifndef _MAnimMessage
#define _MAnimMessage
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MAnimMessage
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MAnimMessage)
//
// This class is used to register callbacks for animation messages.
// There is 1 add callback method which will add callbacks for the
// following message
// Anim curve edited
//
// To remove a callback use MMessage::removeCallback.
// All callbacks that are registered by a plug-in must be removed by that
// plug-in when it is unloaded. Failure to do so will result in a fatal error.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MMessage.h>
#include <maya/MString.h>
// *****************************************************************************
// DECLARATIONS
class MObjectArray;
// *****************************************************************************
// CLASS DECLARATION (MAnimMessage)
/// Animation messages (OpenMayaAnim)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MAnimMessage : public MMessage
{
public:
/// AnimCurve edited callback
static MCallbackId addAnimCurveEditedCallback (
void (*func)(MObjectArray &editedCurves,
void *clientData),
void * clientData = NULL,
MStatus * ReturnStatus = NULL);
private:
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MAnimMessage */

View File

@ -0,0 +1,108 @@
#ifndef _MAnimUtil
#define _MAnimUtil
//
// *****************************************************************************
//-
// Copyright (C) 1999-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and
// are protected by the Canadian and US federal copyright law. They
// may not be disclosed to third parties or copied or duplicated, in
// whole or in part, without prior written consent of
// Alias|Wavefront Inc.
//
// Unpublished -- rights reserved under the Copyright Laws of
// the United States.
//+
// *****************************************************************************
//
// CLASS: MAnimUtil
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MAnimUtil)
//
// MAnimUtil is a static class which provides helper methods for determining
// whether or not an object is animated, which attributes for the object are
// animated, and finally there is a method which will find all the animation
// curves for a given attribute.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
class MPlug;
class MPlugArray;
class MObjectArray;
class MSelectionList;
class MDagPath;
// *****************************************************************************
// CLASS DECLARATION (MAnimUtil)
/// Static class providing common animation helper methods (OpenMayaAnim)
class OPENMAYAANIM_EXPORT MAnimUtil
{
public:
///
static bool isAnimated( const MObject &node,
bool checkParent = false,
MStatus * ReturnStatus = NULL );
///
static bool isAnimated( const MDagPath &path,
bool checkParent = false,
MStatus * ReturnStatus = NULL );
///
static bool isAnimated( const MPlug &plug,
bool checkParent = false,
MStatus * ReturnStatus = NULL );
///
static bool isAnimated( const MSelectionList &selectionList,
bool checkParent = false,
MStatus * ReturnStatus = NULL );
///
static bool findAnimatedPlugs( const MObject &node,
MPlugArray &animatedPlugs,
bool checkParent = false,
MStatus * ReturnStatus = NULL );
///
static bool findAnimatedPlugs( const MDagPath &path,
MPlugArray &animatedPlugs,
bool checkParent = false,
MStatus * ReturnStatus = NULL );
///
static bool findAnimatedPlugs( const MSelectionList &selectionList,
MPlugArray &animatedPlugs,
bool checkParent = false,
MStatus * ReturnStatus = NULL );
///
static bool findAnimation( const MPlug &plug,
MObjectArray &animation,
MStatus * ReturnStatus = NULL );
protected:
static const char* className();
private:
~MAnimUtil();
#ifdef __GNUC__
friend class shutUpAboutPrivateDestructors;
#endif
};
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MAnimUtil */

View File

@ -0,0 +1,41 @@
#ifndef _MApiVersion
#define _MApiVersion
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
#ifndef MNoVersionString
// Create 2 cpp macros which will allow use to get the value of
// the #define MAYA_API_VERSION into a string and assigned to
// the global variable.
#define _versionString1( _version ) _versionString2(_version)
#define _versionString2( _version ) PLUGIN_EXPORT char MApiVersion[] = #_version
#ifdef __cplusplus
extern "C" {
#endif
_versionString1(MAYA_API_VERSION);
#ifdef __cplusplus
}
#endif
// Delete the temporary macros
#undef _versionString1
#undef _versionString2
#endif // MNoVersionString
#endif /* _MApiVersion */

View File

@ -0,0 +1,129 @@
#ifndef _MArgDatabase
#define _MArgDatabase
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MArgDatabase
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MArgDatabase)
//
// This class is used to parse and store all of the flags, arguments
// and objects which are passed to a command. The MArgDatabase accepts
// an MSyntax object, which describes the format for a command, and uses
// it to parse the command arguments into a form which is easy to query.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
#include <maya/MArgParser.h>
// *****************************************************************************
// DECLARATIONS
class MSyntax;
class MSelectionList;
class MStringArray;
class MArgList;
class MDistance;
class MAngle;
class MTime;
// *****************************************************************************
// CLASS DECLARATION (MArgDatabase)
/// Command argument list parser.
/**
This class parses argument lists based on a syntax object (MSyntax)
which describes the format for a command.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MArgDatabase : public MArgParser
{
public:
///
MArgDatabase ();
///
MArgDatabase (const MSyntax &syntax,
const MArgList &argList,
MStatus *ReturnStatus = NULL);
///
virtual ~MArgDatabase();
///
MStatus getFlagArgument (const char *flag, unsigned index,
MSelectionList &result) const;
///
MStatus getCommandArgument (unsigned index, MSelectionList &result) const;
///
MStatus getObjects (MSelectionList &result) const;
// Redeclarations of overloaded methods from MArgParser
MStatus getFlagArgument (const char *flag, unsigned index,
bool &result) const;
MStatus getFlagArgument (const char *flag, unsigned index,
int &result) const;
MStatus getFlagArgument (const char *flag, unsigned index,
double &result) const;
MStatus getFlagArgument (const char *flag, unsigned index,
MString &result) const;
MStatus getFlagArgument (const char *flag, unsigned index,
unsigned &result) const;
MStatus getFlagArgument (const char *flag, unsigned index,
MDistance &result) const;
MStatus getFlagArgument (const char *flag, unsigned index,
MAngle &result) const;
MStatus getFlagArgument (const char *flag, unsigned index,
MTime &result) const;
MStatus getCommandArgument (unsigned index, bool &result) const;
MStatus getCommandArgument (unsigned index, int &result) const;
MStatus getCommandArgument (unsigned index, double &result) const;
MStatus getCommandArgument (unsigned index, MString &result) const;
MStatus getCommandArgument (unsigned index, MDistance &result) const;
MStatus getCommandArgument (unsigned index, MAngle &result) const;
MStatus getCommandArgument (unsigned index, MTime &result) const;
MStatus getObjects (MStringArray &result) const;
protected:
// No protected members
private:
const char *className() const;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MArgDatabase */

View File

@ -0,0 +1,180 @@
#ifndef _MArgList
#define _MArgList
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MArgList
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MArgList)
//
// This class is used to create and retreive argument lists that can be
// passed to API class methods that require arglists.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
#include <maya/MString.h>
// *****************************************************************************
// DECLARATIONS
class MVector;
class MPoint;
class MString;
class MVectorArray;
class MPointArray;
class MStringArray;
class MMatrix;
class MDoubleArray;
class MIntArray;
class MDistance;
class MAngle;
class MTime;
// *****************************************************************************
// CLASS DECLARATION (MArgList)
/// Create and retreive argument lists.
/**
Manipulate argument lists.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MArgList
{
public:
///
static const unsigned kInvalidArgIndex;
///
MArgList();
///
MArgList( const MArgList& in );
///
~MArgList();
///
unsigned length( MStatus* ReturnStatus= NULL ) const;
///
bool asBool( unsigned index, MStatus* ret=NULL ) const;
///
int asInt( unsigned index, MStatus* ret=NULL ) const;
///
double asDouble( unsigned index, MStatus* ret=NULL ) const;
///
MString asString( unsigned index, MStatus* ret=NULL ) const;
///
MDistance asDistance( unsigned index, MStatus* ret=NULL ) const;
///
MAngle asAngle( unsigned index, MStatus* ret=NULL ) const;
///
MTime asTime( unsigned index, MStatus* ret=NULL ) const;
///
MVector asVector( unsigned& indexReadAndUpdate,
unsigned numElements=3,
MStatus* ret=NULL ) const;
///
MPoint asPoint( unsigned& indexReadAndUpdate,
unsigned numElements=3, MStatus* ret=NULL ) const;
///
MStatus get( unsigned index, bool& ) const;
///
MStatus get( unsigned index, int& ) const;
///
MStatus get( unsigned index, double& ) const;
///
MStatus get( unsigned index, MString& ) const;
///
MStatus get( unsigned index, MDistance& ) const;
///
MStatus get( unsigned index, MAngle& ) const;
///
MStatus get( unsigned index, MTime& ) const;
///
MStatus get( unsigned& indexReadAndUpdate, MVector&,
unsigned numElements=3 ) const;
///
MStatus get( unsigned& indexReadAndUpdate, MPoint&,
unsigned numElements=3 ) const;
///
MStatus get( unsigned& indexReadAndUpdate, MMatrix& ) const;
///
MStatus get( unsigned& indexReadAndUpdate, MIntArray& ) const;
///
MStatus get( unsigned& indexReadAndUpdate, MDoubleArray& ) const;
///
MStatus get( unsigned& indexReadAndUpdate, MStringArray& ) const;
///
MArgList& operator =( const MArgList& other );
// Argument list helper methods
///
unsigned flagIndex ( const char *shortFlag,
const char *longFlag = NULL ) const;
// Command argument construction methods
///
MStatus addArg( bool arg );
///
MStatus addArg( int arg );
///
MStatus addArg( double arg );
///
MStatus addArg( const MString & arg );
///
MStatus addArg( const MDistance & arg );
///
MStatus addArg( const MAngle & arg );
///
MStatus addArg( const MTime & arg );
///
MStatus addArg( const MVector & arg );
///
MStatus addArg( const MPoint & arg );
protected:
// No protected members
private:
const char* className() const;
MArgList ( const void*, unsigned offset );
const void* fArgList;
unsigned fOffset;
bool fOwn;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MArgList */

View File

@ -0,0 +1,158 @@
#ifndef _MArgParser
#define _MArgParser
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MArgParser
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MArgParser)
//
// This class is used to parse and store all of the flags, arguments
// and objects which are passed to a command. The MArgParser accepts
// an MSyntax object, which describes the format for a command, and uses
// it to parse the command arguments into a form which is easy to query.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
class MSyntax;
class MSelectionList;
class MStringArray;
class MArgList;
class MDistance;
class MAngle;
class MTime;
// *****************************************************************************
// CLASS DECLARATION (MArgParser)
/// Command argument list parser
/**
This class parses argument lists based on a syntax object (MSyntax)
which describes the format for a command.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MArgParser
{
public:
///
MArgParser();
///
MArgParser (const MSyntax &syntax,
const MArgList &argList,
MStatus *ReturnStatus = NULL);
///
virtual ~MArgParser();
///
bool isFlagSet (const char *flag,
MStatus *ReturnStatus = NULL) const;
///
bool isEdit (MStatus *ReturnStatus = NULL) const;
///
bool isQuery (MStatus *ReturnStatus = NULL) const;
///
unsigned numberOfFlagsUsed () const;
///
unsigned numberOfFlagUses (const char *flag) const;
///
MStatus getFlagArgument (const char *flag, unsigned index,
bool &result) const;
///
MStatus getFlagArgument (const char *flag, unsigned index,
int &result) const;
///
MStatus getFlagArgument (const char *flag, unsigned index,
double &result) const;
///
MStatus getFlagArgument (const char *flag, unsigned index,
MString &result) const;
///
MStatus getFlagArgument (const char *flag, unsigned index,
unsigned &result) const;
///
MStatus getFlagArgument (const char *flag, unsigned index,
MDistance &result) const;
///
MStatus getFlagArgument (const char *flag, unsigned index,
MAngle &result) const;
///
MStatus getFlagArgument (const char *flag, unsigned index,
MTime &result) const;
///
MStatus getFlagArgumentPosition
(const char *flag, unsigned i,
unsigned &position) const;
///
MStatus getFlagArgumentList (const char *flag, unsigned i,
MArgList& args) const;
///
MStatus getCommandArgument (unsigned index, bool &result) const;
///
MStatus getCommandArgument (unsigned index, int &result) const;
///
MStatus getCommandArgument (unsigned index, double &result) const;
///
MStatus getCommandArgument (unsigned index, MString &result) const;
///
MStatus getCommandArgument (unsigned index, MDistance &result) const;
///
MStatus getCommandArgument (unsigned index, MAngle &result) const;
///
MStatus getCommandArgument (unsigned index, MTime &result) const;
///
MStatus getObjects (MStringArray &result) const;
protected:
bool fOwn;
void *apiData;
private:
const char *className() const;
MArgParser (void *);
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MArgParser */

View File

@ -0,0 +1,112 @@
#ifndef _MArrayDataBuilder
#define _MArrayDataBuilder
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MArrayDataBuilder
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MArrayDataBuilder)
//
// An MArrayDataBuilder is used to construct data for attributes/plugs that
// have an array of data. An array builder is used with an MArrayDataHandle
// for managing data.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
#include <maya/MDataHandle.h>
#include <maya/MArrayDataHandle.h>
// *****************************************************************************
// FORWARD DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MArrayDataBuilder)
/// Array builder for arrays in data blocks
/**
An MArrayDataBuilder is used to build array data for attributes/plugs
that support arrays.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MArrayDataBuilder
{
public:
///
MArrayDataBuilder ( const MObject & attribute, unsigned numElements,
MStatus * ReturnStatus = NULL );
///
MDataHandle addLast(MStatus * ReturnStatus = NULL);
///
MDataHandle addElement( unsigned index,
MStatus * ReturnStatus = NULL );
///
MArrayDataHandle addLastArray(MStatus * ReturnStatus = NULL );
///
MArrayDataHandle addElementArray( unsigned index,
MStatus * ReturnStatus = NULL );
///
MStatus removeElement( unsigned index );
///
unsigned elementCount( MStatus * ReturnStatus = NULL ) const;
///
MStatus growArray( unsigned amount );
///
MStatus setGrowSize( unsigned size );
///
MArrayDataBuilder( const MArrayDataBuilder &other );
///
MArrayDataBuilder& operator=( const MArrayDataBuilder& other );
///
~MArrayDataBuilder();
protected:
// No protected members
private:
const char* className() const;
friend class MArrayDataHandle;
MArrayDataBuilder();
MArrayDataBuilder( void* );
char data[24];
bool fIsNull;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MArrayDataBuilder */

View File

@ -0,0 +1,131 @@
#ifndef _MArrayDataHandle
#define _MArrayDataHandle
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MArrayDataHandle
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MArrayDataHandle)
//
// An MArrayDataHandle is a smart pointer into a data block (MDataBlock) that
// handles access to array data. MArrayDataHandle supports attributes that
// can have an array of data.
//
// The array indices do not have to be continuous. The array can be sparse.
// Thus, an array could have four elements with the indicies 1, 6, 8, and 10.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
#include <string.h>
#include <maya/MArrayDataBuilder.h>
#include <maya/MDataHandle.h>
#include <maya/MArrayDataHandle.h>
// *****************************************************************************
// FORWARD DECLARATIONS
class MArrayDataBuilder;
// *****************************************************************************
// CLASS DECLARATION (MArrayDataHandle)
/// Data block handle for array data
/**
An MArrayDataHandle is a smart pointer into an MDataBlock that
handles array data.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MArrayDataHandle {
public:
///
MArrayDataHandle( const MDataHandle & in, MStatus * ReturnStatus = NULL );
///
MDataHandle inputValue(MStatus *ReturnStatus = NULL);
///
MDataHandle outputValue(MStatus *ReturnStatus = NULL);
///
MArrayDataHandle inputArrayValue( MStatus * ReturnStatus = NULL );
///
MArrayDataHandle outputArrayValue( MStatus * ReturnStatus = NULL );
///
MStatus next();
///
unsigned elementCount(MStatus *ReturnStatus = NULL);
///
unsigned elementIndex(MStatus *ReturnStatus = NULL);
///
MStatus jumpToElement( unsigned index );
///
MStatus setClean();
///
MStatus setAllClean();
///
MArrayDataBuilder builder(MStatus *ReturnStatus = NULL);
///
MStatus set( MArrayDataBuilder & );
///
MArrayDataHandle( const MArrayDataHandle &other );
///
MArrayDataHandle& operator=( const MArrayDataHandle& other );
protected:
// No protected members
private:
const char* className() const;
friend class MDataBlock;
friend class MArrayDataBuilder;
MArrayDataHandle( void* );
MArrayDataHandle();
char data[20];
bool fIsNull;
};
inline MArrayDataHandle::MArrayDataHandle( const MArrayDataHandle &other )
{
memcpy( this, &other, sizeof(MArrayDataHandle) );
}
inline MArrayDataHandle& MArrayDataHandle::operator=(
const MArrayDataHandle &other )
{
memcpy( this, &other, sizeof(MArrayDataHandle) );
return *this;
}
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MArrayDataHandle */

View File

@ -0,0 +1,146 @@
#ifndef _MAttributeIndex
#define _MAttributeIndex
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MAttributeIndex
//
// Class that provides access to the index part of an attribute
// specification (MAttributeSpec).
//
// See MAttributeSpec for more information.
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MAttributeIndex)
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MStatus.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MAttributeIndex)
/// The index information for an attribute specification
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MAttributeIndex {
public:
///
enum MIndexType {
///
kInteger,
///
kFloat
};
///
MAttributeIndex();
///
~MAttributeIndex();
///
MAttributeIndex( const MAttributeIndex & );
///
MAttributeIndex( int );
///
MAttributeIndex( double );
public:
///
MIndexType type() const;
///
bool hasRange() const;
///
bool hasValidRange() const;
///
bool hasLowerBound() const;
///
bool hasUpperBound() const;
///
MStatus getLower( int & ) const;
///
MStatus getLower( double & ) const;
///
MStatus getUpper( int & ) const;
///
MStatus getUpper( double & ) const;
///
bool isBounded() const;
///
MStatus getValue( int & ) const;
///
MStatus getValue( double & ) const;
public:
///
MStatus setType( MIndexType );
///
MStatus setValue( int );
///
MStatus setValue( double );
///
MStatus setLower( int );
///
MStatus setLower( double );
///
MStatus setUpper( int );
///
MStatus setUpper( double );
public:
///
MAttributeIndex & operator=( const MAttributeIndex & );
///
bool operator==( const MAttributeIndex & ) const;
///
bool operator!=( const MAttributeIndex & ) const;
private:
MAttributeIndex( void* );
friend class MAttributeSpec;
void* data;
bool own;
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MAttributeIndex */

View File

@ -0,0 +1,132 @@
#ifndef _MAttributeSpec
#define _MAttributeSpec
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MAttributeSpec
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MAttributeSpec)
//
// 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
// }
// }
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
class MAttributeIndex;
class MString;
// *****************************************************************************
// CLASS DECLARATION (MAttributeSpec)
/// An attribute specification
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MAttributeSpec {
public:
///
MAttributeSpec();
///
MAttributeSpec( const char * );
///
MAttributeSpec( const MString & );
///
MAttributeSpec( const MAttributeSpec & );
///
~MAttributeSpec();
public:
///
const MString name() const;
///
int dimensions() const;
///
void setName( const MString & );
///
void setDimensions( int );
public:
///
MAttributeSpec & operator =(const MAttributeSpec &);
///
const MAttributeIndex operator [](int) const;
///
MAttributeIndex operator[](int);
///
bool operator==(const MAttributeSpec &) const;
private:
MAttributeSpec( void* );
void* data;
bool own;
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MAttributeSpec */

View File

@ -0,0 +1,110 @@
#ifndef _MAttributeSpecArray
#define _MAttributeSpecArray
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MAttributeSpecArray
//
// Array class for MAttributeSpec.
//
// See MAttributeSpec for more information.
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MAttributeSpecArray)
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MStatus.h>
// *****************************************************************************
// DECLARATIONS
class MAttributeSpec;
// *****************************************************************************
// CLASS DECLARATION (MAttributeSpecArray)
/// An attribute specification array
/**
Implement an array of MAttributeSpecs data type.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MAttributeSpecArray
{
public:
///
MAttributeSpecArray();
///
MAttributeSpecArray( const MAttributeSpecArray& other );
///
~MAttributeSpecArray();
///
MAttributeSpec operator[]( unsigned index ) const;
///
MAttributeSpecArray & operator=( const MAttributeSpecArray & other );
///
MStatus set( const MAttributeSpec& element, unsigned index );
///
MStatus setLength( unsigned length );
///
unsigned length() const;
///
MStatus remove( unsigned index );
///
MStatus insert( const MAttributeSpec & element, unsigned index );
///
MStatus append( const MAttributeSpec & element );
///
MStatus clear();
///
void setSizeIncrement ( unsigned newIncrement );
///
unsigned sizeIncrement () const;
protected:
// No protected members
private:
MAttributeSpecArray( void* );
void * arr;
bool own;
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MAttributeSpecArray */

View File

@ -0,0 +1,121 @@
#ifndef _MBoundingBox
#define _MBoundingBox
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MBoundingBox
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MBoundingBox)
//
// This class provides an implementation of a bounding box. A bounding box
// describes a volume in space that bounds a piece of geometry.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MPoint.h>
// PDB
#if defined(_WIN32)
#undef min
#undef max
#endif // _WIN32
// *****************************************************************************
// DECLARATIONS
class MMatrix;
// *****************************************************************************
// CLASS DECLARATION (MBoundingBox)
/// implementation of a 3D bounding box
/**
This class implements a 3D bounding box
*/
#if defined(_WIN32)
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MBoundingBox
{
public:
///
MBoundingBox();
///
MBoundingBox( const MBoundingBox & src );
///
MBoundingBox( const MPoint &corner1, const MPoint &corner2 );
///
~MBoundingBox();
///
void clear();
///
void transformUsing ( const MMatrix &matrix );
///
void expand( const MPoint & point );
///
void expand( const MBoundingBox & box );
///
bool contains( const MPoint & point ) const;
///
double width() const;
///
double height() const;
///
double depth() const;
///
MPoint center() const;
///
MPoint min() const;
///
MPoint max() const;
///
MBoundingBox & operator=( const MBoundingBox & other );
protected:
// No protected members
private:
#if defined(OSMac_)
char data[52];
#else
double data[6];
#endif
};
#if defined(_WIN32)
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MBoundingBox */

View File

@ -0,0 +1,158 @@
#ifndef _MColor
#define _MColor
//
//-
// ==========================================================================
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// ==========================================================================
//+
//
// CLASS: MColor
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MColor)
//
// This class provides a type used to get/set values of color attributes in
// dependency nodes. It represents colors as an RGB triple.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MIOStream.h>
// *****************************************************************************
// CLASS DECLARATION (MColor)
/// A color math class
/**
This class is used to store values of color-related dependency graph node
attributes.
*/
#if defined(_WIN32)
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MColor
{
public:
///
enum MColorType {
///
kRGB,
///
kHSV,
///
kCMY,
///
kCMYK
};
///
MColor();
///
MColor( const MColor&);
///
MColor( float rr, float gg, float bb=0.0, float aa=1.0 );
///
MColor( const float[3] );
///
MColor( MColorType colorModel,
unsigned char, unsigned char, unsigned char,
unsigned char alpha=255U );
///
MColor( MColorType colorModel,
unsigned short, unsigned short, unsigned short,
unsigned short alpha=65535U );
///
MColor( MColorType colorModel, float, float, float,
float alpha=1.0 );
///
MColor( MColorType colorModel, double, double, double,
double alpha=1.0 );
///
~MColor();
///
MColor& operator= ( const MColor& src );
///
float& operator()( unsigned i );
///
float operator()( unsigned i ) const;
///
float& operator[]( unsigned i );
///
float operator[]( unsigned i )const;
///
MColor& operator/=( float scalar );
///
MColor operator/( float scalar ) const;
///
MColor& operator*=( float scalar );
///
MColor operator*( float scalar ) const;
///
friend OPENMAYA_EXPORT MColor operator*( float, const MColor&);
///
MColor operator+( const MColor& other) const;
///
MColor& operator+=( const MColor& other );
///
MColor operator-() const;
///
MColor operator-( const MColor& other ) const;
///
MColor operator*( const MColor& other ) const;
///
MColor& operator*=( const MColor& other );
///
bool operator!=( const MColor& other ) const;
///
bool operator==( const MColor& other ) const;
///
bool get( float[3] ) const;
///
friend OPENMAYA_EXPORT IOS_REF(ostream)& operator<<(IOS_REF(ostream)& os, const MColor& c);
/// the red component of the color
float r;
/// the green component of the color
float g;
/// the blue component of the color
float b;
/// the alpha component of the color
float a;
protected:
// No protected members
private:
// No private members
};
#if defined(_WIN32)
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MColor */

View File

@ -0,0 +1,129 @@
#ifndef _MColorArray
#define _MColorArray
//
//-
// ==========================================================================
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// ==========================================================================
//+
//
//
// CLASS: MColorArray
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MColorArray)
//
// This class implements an array of MColor's. Common convenience functions
// are available, and the implementation is compatible with the internal
// Maya implementation so that it can be passed efficiently between plugins
// and internal maya data structures.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MStatus.h>
#include <maya/MColor.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MColorArray)
/// Array of MColor data type
/**
Implement an array of MColor data type.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MColorArray
{
public:
///
MColorArray();
///
MColorArray( const MColorArray& other );
///
MColorArray( const MColor colors[], unsigned count );
///
MColorArray( const float colors[][4], unsigned count );
///
MColorArray( const double colors[][4], unsigned count );
///
MColorArray( unsigned initialSize,
const MColor &initialValue );
///
~MColorArray();
///
const MColor& operator[]( unsigned index ) const;
///
MColor& operator[]( unsigned index );
///
MColorArray & operator=( const MColorArray & other );
///
MStatus set( const MColor& element, unsigned index );
///
MStatus set( unsigned index, float r, float g, float b, float a=1 );
///
MStatus set( float element[4], unsigned index);
///
MStatus setLength( unsigned length );
///
unsigned length() const;
///
MStatus remove( unsigned index );
///
MStatus insert( const MColor & element, unsigned index );
///
MStatus append( const MColor & element );
///
MStatus append( float r, float g, float b, float a=1 );
///
MStatus clear();
///
MStatus get( float [][4] ) const;
///
void setSizeIncrement ( unsigned newIncrement );
///
unsigned sizeIncrement () const;
///
friend OPENMAYA_EXPORT IOS_REF(ostream) &operator<<(IOS_REF(ostream) &os,
const MColorArray &array);
protected:
// No protected members
private:
MColorArray( void* );
void * arr;
bool own;
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MColorArray */

View File

@ -0,0 +1,132 @@
#ifndef _MCommandResult
#define _MCommandResult
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MCommandResult
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MCommandResult)
//
// An MCommandResult collects the result returned by MGlobal::executeCommand.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MObject.h>
// *****************************************************************************
// FORWARD DECLARATIONS
class MIntArray;
class MDoubleArray;
class MString;
class MStringArray;
class MVector;
class MVectorArray;
class MMatrix;
// *****************************************************************************
// *****************************************************************************
// CLASS DECLARATION (MCommandResult)
/// Result returned from executing a command.
/**
An MCommandResult collects the result returned by MGlobal::executeCommand.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MCommandResult {
public:
/// Itemize the mel command result types:
enum Type {
///
kInvalid = 0,
///
kInt,
///
kIntArray,
///
kDouble,
///
kDoubleArray,
///
kString,
///
kStringArray,
///
kVector,
///
kVectorArray,
///
kMatrix,
///
kMatrixArray
};
///
MCommandResult(MStatus* ReturnStatus = NULL );
///
virtual ~MCommandResult();
///
Type resultType(MStatus* ReturnStatus = NULL) const;
///
MStatus getResult( int& ) const;
///
MStatus getResult( MIntArray& ) const;
///
MStatus getResult( double& ) const;
///
MStatus getResult( MDoubleArray& ) const;
///
MStatus getResult( MString& ) const;
///
MStatus getResult( MStringArray& ) const;
///
MStatus getResult( MVector& ) const;
///
MStatus getResult( MVectorArray& ) const;
///
MStatus getResult( MDoubleArray& result,
int &numRows, int &numColumns) const;
protected:
// No protected members
private:
const char* className() const;
void *fResult;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MCommandResult */

View File

@ -0,0 +1,96 @@
#ifndef _MComputation
#define _MComputation
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MComputation
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MComputation)
//
// An MComputation allows long computations to check for user interrupts. It is
// very simple to use. Create a new MComputation object and call the
// beginComputation method at the beginning of the computation and call
// the endComputation method when you finish. Then, during the computation,
// use the isInterruptRequested method to check if the user has requested
// that the computation terminate.
//
// Example:
//
// MComputation computation;
// computation.beginComputation();
// for (int i= 1; i<1000; i++) {
// Computation(); // Some expensive operation
// if (computation.isInterruptRequested()) break ;
// }
// computation.endComputation();
//
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
// *****************************************************************************
// FORWARD DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MComputation)
/// Interupt monitor for long computations
/**
An MComputation is used to monitor user-interupts during int computations.
*/
#if defined(_WIN32)
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MComputation {
public:
///
MComputation();
///
virtual ~MComputation();
///
void beginComputation();
///
bool isInterruptRequested();
///
void endComputation();
protected:
// No protected members
private:
const char* className() const;
void *f_data;
};
#if defined(_WIN32)
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MComputation */

View File

@ -0,0 +1,109 @@
#ifndef _MConditionMessage
#define _MConditionMessage
//
// *****************************************************************************
// Copyright (C) 1999-2003 Alias | Wavefront, Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias | Wavefront, Inc. and
// are protected by the Canadian and US federal copyright law. They
// may not be disclosed to third parties or copied or duplicated, in
// whole or in part, without prior written consent of
// Alias | Wavefront Inc.
//
// Unpublished -- rights reserved under the Copyright Laws of
// the United States.
//
// *****************************************************************************
//
// CLASS: MConditionMessage
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MConditionMessage)
//
// This class is used to register callbacks for changes to specific
// conditions and/or to determine the current state of a condition.
//
// The addConditionCallback method allows callbacks to be registered
// for the following messages:
// Condition Changed
//
// The first parameter passed to the add callback method is the
// name of the condition that will trigger the callback. The names of
// available conditions can be retrieved with the getConditionNames
// method.
//
// Callbacks that are registered for conditions will be passed an
// bool parameter that is the state of the condition.
//
// Each method returns an id which is used to remove the callback.
//
// To remove a callback use MMessage::removeCallback.
//
// All callbacks that are registered by a plug-in must be removed by that
// plug-in when it is unloaded. Failure to do so will result in a fatal error.
//
// The getConditionState method is used to return the current status
// of the specified condition.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MMessage.h>
#include <maya/MString.h>
#include <maya/MStringArray.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MConditionMessage)
/// Condition change messages
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MConditionMessage : public MMessage
{
public:
///
static MCallbackId addConditionCallback(
const MString& condition,
void (*func)( bool state,
void* clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
///
static MStatus getConditionNames( MStringArray & names );
///
static bool getConditionState( const MString& condition,
MStatus * ReturnStatus = NULL );
private:
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MConditionMessage */

View File

@ -0,0 +1,114 @@
#ifndef _MCursor
#define _MCursor
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MCursor
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MCursor)
//
// The MCursor class implements a cursor class, and is used to pass
// all cursor arguments to Maya API methods.
// The data passed to the MCursor constructor is in xbm format.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MCursor)
/// Manipulate Cursors. (OpenMayaUI)
/**
Implement a cursor.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MCursor
{
public:
#ifdef _WIN32
/// NT constructor
MCursor( LPCSTR pszResource );
#else
/// IRIX constructor
MCursor(short width,
short height,
short hotSpotX,
short hotSpotY,
unsigned char * bits,
unsigned char * mask );
#endif
///
MCursor(const MCursor& other);
///
~MCursor();
///
MCursor & operator=(const MCursor &);
///
bool operator==(const MCursor &) const;
///
bool operator!=(const MCursor &) const;
/// Maya default cursor, the left arrow.
static MCursor defaultCursor;
/// '+' cursor.
static MCursor crossHairCursor;
/// '+' cursor with double lines.
static MCursor doubleCrossHairCursor;
/// Wedge-shaped arrow pointing left.
static MCursor editCursor;
/// Pencil shape.
static MCursor pencilCursor;
/// Open hand shaped cursor.
static MCursor handCursor;
protected:
// No protected members
private:
MCursor();
MCursor(const void *);
const void* apiData;
const void* apiData2;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MCursor */

View File

@ -0,0 +1,112 @@
#ifndef _MDGContext
#define _MDGContext
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDGContext
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDGContext)
//
// This class provides methods for accessing dependency graph contexts.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
class MObject;
class MTime;
// *****************************************************************************
// CLASS DECLARATION (MDGContext)
/// Dependency graph context class
/**
Control the way in which dependency nodes are evaluated.
*/
#if defined(_WIN32)
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MDGContext
{
public:
// Normal
///
MDGContext( );
// Timed
///
MDGContext( const MTime & when );
///
MDGContext( const MDGContext& in );
///
~MDGContext();
// Method for determining whether the context is the "normal" one,
// ie. the one used for normal evaluation
///
bool isNormal( MStatus * ReturnStatus = NULL ) const;
///
MStatus getTime( MTime & );
///
MDGContext& operator =( const MDGContext& other );
// Default context "Normal"
///
static MDGContext fsNormal;
protected:
// No protected members
private:
const void * data;
bool fOwn;
friend class MPlug;
friend class MDataBlock;
const char* className() const;
MDGContext( const void* );
};
#if defined(_WIN32)
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDGContext */

View File

@ -0,0 +1,126 @@
#ifndef _MDGMessage
#define _MDGMessage
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDGMessage
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDGMessage)
//
// This class is used to register callbacks for dependency graph messages.
// There are 4 add callback methods which will add callbacks for the
// following messages
// Time change
// Node Added
// Node Removed
// Connection made or broken
//
// A filter can be specified for node added/removed messages. The default
// node type is "dependNode" which matches all nodes.
// Each method returns an id which is used to remove the callback.
//
// To remove a callback use MMessage::removeCallback.
// All callbacks that are registered by a plug-in must be removed by that
// plug-in when it is unloaded. Failure to do so will result in a fatal error.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MMessage.h>
#include <maya/MString.h>
// *****************************************************************************
// DECLARATIONS
class MTime;
class MObject;
class MPlug;
#define kDefaultNodeType "dependNode"
// *****************************************************************************
// CLASS DECLARATION (MDGMessage)
/// Dependency graph messages
/**
*/
#if defined(_WIN32)
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MDGMessage : public MMessage
{
public:
/// TimeChange callback
static MCallbackId addTimeChangeCallback(
void (*func)( MTime& time,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
/// ForceUpdate callback
static MCallbackId addForceUpdateCallback(
void (*func)( MTime& time,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
/// NodeAdded callback
static MCallbackId addNodeAddedCallback(
void (*func)( MObject& node,
void* clientData ),
const MString& nodeType = kDefaultNodeType,
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
/// NodeRemoved callback
static MCallbackId addNodeRemovedCallback(
void (*func)( MObject& node,
void* clientData ),
const MString& nodeType = kDefaultNodeType,
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
/// Connection callback
static MCallbackId addConnectionCallback(
void (*func)( MPlug& srcPlug,
MPlug& destPlug,
bool made,
void* clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
private:
static const char* className();
};
#if defined(_WIN32)
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDGMessage */

View File

@ -0,0 +1,137 @@
#ifndef _MDGModifier
#define _MDGModifier
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDGModifier
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDGModifier)
//
// An MDGModifier is used to change the structure of the dependency graph. This
// includes adding nodes, making new connections, and removing existing
// connections. An MDGModifier keeps track of all operations that it is
// used for, so that they can be undone or redone. Calling undo causes an
// MDGModifier to undo all of the dependency graph changes that it has
// done.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MFnDependencyNode.h>
// *****************************************************************************
// DECLARATIONS
class MObject;
class MPlug;
class MTypeId;
class MString;
// *****************************************************************************
// CLASS DECLARATION (MDGModifier)
/// Dependency graph modifier
/**
A class that is used to modify the dependency graph and also supports undo
*/
#if defined(_WIN32)
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MDGModifier
{
public:
///
MDGModifier();
///
virtual ~MDGModifier();
///
MObject createNode( const MTypeId &typeId,
MStatus* ReturnStatus = NULL );
///
MObject createNode( const MString &type,
MStatus* ReturnStatus = NULL );
///
MStatus deleteNode( const MObject & node );
///
MStatus renameNode( const MObject & node, const MString &newName );
///
MStatus setNodeLockState( const MObject & node, bool newState );
///
MStatus connect( const MObject & sourceNode,
const MObject & sourceAttr,
const MObject & destNode,
const MObject & destAttr );
///
MStatus disconnect( const MObject & sourceNode,
const MObject & sourceAttr,
const MObject & destNode,
const MObject & destAttr );
///
MStatus connect( const MPlug& source, const MPlug& dest );
///
MStatus disconnect( const MPlug& source, const MPlug& dest );
///
MStatus addAttribute( const MObject& node, const MObject& attribute,
MFnDependencyNode::MAttrClass type
= MFnDependencyNode::kLocalDynamicAttr );
///
MStatus removeAttribute( const MObject& node, const MObject& attribute,
MFnDependencyNode::MAttrClass type
= MFnDependencyNode::kLocalDynamicAttr );
///
MStatus commandToExecute( const MString& command );
///
MStatus doIt();
///
MStatus undoIt();
protected:
MDGModifier( void * );
MDGModifier( const MDGModifier & other );
MDGModifier& operator =( const MDGModifier & rhs );
void* data;
bool fOwn;
private:
static const char* className();
};
#if defined(_WIN32)
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDGModifier */

View File

@ -0,0 +1,287 @@
#ifndef _MDagMessage
#define _MDagMessage
//
// *****************************************************************************
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// *****************************************************************************
//
// CLASS: MDagMessage
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDagMessage)
//
// This class is used to register callbacks for Dag messages.
// There are 4 add callback methods which will add callbacks for the
// following messages
// Time change
// Node Added
// Node Removed
// Connection made or broken
//
// A filter can be specified for node added/removed messages. The default
// node type is "dependNode" which matches all nodes.
// Each method returns an id which is used to remove the callback.
//
// To remove a callback use MMessage::removeCallback.
// All callbacks that are registered by a plug-in must be removed by that
// plug-in when it is unloaded. Failure to do so will result in a fatal error.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MMessage.h>
#include <maya/MString.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MDagMessage)
class MDagPath;
/// Dependency graph messages
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MDagMessage : public MMessage
{
public:
/// The type of DAG changed messages that have occurred
enum DagMessage {
/// an invalid message was used.
kInvalidMsg = -1,
/// a dummy enum used for looping through the message types
kParentAdded,
/// a parent was removed from a DAG node
kParentRemoved,
/// a child was added to a DAG node
kChildAdded,
/// a child was removed from a DAG node
kChildRemoved,
/// a child of a DAG node was reordered
kChildReordered
};
public:
// Parent added callback for all nodes
///
static MCallbackId addParentAddedCallback(
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Parent added callback for a specified node
///
static MCallbackId addParentAddedCallback(
MDagPath &dagPath,
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Parent removed callback for all nodes
///
static MCallbackId addParentRemovedCallback(
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Parent removed callback for a specified node
///
static MCallbackId addParentRemovedCallback(
MDagPath &dagPath,
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Child added callback for all nodes
///
static MCallbackId addChildAddedCallback(
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Child added callback for a specified node
///
static MCallbackId addChildAddedCallback(
MDagPath &dagPath,
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Child removed callback for all nodes
///
static MCallbackId addChildRemovedCallback(
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Child removed callback for a specified node
///
static MCallbackId addChildRemovedCallback(
MDagPath &dagPath,
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Child reordered callback for all nodes
///
static MCallbackId addChildReorderedCallback(
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Child reordered callback for a specified node
///
static MCallbackId addChildReorderedCallback(
MDagPath &dagPath,
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Any Dag change callback for all nodes
///
static MCallbackId addDagCallback(
DagMessage msgType,
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Any Dag change callback for a specified node
///
static MCallbackId addDagCallback(
MDagPath &dagPath,
DagMessage msgType,
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Any DAG change callback with the DagMessage for all nodes
///
static MCallbackId addDagCallback(
DagMessage msgType,
void (*func)( DagMessage msgType,
MDagPath &child,
MDagPath &parent,
void *clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Any Dag change callback with the DagMessage for a specified node
///
static MCallbackId addDagCallback(
MDagPath &dagPath,
DagMessage msgType,
void (*func)( DagMessage msgType,
MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Adds a Dag change callback for all known Dag change messages for
// all nodes.
///
static MCallbackId addAllDagChangesCallback(
void (*func)( DagMessage msgType,
MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
// Adds a Dag change callback for all known Dag change messages for
// the specified node.
///
static MCallbackId addAllDagChangesCallback(
MDagPath &dagPath,
void (*func)( DagMessage msgType,
MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
private:
static MCallbackId addDagCallback(
MDagPath *dagPath,
DagMessage msgType,
void (*func)( MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
static MCallbackId addDagCallback(
MDagPath *dagPath,
DagMessage msgType,
void (*func)( DagMessage msgType,
MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
static MCallbackId addAllDagChangesCallback(
MDagPath *dagPath,
void (*func)( DagMessage msgType,
MDagPath &child,
MDagPath &parent,
void * clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDagMessage */

View File

@ -0,0 +1,99 @@
#ifndef _MDagModifier
#define _MDagModifier
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDagModifier
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDagModifier)
//
// An MDagModifier is used to change the structure DAG. This
// includes adding nodes, making new connections, and removing existing
// connections. An MDagModifier keeps track of all operations that it is
// used for, so that they can be undone or redone. Calling undo causes an
// MDagModifier to undo all of the dependency graph changes that it has
// done.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MFnDependencyNode.h>
#include <maya/MDGModifier.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MDagModifier)
/// Dependency graph modifier
/**
A class that is used to modify the DAG and also supports undo
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MDagModifier : public MDGModifier
{
public:
///
MDagModifier();
///
~MDagModifier();
///
MObject createNode( const MTypeId &typeId,
const MObject & parent = MObject::kNullObj,
MStatus* ReturnStatus = NULL );
///
MObject createNode( const MString &type,
const MObject & parent = MObject::kNullObj,
MStatus* ReturnStatus = NULL );
///
MStatus reparentNode( const MObject & node,
const MObject & newParent = MObject::kNullObj );
protected:
MDagModifier(void*);
MDagModifier( const MDagModifier & other );
MDagModifier& operator =( const MDagModifier & rhs );
private:
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDagModifier */

View File

@ -0,0 +1,164 @@
#ifndef _MDagPath
#define _MDagPath
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDagPath
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDagPath)
//
// The DAG Path Class provides methods for obtaining one or all Paths to a
// specified DAG Node, determining if a Path is valid and if two Paths are
// equivalent, obtaining the length, transform, and inclusive and exclusive
// matrices of Path, as well as performing Path to Path assignment.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
#include <maya/MStatus.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
class MMatrix;
class MDagPathArray;
class MString;
// *****************************************************************************
// CLASS DECLARATION (MDagPath)
/// DAG Path
/**
Provides methods for obtaining one or all Paths to a specified DAG Node,
determining if a Path is valid and if two Paths are equivalent, obtaining the
length, transform, and inclusive and exclusive matrices of a Path, as well as
performing Path to Path assignment.
DAG Paths may be used as parameters to some methods in the DAG Node Function
Set (MFnDagNode).
It is often useful to combine DAG Paths into DAG Path arrays (MDagPathArray).
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MDagPath
{
public:
///
MDagPath();
///
MDagPath( const MDagPath& src );
///
virtual ~MDagPath();
///
static MStatus getAllPathsTo( const MObject & entity,
MDagPathArray & pathArray );
///
static MStatus getAPathTo( const MObject & entity,
MDagPath & path );
///
bool hasFn( MFn::Type type,
MStatus * ReturnStatus = NULL ) const;
///
MFn::Type apiType(MStatus * ReturnStatus = NULL) const;
///
bool isValid(MStatus * ReturnStatus = NULL) const;
///
MObject node(MStatus * ReturnStatus = NULL) const;
///
MObject transform( MStatus * ReturnStatus = NULL ) const;
///
unsigned int length(MStatus * ReturnStatus = NULL) const;
///
MStatus extendToShape();
///
MStatus push( const MObject &child );
///
MStatus pop( unsigned num = 1 );
///
unsigned childCount( MStatus * ReturnStatus = NULL ) const;
///
MObject child( unsigned i, MStatus * ReturnStatus = NULL ) const;
///
MMatrix inclusiveMatrix(MStatus * ReturnStatus = NULL) const;
///
MMatrix exclusiveMatrix(MStatus * ReturnStatus = NULL) const;
///
MMatrix inclusiveMatrixInverse(MStatus * ReturnStatus = NULL)const;
///
MMatrix exclusiveMatrixInverse(MStatus * ReturnStatus = NULL)const;
///
MDagPath& operator = ( const MDagPath& src);
///
bool operator == ( const MDagPath& src) const;
///
MStatus set( const MDagPath& src);
///
unsigned pathCount(MStatus * ReturnStatus = NULL) const;
///
MStatus getPath( MDagPath & path, unsigned i = 0 ) const;
///
MString fullPathName(MStatus *ReturnStatus = NULL) const;
///
MString partialPathName(MStatus *ReturnStatus = NULL) const;
///
bool isInstanced( MStatus *ReturnStatus = NULL ) const;
///
unsigned instanceNumber( MStatus *ReturnStatus = NULL ) const;
/// OBSOLETE
static MDagPath getAPathTo( const MObject & entity,
MStatus * ReturnStatus = NULL );
protected:
// No protected members
private:
static const char* className();
void * data;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDagPath */

View File

@ -0,0 +1,118 @@
#ifndef _MDagPathArray
#define _MDagPathArray
//
//-
// ==========================================================================
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// ==========================================================================
//+
//
// CLASS: MDagPathArray
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDagPathArray)
//
// The DAG Path Array Class provides methods for manipulating arrays of DAG
// Paths.
//
// Methods are provided for obtaining the DAG Path elements by index, clearing
// the array, determining the length of the array, and removing, inserting and
// appending array elements.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MStatus.h>
// *****************************************************************************
// DECLARATIONS
class MDagPath;
// *****************************************************************************
// CLASS DECLARATION (MDagPathArray)
/// Indexable Array of DAG Paths
/**
Provides methods for manipulating arrays of DAG Paths.
Arrays of DAG Paths are useful for storing and manipluating multiple Paths
to a particular DAG Node. The DAG Path method MDagPath::getAllPathsTo()
and DAG Node Function Set method MFnDagNode::getAllPaths() implicitly
return an array of DAG Paths.
These arrays may also be used to manage Paths for a number of different
Nodes.
DAG Path arrays are used in conjunction with DAG Paths (MDagPath) and
individual elements of the arrays can be parameters to some methods of the
DAG Node Function Set (MFnDagNode).
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MDagPathArray
{
public:
///
MDagPathArray();
///
~MDagPathArray();
///
const MDagPath& operator[]( unsigned index ) const;
///
MDagPath & operator[]( unsigned index );
///
MStatus setLength( unsigned length );
///
unsigned length() const;
///
MStatus remove( unsigned index );
///
MStatus insert( const MDagPath & element, unsigned index );
///
MStatus append( const MDagPath & element );
///
MStatus clear();
///
friend OPENMAYA_EXPORT IOS_REF(ostream) &operator<<(IOS_REF(ostream) &os,
const MDagPathArray &array);
protected:
// No protected members
private:
///
void * arr;
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDagPathArray */

View File

@ -0,0 +1,127 @@
#ifndef _MDataBlock
#define _MDataBlock
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDataBlock
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDataBlock)
//
// An MDataBlock provides storage for the data being received by or sent by
// the node. It is the data for the plugs and attributes of the node. The
// data block is only valid during the compute method of the depend node,
// and should not be stored.
//
// Access to the data in an MDataBlock is done using an MDataHandle or an
// MArrayDataHandle.
//
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
#include <maya/MDataHandle.h>
#include <maya/MArrayDataHandle.h>
// *****************************************************************************
// FORWARD DECLARATIONS
class MObject;
class MPlug;
class MDGContext;
// *****************************************************************************
// CLASS DECLARATION (MDataBlock)
/// Dependency node data block
/**
The storage for the data of all of a node's plugs and attributes.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MDataBlock
{
public:
///
virtual ~MDataBlock ();
///
MDataHandle inputValue ( const MPlug & plug,
MStatus * ReturnStatus = NULL );
///
MDataHandle inputValue ( const MObject & attribute,
MStatus * ReturnStatus = NULL );
///
MDataHandle outputValue ( const MPlug & plug,
MStatus * ReturnStatus = NULL );
///
MDataHandle outputValue ( const MObject & attribute,
MStatus * ReturnStatus = NULL );
///
MArrayDataHandle inputArrayValue ( const MPlug & plug,
MStatus * ReturnStatus = NULL );
///
MArrayDataHandle inputArrayValue ( const MObject & attribute,
MStatus * ReturnStatus = NULL );
///
MArrayDataHandle outputArrayValue ( const MPlug & plug,
MStatus * ReturnStatus = NULL );
///
MArrayDataHandle outputArrayValue ( const MObject & attribute,
MStatus * ReturnStatus = NULL );
///
MStatus setClean ( const MPlug & plug );
///
MStatus setClean ( const MObject & attribute );
///
bool isClean ( const MPlug & plug );
///
bool isClean ( const MObject & attribute,
MStatus* ReturnStatus=NULL );
///
MDGContext context ( MStatus * ReturnStatus = NULL );
///
MStatus setContext ( const MDGContext & ctx );
protected:
// No protected members
private:
const char* className() const;
friend class MPxNode;
MDataBlock( void * ptr );
void * data;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDataBlock */

View File

@ -0,0 +1,259 @@
#ifndef _MDataHandle
#define _MDataHandle
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDataHandle
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDataHandle)
//
// An MDataHandle is a smart pointer into a data block (MDataBlock). A data
// handle corresponds to the data for a particular attribute or plug. For
// array data (eg CVs of a curve) use an MArrayDataHandle. To get a data
// handle, request it from the data block.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
#include <string.h>
#include <maya/MFnNumericData.h>
#include <maya/MFnData.h>
#include <maya/MTypeId.h>
#include <maya/MObject.h>
// *****************************************************************************
// FORWARD DECLARATIONS
class MTime;
class MVector;
class MFloatVector;
class MMatrix;
class MFloatMatrix;
class MPlug;
class MPxData;
class MString;
// *****************************************************************************
// CLASS DECLARATION (MDataHandle)
/// Data handle for information contained in a data block
/**
An MDataHandle is a smart pointer into an MDataBlock.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MDataHandle {
public:
///
MDataHandle();
///
bool isNumeric() const;
///
MFnNumericData::Type numericType() const;
///
MFnData::Type type() const;
///
MTypeId typeId() const;
///
MObject data();
///
MStatus copy( const MDataHandle& src );
///
void setClean();
///
bool& asBool() const;
///
char& asChar() const;
///
unsigned char& asUChar() const;
///
short& asShort() const;
/// OBSOLETE
int& asLong() const;
///
int& asInt() const;
///
float& asFloat() const;
///
double& asDouble() const;
///
MTime asTime() const;
///
short2& asShort2() const;
/// OBSOLETE
long2& asLong2() const;
///
int2& asInt2() const;
///
float2& asFloat2() const;
///
double2& asDouble2()const;
///
short3& asShort3() const;
/// OBSOLETE
long3& asLong3() const;
///
int3& asInt3() const;
///
float3& asFloat3() const;
///
double3& asDouble3() const;
///
MVector& asVector() const;
///
MFloatVector& asFloatVector() const;
///
MMatrix& asMatrix() const;
///
MFloatMatrix& asFloatMatrix() const;
///
MString& asString() const;
///
MObject asNurbsCurve() const;
///
MObject asNurbsSurface() const;
///
MObject asMesh() const;
///
MObject asSubdSurface() const;
///
MObject asNurbsCurveTransformed() const;
///
MObject asNurbsSurfaceTransformed() const;
///
MObject asMeshTransformed() const;
///
MObject asSubdSurfaceTransformed() const;
///
const MMatrix & geometryTransformMatrix() const;
///
MPxData * asPluginData() const;
///
void set( bool );
///
void set( char );
///
void set( short );
///
void set( int );
///
void set( float );
///
void set( double );
///
void set( const MMatrix& );
///
void set( const MFloatMatrix& );
///
void set( const MVector& );
///
void set( const MFloatVector& );
///
void set( const MTime& );
///
void set( short, short );
///
void set( int, int );
///
void set( float, float );
///
void set( double, double );
///
void set( short, short, short );
///
void set( int, int, int );
///
void set( float, float, float );
///
void set( double, double, double );
///
void set( const MString &);
///
MStatus set( const MObject &data );
///
MStatus set( MPxData * data );
///
MDataHandle child( const MPlug & plug );
///
MDataHandle child( const MObject & attribute );
///
MDataHandle& operator=( const MDataHandle& other );
///
MDataHandle( const MDataHandle & );
protected:
// No protected members
private:
friend class MDataBlock;
friend class MArrayDataBuilder;
friend class MArrayDataHandle;
friend class MItGeometry;
const char* className() const;
MDataHandle( void* );
// Anonymous union to force byte-alignment on IRIX machines.
// Fixes bug # 158251. In general, MDataHandle should appear
// before anything of size 8. This is just in case the user
// doesn't do this. It forces the data to be on the next
// word boundary.
//
union {
char f_data[16];
int _force_alignment;
};
};
inline MDataHandle::MDataHandle( const MDataHandle &other )
{
memcpy( this, &other, sizeof(MDataHandle) );
}
inline MDataHandle& MDataHandle::operator=( const MDataHandle& other )
{
memcpy( this, &other, sizeof(MDataHandle) );
return *this;
}
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDataHandle */

View File

@ -0,0 +1,100 @@
#ifndef _MDeviceChannel
#define _MDeviceChannel
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDeviceChannel
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDeviceChannel)
//
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
// *****************************************************************************
// DECLARATIONS
class MDeviceState;
class MString;
// *****************************************************************************
// CLASS DECLARATION (MDeviceChannel)
/// Input device channel (OpenMayaUI)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MDeviceChannel
{
public:
///
MDeviceChannel( const MString&, MDeviceChannel* = NULL, int = -1 );
///
~MDeviceChannel();
///
MString name() const;
///
MString longName() const;
///
int axisIndex() const;
///
bool hasChildren() const;
///
MDeviceChannel parent() const;
///
MDeviceChannel childByIndex( int );
///
int numChildren() const;
protected:
// no protected members
private:
friend class MPxMidiInputDevice;
MDeviceChannel( void * );
void * data;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDeviceChannel */

View File

@ -0,0 +1,108 @@
#ifndef _MDeviceState
#define _MDeviceState
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDeviceState
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDeviceState)
//
// MDeviceState is a generic event class for input devices.
// Input device classes (such as MPxMidiInputDevice) are responsible for
// converting specific event types to an MDeviceState which Maya understands.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
class MString;
class THeventInputDevice;
// *****************************************************************************
// CLASS DECLARATION (MDeviceState)
/// Input device state (OpenMayaUI)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MDeviceState
{
public:
///
virtual ~MDeviceState();
///
int devicePosition( const unsigned short int axis) const;
///
int devicePosition( const MString & axisName ) const;
///
void setDevicePosition( const int position,
const unsigned short int axis);
///
void setDevicePosition( const int position,
const MString & axisName );
///
bool buttonState( const unsigned short int button ) const;
///
bool buttonState( const MString & buttonName ) const;
///
void setButtonState( const bool state,
const unsigned short int button );
///
void setButtonState( const bool state,
const MString & buttonName );
///
int maxAxis() const;
///
bool isNull();
protected:
// No protected members
private:
MDeviceState( void * );
void * data();
void * api_stateData;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDeviceState */

View File

@ -0,0 +1,149 @@
#ifndef _MDistance
#define _MDistance
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDistance
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDistance)
//
// The MDistance class provides a fundamental type for the Maya API to hold
// and manipulate linear data. All API methods that require or return
// linear information do so through variables of this type.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MDistance)
/// Manipulate Linear Data
/**
Methods for setting and retreiving linear data in various unit systems
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MDistance
{
public:
/// Available Unit Systems
enum Unit
{
///
kInvalid,
/// Inches
kInches,
/// Feet
kFeet,
/// Yards
kYards,
/// Miles
kMiles,
/// Millimeters
kMillimeters,
/// Centimeters
kCentimeters,
/// Kilometers
kKilometers,
/// Meters
kMeters,
///
kLast
};
///
MDistance();
///
MDistance( double value, Unit unitSystem = kCentimeters );
///
MDistance( const MDistance& src );
///
~MDistance();
///
MDistance& operator=( const MDistance& src );
///
Unit unit() const;
///
double value() const;
///
MStatus setUnit( Unit newUnit );
///
MStatus setValue( double newValue );
///
double as( Unit newUnit, MStatus *ReturnStatus = NULL ) const;
///
double asInches() const;
///
double asFeet() const;
///
double asYards() const;
///
double asMiles() const;
///
double asMillimeters() const;
///
double asCentimeters() const;
///
double asKilometers() const;
///
double asMeters() const;
///
static Unit uiUnit();
///
static MStatus setUIUnit( Unit newUnit );
///
static Unit internalUnit();
///
static double internalToUI( double internalValue );
///
static double uiToInternal( double uiValue );
///OBSOLETE Changing the internal units is generally not a good idea and using this method may often produce unexpected results.
static MStatus setInternalUnit( Unit internalUnit );
protected:
double val;
Unit valUnit;
private:
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDistance */

View File

@ -0,0 +1,125 @@
#ifndef _MDoubleArray
#define _MDoubleArray
//
//-
// ==========================================================================
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// ==========================================================================
//+
//
// CLASS: MDoubleArray
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDoubleArray)
//
// This class implements an array of doubles. Common convenience functions
// are available, and the implementation is compatible with the internal
// Maya implementation so that it can be passed efficiently between plugins
// and internal maya data structures.
//
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MStatus.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MDoubleArray)
/// Array of doubles data type
/**
Implement an array of doubles data type.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MDoubleArray
{
public:
///
MDoubleArray();
///
MDoubleArray( const MDoubleArray& other );
///
MDoubleArray( const double src[], unsigned count );
///
MDoubleArray( const float src[], unsigned count );
///
MDoubleArray( unsigned initialSize,
double initialValue = 0 );
///
~MDoubleArray();
///
double operator[]( unsigned index ) const;
///
double & operator[]( unsigned index );
///
MDoubleArray & operator=( const MDoubleArray & other );
///
MStatus set( double element, unsigned index );
///
MStatus set( float element, unsigned index );
///
MStatus setLength( unsigned length );
///
unsigned length() const;
///
MStatus remove( unsigned index );
///
MStatus insert( double element, unsigned index );
///
MStatus append( double element );
///
MStatus copy( const MDoubleArray& source );
///
MStatus clear();
///
MStatus get( double[] ) const;
///
MStatus get( float[] ) const;
///
void setSizeIncrement ( unsigned newIncrement );
///
unsigned sizeIncrement () const;
///
friend OPENMAYA_EXPORT IOS_REF(ostream) &operator<<(IOS_REF(ostream) &os,
const MDoubleArray &array);
protected:
// No protected members
private:
MDoubleArray( void* );
void * arr;
bool own;
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDoubleArray */

View File

@ -0,0 +1,113 @@
#ifndef _MDrawData
#define _MDrawData
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDrawData
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDrawData)
//
// The MDrawData class holds geometry specific information for user
// defined shapes which maya does not intrinsicly know about.
//
// This class is used in the draw methods of MPxSurfaceShapeUI
// For each draw request you must create and add a draw data object
// which will contain geometry specific information that you will need
// in the subsequent call to MPxSurfaceShapeUI::draw.
//
// MDrawData contains one void* member which is a pointer to an
// object that you define. This object is the geometry needed to draw
// your shape.
//
// To create draw data use the function MPxSurfaceShapeUI::getDrawData.
// This function takes two arguments, the first is a pointer to your
// geometry object, the second is the draw data being created.
// To add the data to a request use MDrawRequest::setDrawData.
//
// Draw data is also used to carry texture information to your draw method.
// For materials with texture you must call MMaterial::evaluateTexture
// from your MPxSurfaceShapeUI::getDrawRequests method.
// Then in your draw method use MMaterial::applyTexture to set up the
// viewport to draw using the textured material.
//
// *****************************************************************************
//
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
#include <maya/MObject.h>
#include <maya/M3dView.h>
// *****************************************************************************
// DECLARATIONS
class MDagPath;
class MVector;
// *****************************************************************************
// CLASS DECLARATION (MDrawData)
/// Draw data used in the draw methods of MPxSurfaceShapeUI (OpenMayaUI)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MDrawData
{
public:
///
MDrawData();
///
MDrawData( const MDrawData& in );
///
~MDrawData();
public:
///
void * geometry();
protected:
// No protected members
private:
const char* className() const;
friend class MMaterial;
friend class MPxSurfaceShapeUI;
friend class MDrawRequest;
MDrawData( void* in );
void* fDrawData;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDrawData */

View File

@ -0,0 +1,140 @@
#ifndef _MDrawInfo
#define _MDrawInfo
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDrawInfo
//
// This class is used by the getDrawRequests method of MPxSurfaceShapeUI
// to specify the current object drawing state for a user defined shape.
//
// The getPrototype method is used to construct a draw request object
// based on the current draw state for the object.
//
// See MDrawRequest for more information.
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDrawInfo)
//
// *****************************************************************************
//
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
#include <maya/MObject.h>
#include <maya/M3dView.h>
#include <maya/MDrawRequest.h>
// *****************************************************************************
// DECLARATIONS
class MSelectionMask;
class MSelectionTypeSet;
class MPoint;
class MPointArray;
class MVector;
class MSelectionList;
class MMatrix;
// *****************************************************************************
// CLASS DECLARATION (MDrawInfo)
/// Drawing state used in the draw methods of MPxSurfaceShapeUI (OpenMayaUI)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MDrawInfo
{
public:
///
MDrawInfo();
///
MDrawInfo( const MDrawInfo& in );
///
virtual ~MDrawInfo();
// This method returns a partially filled in MDrawRequest
///
MDrawRequest getPrototype(
const MPxSurfaceShapeUI& drawHandler ) const;
// Only really need camera path here
///
M3dView view() const;
// path to object to draw
///
const MDagPath multiPath () const;
// projection (camera) matrix
///
const MMatrix projectionMatrix() const;
// world space inclusive matrix
///
const MMatrix inclusiveMatrix() const;
// display appearance (this may change during traversal)
///
M3dView::DisplayStyle displayStyle() const;
// display status of object to draw
///
M3dView::DisplayStatus displayStatus() const;
///
bool inSelect() const;
///
bool completelyInside() const;
// convenience to test if component can be drawn
///
bool canDrawComponent( bool isDisplayOn,
const MSelectionMask & compMask ) const;
public:
// Public accessor methods
protected:
// No protected members
void* fData;
private:
const char* className() const;
MDrawInfo( void* in );
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDrawInfo */

View File

@ -0,0 +1,195 @@
#ifndef _MDrawRequest
#define _MDrawRequest
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDrawRequest
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDrawRequest)
//
// This class encapsulates all the information needed to fulfill
// a request to draw an object or part of an object.
// This class is used by the draw methods of MPxSurfaceShapeUI
// derived objects.
//
// The draw request should be created in the overridden
// MPxSurfaceShapeUI::getDrawRequests method. Once created the
// appropriate "set" methods of this class should be used to define
// what is being requested. Then the request should be placed on the
// draw reqeust queue using MDrawRequestQueue::add.
//
// When your request gets processed by maya, your overriden
// MPxSurfaceShape::draw method will get called with your request.
// Use the query methods of this class to determine what to draw.
//
// You create a draw request using the method MDrawInfo::getPrototype.
// A draw request automatically picks up certain information (listed
// below) upon it's creation. So you don't have to set any of this
// information unless you want to change it.
//
// Information automatically set by MDrawInfo::getPrototype :
// path - path to object to be drawn
// view - view to draw in
// matrix - world matrix for object
// display appearance - how object should be drawn
// display status - active, dormant etc.
//
// The draw token is an integer value which you can use to specify
// what is to be drawn. This is object specific and so you should
// define an enum with the information you require to decide what
// is being drawn in your MPxSurfaceShapeUI::draw method.
//
// Here is an example of draw token values for a polygonal mesh
// object as defined in an MPxSurfaceShapeUI derived class.
//
// // Draw Tokens
// //
// enum {
// kDrawVertices, // component token
// kDrawWireframe,
// kDrawWireframeOnShaded,
// kDrawSmoothShaded,
// kDrawFlatShaded,
// kLastToken
// };
//
// *****************************************************************************
//
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
#include <maya/MObject.h>
#include <maya/M3dView.h>
// *****************************************************************************
// DECLARATIONS
class MSelectionMask;
class MPoint;
class MPointArray;
class MVector;
class MSelectionList;
class MMatrix;
class MPxSurfaceShapeUI;
class MMaterial;
class MDrawData;
// *****************************************************************************
// CLASS DECLARATION (MDrawRequest)
/// A draw reqeust used in the draw methods of MPxSurfaceShapeUI (OpenMayaUI)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MDrawRequest
{
public:
///
MDrawRequest();
///
MDrawRequest( const MDrawRequest& in );
///
~MDrawRequest();
public:
// the view to draw to
///
M3dView view() const;
///
void setView( M3dView & );
///
const MDagPath multiPath() const;
///
void setMultiPath( const MDagPath & );
///
MObject component() const;
///
void setComponent( MObject & );
///
MDrawData drawData() const;
///
void setDrawData( MDrawData & );
///
M3dView::DisplayStatus displayStatus() const;
///
void setDisplayStatus( M3dView::DisplayStatus );
///
bool displayCulling() const;
///
void setDisplayCulling( bool );
///
bool displayCullOpposite() const;
///
void setDisplayCullOpposite( bool );
///
M3dView::DisplayStyle displayStyle() const;
///
void setDisplayStyle( M3dView::DisplayStyle );
///
int color( M3dView::ColorTable table ) const;
///
void setColor( int, M3dView::ColorTable table );
///
MMaterial material() const;
///
void setMaterial( MMaterial& );
///
bool isTransparent() const;
///
void setIsTransparent( bool );
///
bool drawLast() const;
///
void setDrawLast( bool );
///
int token() const;
///
void setToken( int );
///
MDrawRequest& operator = ( const MDrawRequest& other );
protected:
// No protected members
private:
const char* className() const;
MDrawRequest( void* in, bool own );
void* fDrawRequest;
bool fOwn;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDrawRequest */

View File

@ -0,0 +1,101 @@
#ifndef _MDrawRequestQueue
#define _MDrawRequestQueue
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDrawRequestQueue
//
// This class defines a simple interface for a collection of
// MDrawRequest objects.
//
// An MDrawRequestQueue object is passed to the getDrawRequests method
// of a user defined shape's UI class (MPxSurfaceShapeUI).
// This queue keeps track of all the things that need to get draw
// when a refresh of the view occurs.
//
// Maya will call the getDrawRequest methods of all the visible DAG objects
// before a refresh happens. Then as the refresh happens, each draw request
// will be processed and the corresponding draw method for each DAG
// object will get called. For user defined shapes MPxSurfaceShapeUI::draw
// will get called.
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDrawRequestQueue)
//
// *****************************************************************************
//
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
#include <maya/MObject.h>
#include <maya/MDrawRequest.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MDrawRequestQueue)
/// (OpenMayaUI)
/// Drawing queue used in MPxSurfaceShapeUI::getDrawRequests (OpenMayaUI)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MDrawRequestQueue
{
public:
///
MDrawRequestQueue();
///
~MDrawRequestQueue();
public:
///
bool isEmpty() const;
///
void add( MDrawRequest & );
///
MDrawRequest remove();
protected:
// No protected members
private:
const char* className() const;
MDrawRequestQueue( void* in );
void* fDrawRequestQueue;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDrawRequestQueue */

View File

@ -0,0 +1,89 @@
#ifndef _MDynSweptLine
#define _MDynSweptLine
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDynSweptLine
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDynSweptLine)
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
class MVector;
// *****************************************************************************
// CLASS DECLARATION (MDynSweptLine)
/// Class for evaluating curve segments as lines over time. (OpenMayaFX)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAFX_EXPORT MDynSweptLine
{
public:
///
MDynSweptLine();
///
~MDynSweptLine();
// Time-Dependent Access Methods
//
///
MVector vertex( int vertexId, double t = 1.0 );
///
MVector normal( double x, double y, double z, double t = 1.0 );
///
MVector tangent( double t = 1.0 );
///
double length( double t = 1.0 );
protected:
// No protected members
private:
static const char* className();
MDynSweptLine( void* );
void * fData;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDynSweptLine */

View File

@ -0,0 +1,97 @@
#ifndef _MDynSweptTriangle
#define _MDynSweptTriangle
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MDynSweptTriangle
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MDynSweptTriangle)
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
class MVector;
class MPoint;
// *****************************************************************************
// CLASS DECLARATION (MDynSweptTriangle)
/// Class for evaluating surfaces as triangles over time. (OpenMayaFX)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAFX_EXPORT MDynSweptTriangle
{
public:
///
MDynSweptTriangle();
///
~MDynSweptTriangle();
// Time-Dependent Access Methods
//
//
///
MVector vertex( int vertexId, double t = 1.0 );
///
MVector normal( double t = 1.0 );
///
MVector normalToPoint(double x, double y, double z, double t = 1.0);
// Non-Time-Dependent Access Method
//
//
///
MVector uvPoint( int vertexId );
protected:
// No protected members
private:
static const char* className();
MDynSweptTriangle( void* );
void * fData;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MDynSweptTriangle */

View File

@ -0,0 +1,232 @@
#ifndef _MEulerRotation
#define _MEulerRotation
//
//-
// ==========================================================================
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// ==========================================================================
//+
//
// CLASS: MEulerRotation
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MEulerRotation)
//
// This class provides methods for working with euler angle rotations.
// Euler angles are described by rotations in radians around the x, y,
// and z axes, and the order in which those rotations occur.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MTransformationMatrix.h>
#include <maya/MIOStream.h>
// *****************************************************************************
// DECLARATIONS
class MMatrix;
class MQuaternion;
#define kEulerRotationEpsilon 1.0e-10
// *****************************************************************************
// CLASS DECLARATION (MEulerRotation)
/// Euler Rotation Math
/**
This class provides methods for working with euler rotations.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MEulerRotation
{
public:
///
enum RotationOrder {
///
kXYZ,
///
kYZX,
///
kZXY,
///
kXZY,
///
kYXZ,
///
kZYX
};
///
MEulerRotation();
///
MEulerRotation(const MEulerRotation &src);
///
MEulerRotation(const MVector &v,
RotationOrder ord = kXYZ);
///
MEulerRotation(double xx, double yy, double zz,
RotationOrder ord = kXYZ);
///
~MEulerRotation();
///
MEulerRotation & operator=(const MEulerRotation &src);
///
MEulerRotation & operator=(const MQuaternion &q);
///
MEulerRotation & operator=(const MMatrix &m);
///
MEulerRotation & operator=(const MVector &v);
///
MEulerRotation & setValue(const MVector &v,
RotationOrder ord = kXYZ);
///
MEulerRotation & setValue(double xx, double yy, double zz,
RotationOrder ord = kXYZ);
///
MQuaternion asQuaternion() const;
///
MMatrix asMatrix() const;
///
MVector asVector() const;
///
double & operator[](unsigned i);
///
double operator[](unsigned i) const;
///
MEulerRotation operator+(const MEulerRotation &other) const;
///
MEulerRotation & operator+=(const MEulerRotation &other);
///
MEulerRotation operator-(const MEulerRotation &other) const;
///
MEulerRotation & operator-=(const MEulerRotation &other);
///
MEulerRotation operator-() const;
///
MEulerRotation operator*(const MEulerRotation &other) const;
///
MEulerRotation operator*(const MQuaternion &other) const;
///
MEulerRotation operator*(double other) const;
///
friend OPENMAYA_EXPORT MEulerRotation operator*(double scale,
const MEulerRotation
&other);
///
MEulerRotation & operator*=(const MEulerRotation &other);
///
MEulerRotation & operator*=(const MQuaternion &other);
///
MEulerRotation & operator*=(double other);
///
bool operator==(const MEulerRotation &other) const;
///
bool operator!=(const MEulerRotation &other) const;
///
bool isEquivalent(const MEulerRotation &other,
double tolerance = kEulerRotationEpsilon)
const;
///
bool isZero(double tolerance = kEulerRotationEpsilon) const;
///
MEulerRotation & incrementalRotateBy(const MVector &axis,
double angle);
///
MEulerRotation inverse() const;
///
MEulerRotation & invertIt();
///
MEulerRotation reorder(RotationOrder ord) const;
///
MEulerRotation & reorderIt(RotationOrder ord);
///
static MEulerRotation bound(const MEulerRotation &src);
///
MEulerRotation bound() const;
///
MEulerRotation & boundIt(const MEulerRotation &src);
///
MEulerRotation & boundIt();
///
static MEulerRotation alternateSolution(const MEulerRotation &src);
///
MEulerRotation alternateSolution() const;
///
MEulerRotation & setToAlternateSolution(const MEulerRotation &src);
///
MEulerRotation & setToAlternateSolution();
///
static MEulerRotation closestSolution(const MEulerRotation &src,
const MEulerRotation &dst);
///
MEulerRotation closestSolution(const MEulerRotation &dst) const;
///
MEulerRotation & setToClosestSolution(const MEulerRotation &src,
const MEulerRotation &dst);
///
MEulerRotation & setToClosestSolution(const MEulerRotation &dst);
///
static MEulerRotation closestCut(const MEulerRotation &src,
const MEulerRotation &dst);
///
MEulerRotation closestCut(const MEulerRotation &dst) const;
///
MEulerRotation & setToClosestCut(const MEulerRotation &src,
const MEulerRotation &dst);
///
MEulerRotation & setToClosestCut(const MEulerRotation &dst);
///
static MEulerRotation decompose(const MMatrix &matrix, RotationOrder ord);
///
friend OPENMAYA_EXPORT IOS_REF(ostream) &operator<<(IOS_REF(ostream) &os,
const MEulerRotation &rotation);
/// The euler rotation identity. The rotation order is XYZ.
static const MEulerRotation identity;
/// The x component of the euler rotation in radians
double x;
/// The y component of the euler rotation in radians
double y;
/// The z component of the euler rotation in radians
double z;
/// The rotation order of the euler rotation
RotationOrder order;
#if defined(LINUX)
char _padding[4]; // Pad out sizeof class
#endif
protected:
// No protected members
private:
// No private members
};
#if defined(_WIN32)
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MEulerRotation */

View File

@ -0,0 +1,154 @@
#ifndef _MEvent
#define _MEvent
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MEvent
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MEvent)
//
// The MEvent class is used for querying system events such as mouse presses.
//
// Events are handled by an MPxContext derived class in which MEvents are passed
// and can be accessed.
//
// Since Maya has default actions for several events, only a subset are
// available through the API.
// The events that can be accessed are:
// buttonPress - mouse button press event (left & middle only)
// buttonRelease - mouse buttons release event (left & middle only)
// mouseDrag - mouse button drag event (left & middle only)
// hold - mouse button hold event (left & middle only)
// deleteEvent - delete/backspace key event
// commandCompletion - complete key event
//
// Several modifiers for events are also accessible through the API. Modifiers
// are actions that occur during an event. For example, holding down the shift
// key while pressing a mouse button causes a button press event to occur with
// a shift modifier.
//
// A modifier can be used to determine if two mouse events occur simulaneously.
// The second mouse event is registered as a modifier in the hold event of the
// first mouse button. So if you wanted to determine if both the left and
// middle buttons are pressed then you would query the modifier in the hold
// event of the first mouse button using the isModifierMiddleMouseButton() and
// isModifierLeftMouseButton() methods.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
// *****************************************************************************
// DECLARATIONS
class MDeviceState;
// *****************************************************************************
// CLASS DECLARATION (MEvent)
/// System event information (OpenMayaUI)
/**
System event information class.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MEvent
{
public:
///
enum ModifierType {
///
shiftKey = 1<<0,
///
controlKey = 1<<2
};
///
enum MouseButtonType {
///
kLeftMouse = 1<<6,
///
kMiddleMouse = kLeftMouse<<1
};
public:
///
MEvent();
///
virtual ~MEvent();
///
MStatus getPosition( short& x_pos, short& y_pos ) const;
///
MStatus setPosition( short& x_pos, short& y_pos );
///
MStatus getWindowPosition( short& x_pos, short& y_pos ) const;
///
MouseButtonType mouseButton( MStatus * ReturnStatus = NULL ) const;
///
bool isModifierKeyRelease( MStatus * ReturnStatus = NULL ) const;
///
ModifierType modifiers( MStatus * ReturnStatus = NULL ) const;
///
MStatus setModifiers( ModifierType& modType );
///
bool isModifierNone( MStatus * ReturnStatus = NULL ) const;
///
bool isModifierShift( MStatus * ReturnStatus = NULL ) const;
///
bool isModifierControl( MStatus * ReturnStatus = NULL ) const;
///
bool isModifierLeftMouseButton( MStatus * ReturnStatus = NULL )
const;
///
bool isModifierMiddleMouseButton( MStatus * ReturnStatus = NULL )
const;
protected:
// No protected members
private:
static const char* className();
MEvent( const void * );
const void * fEventPtr;
void * fModifier;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MEvent */

View File

@ -0,0 +1,90 @@
#ifndef _MEventMessage
#define _MEventMessage
//
// *****************************************************************************
// Copyright (C) 1999-2003 Alias | Wavefront, Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias | Wavefront, Inc. and
// are protected by the Canadian and US federal copyright law. They
// may not be disclosed to third parties or copied or duplicated, in
// whole or in part, without prior written consent of
// Alias | Wavefront Inc.
//
// Unpublished -- rights reserved under the Copyright Laws of
// the United States.
//
// *****************************************************************************
//
// CLASS: MEventMessage
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MEventMessage)
//
// This class is used to register callbacks for event messages.
// There is 1 add callback method which will add callbacks for the
// following message
// Event occurred
//
// The list of available event names can be retrieved with the
// getEventNames method.
//
// To remove a callback use MMessage::removeCallback.
// All callbacks that are registered by a plug-in must be removed by that
// plug-in when it is unloaded. Failure to do so will result in a fatal error.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MMessage.h>
#include <maya/MStringArray.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MEventMessage)
/// Event messages
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MEventMessage : public MMessage
{
public:
///
static MCallbackId addEventCallback(
const MString& event,
void (*func)( void* clientData ),
void * clientData = NULL,
MStatus * ReturnStatus = NULL );
///
static MStatus getEventNames( MStringArray & names );
private:
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MEventMessage */

View File

@ -0,0 +1,82 @@
#ifndef _MFeedbackLine
#define _MFeedbackLine
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFeedbackLine
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFeedbackLine)
//
// The MFeedbackLine is used to display information back to the user.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
class MStatus;
class MString;
// CLASS DECLARATION (MFeedbackLine)
/// Feedback line (OpenMayaUI)
/**
This class provides methods for displaying information to the user.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MFeedbackLine {
public:
///
static MStatus setFormat (const MString &format);
///
static MStatus setTitle (const MString &title);
///
static MStatus setValue (short index, double value);
///
static void clear ();
///
static bool showFeedback ();
///
static void setShowFeedback (bool showFeedback);
private:
static const char *className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFeedbackLine */

View File

@ -0,0 +1,186 @@
#ifndef _MFileIO
#define _MFileIO
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFileIO
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFileIO)
//
// The MFileIO class provides a set of global functions that can be used to
// load and store scene elements into maya files. Methods are also provided
// to import elements from other files into the current scene, and export
// elements of the current scene into files. As well, references to other
// files can be created and removed.
//
// This class implements only the most common operations from the full set
// possible with the MEL command "file." See the documentation of this
// command for a complete listing of all the possiblities. If more control
// is required than provided by this class, a MEL command can be constructed
// according to the instructions for the "file" command, and issued via the
// executeCommand method of the MGlobal class.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MObject.h>
#include <maya/MPlugArray.h>
#include <maya/MStatus.h>
#include <maya/MString.h>
#include <maya/MStringArray.h>
#include <maya/MSelectionList.h>
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFileIO)
/// I/O operations on scene files.
/**
Methods for opening, saving, importing, exporting and referencing files.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFileIO
{
public:
///
MFileIO ();
///
MFileIO ( const MString& fileName );
///
virtual ~MFileIO ();
///
static MString currentFile ();
///
static MStatus setCurrentFile ( const MString& fileName );
///
static MString fileType();
///
static MStatus getFileTypes ( MStringArray& types );
///
static MStatus newFile ( bool force = false );
///
static MStatus open ( const MString& fileName,
const char* type = NULL,
bool force = false );
///
static MStatus save ( bool force = false );
///
static MStatus saveAs ( const MString& fileName,
const char* type = NULL,
bool force = false );
///
static MStatus import ( const MString& fileName,
const char* type = NULL);
///
static MStatus exportSelected ( const MString& fileName,
const char* type = NULL);
///
static MStatus exportAll ( const MString& fileName,
const char* type = NULL);
///
static MStatus getReferences ( MStringArray& references );
///
static MStatus getReferenceNodes ( const MString &fileName,
MStringArray& nodes );
///
static MStatus getReferenceConnectionsMade ( const MString &fileName,
MStringArray& connections );
///
static MStatus getReferenceConnectionsBroken(
const MString& fileName,
MStringArray& connections
);
///
static MStatus getReferenceConnectionsBroken(
const MString& fileName,
MPlugArray& srcPlugs,
MPlugArray& destPlugs
);
///
static MStatus getReferenceConnectionsBroken(
const MObject& node,
MStringArray& connections,
bool append = false,
bool removeDuplicates = true
);
///
static MStatus getReferenceConnectionsBroken(
const MObject& node,
MPlugArray& srcPlugs,
MPlugArray& destPlugs,
bool append = false,
bool removeDuplicates = true
);
///
static MStatus reference ( const MString& fileName );
///
static MStatus removeReference ( const MString& fileName );
///
static bool isReadingFile();
///
static bool isWritingFile();
///
static bool mustRenameToSave(MStatus *ReturnStatus = NULL);
///
static MStatus setMustRenameToSave(bool);
///
static MString mustRenameToSaveMsg(MStatus *ReturnStatus = NULL);
///
static MStatus setMustRenameToSaveMsg(MString &);
///
static MString beforeOpenFilename(MStatus * ReturnStatus = NULL);
///
static MString beforeImportFilename(MStatus * ReturnStatus = NULL);
///
static MString beforeSaveFilename(MStatus * ReturnStatus = NULL);
///
static MString beforeExportFilename(MStatus * ReturnStatus = NULL);
///
static MString beforeReferenceFilename(MStatus * ReturnStatus = NULL);
protected:
// No protected members
private:
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFileIO */

View File

@ -0,0 +1,118 @@
#ifndef _MFileObject
#define _MFileObject
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFileObject
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFileObject)
//
// The MFileObject class implements an object that contains both a
// filename and a search path. The search path is specified by a single
// string in which multiple elements are separated by ':' characters. As
// well this string can contain Unix environment variables, specified as
// $VARNAME,
//
// Filenames can be produced by the class by combining the path element
// with the filename element of the MFileObject. As well, methods are
// available to test for the existance of the files produced.
//
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
class MString;
// *****************************************************************************
// CLASS DECLARATION (MFileObject)
/// Manipulate Unix filenames and search paths
/**
Manipulate Unix filenames and search paths
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFileObject
{
public:
///
MFileObject();
///
MFileObject( const MFileObject & other );
///
virtual ~MFileObject();
///
MFileObject& operator=( const MFileObject & other );
///
MStatus setName( const MString & fileName );
///
MStatus setRawPath( const MString & pathString );
///
MStatus setFullName( const MString & fileName );
///
MString name() const;
///
MString rawPath() const;
///
MString path() const;
///
MString fullName() const;
///
unsigned pathCount();
///
MString ithPath( unsigned index );
///
MString ithFullName( unsigned index );
///
bool exists();
///
bool exists( unsigned index );
///
bool isSet() const;
protected:
// No protected members
private:
void * data;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFileObject */

View File

@ -0,0 +1,125 @@
#ifndef _MFloatArray
#define _MFloatArray
//
//-
// ==========================================================================
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// ==========================================================================
//+
//
// CLASS: MFloatArray
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFloatArray)
//
// This class implements an array of floats. Common convenience functions
// are available, and the implementation is compatible with the internal
// Maya implementation so that it can be passed efficiently between plugins
// and internal maya data structures.
//
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MStatus.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFloatArray)
/// Array of floats data type
/**
Implement an array of floats data type.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFloatArray
{
public:
///
MFloatArray();
///
MFloatArray( const MFloatArray& other );
///
MFloatArray( const float src[], unsigned count );
///
MFloatArray( const double src[], unsigned count );
///
MFloatArray( unsigned initialSize,
float initialValue = 0 );
///
~MFloatArray();
///
float operator[]( unsigned index ) const;
///
float & operator[]( unsigned index );
///
MFloatArray & operator=( const MFloatArray & other );
///
MStatus set( float element, unsigned index );
///
MStatus set( double element, unsigned index );
///
MStatus setLength( unsigned length );
///
unsigned length() const;
///
MStatus remove( unsigned index );
///
MStatus insert( float element, unsigned index );
///
MStatus append( float element );
///
MStatus copy( const MFloatArray& source );
///
MStatus clear();
///
MStatus get( float[] ) const;
///
MStatus get( double[] ) const;
///
void setSizeIncrement ( unsigned newIncrement );
///
unsigned sizeIncrement () const;
///
friend OPENMAYA_EXPORT IOS_REF(ostream) &operator<<(IOS_REF(ostream) &os,
const MFloatArray &array);
protected:
// No protected members
private:
MFloatArray( void* );
void * arr;
bool own;
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFloatArray */

View File

@ -0,0 +1,171 @@
#ifndef _MFloatMatrix
#define _MFloatMatrix
//
//-
// ==========================================================================
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// ==========================================================================
//+
//
// CLASS: MFloatMatrix
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFloatMatrix)
//
// This class provides access to Maya's internal matrix math library allowing
// matrices to be handled easily, and in a manner compatible with internal
// Maya data structures.
//
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MStatus.h>
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
#define MFloatMatrix_kTol 1.0e-5F
// *****************************************************************************
// CLASS DECLARATION (MFloatMatrix)
/// A matrix math class for 4x4 matrices of floats
/**
This class provides access to Maya's matrix math library
*/
#if defined(_WIN32)
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFloatMatrix
{
public:
///
MFloatMatrix();
///
MFloatMatrix( const MFloatMatrix & src );
///
MFloatMatrix( const double m[4][4] );
///
MFloatMatrix( const float m[4][4] );
///
~MFloatMatrix();
///
MFloatMatrix& operator = (const MFloatMatrix &);
///
float& operator()(unsigned row, unsigned col );
///
float operator()(unsigned row, unsigned col ) const;
///
float* operator[]( unsigned row );
///
const float* operator[]( unsigned row ) const;
///
MStatus get( double dest[4][4] ) const;
///
MStatus get( float dest[4][4] ) const;
///
MFloatMatrix transpose() const;
///
MFloatMatrix & setToIdentity();
///
MFloatMatrix & setToProduct( const MFloatMatrix & left,
const MFloatMatrix & right );
///
MFloatMatrix & operator+=( const MFloatMatrix & right );
///
MFloatMatrix operator+ ( const MFloatMatrix & right ) const;
///
MFloatMatrix & operator-=( const MFloatMatrix & right );
///
MFloatMatrix operator- ( const MFloatMatrix & right ) const;
///
MFloatMatrix & operator*=( const MFloatMatrix & right );
///
MFloatMatrix operator* ( const MFloatMatrix & right ) const;
///
MFloatMatrix & operator*=( float );
///
MFloatMatrix operator* ( float ) const;
///
friend OPENMAYA_EXPORT MFloatMatrix operator* ( float,
const MFloatMatrix & right );
///
bool operator==( const MFloatMatrix & other ) const;
///
bool operator!=( const MFloatMatrix & other ) const;
///
MFloatMatrix inverse() const;
///
MFloatMatrix adjoint() const;
///
MFloatMatrix homogenize() const;
///
float det4x4() const;
///
float det3x3() const;
///
bool isEquivalent( const MFloatMatrix & other,
float tolerance = MFloatMatrix_kTol )
const;
///
friend OPENMAYA_EXPORT IOS_REF(ostream)& operator<< ( IOS_REF(ostream)& os,
const MFloatMatrix& m );
/// the matrix data
float matrix[4][4];
protected:
// No protected members
private:
static const char* className();
};
#if defined(_WIN32)
#pragma warning(default: 4522)
#endif // _WIN32
inline float& MFloatMatrix::operator()(unsigned row, unsigned col )
{
return matrix[row][col];
}
inline float MFloatMatrix::operator()(unsigned row, unsigned col ) const
{
return matrix[row][col];
}
inline float* MFloatMatrix::operator[]( unsigned row )
{
return matrix[row];
}
inline const float* MFloatMatrix::operator[]( unsigned row ) const
{
return matrix[row];
}
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFloatMatrix */

View File

@ -0,0 +1,154 @@
#ifndef _MFloatPoint
#define _MFloatPoint
//
//-
// ==========================================================================
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// ==========================================================================
//+
//
// CLASS: MFloatPoint
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFloatPoint)
//
// This class provides an implementation of a point in float. Numerous
// convienence operators are provided to help with the manipulation of
// points. This includes operators that work with the MFloatVector and
// MFloatMatrix classes.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MIOStream.h>
// *****************************************************************************
// DECLARATIONS
class MFloatMatrix;
class MFloatVector;
#define MFloatPoint_kTol 1.0e-10
// *****************************************************************************
// CLASS DECLARATION (MFloatPoint)
/// implementation of a point
/**
This class implements the Maya representation of a point in floats
*/
#if defined(_WIN32)
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFloatPoint
{
public:
///
MFloatPoint(); // defaults to 0,0,0,1
///
MFloatPoint( const MFloatPoint & srcpt );
///
MFloatPoint( float xx, float yy,
float zz = 0.0, float ww = 1.0 );
///
MFloatPoint( const float[4] );
///
~MFloatPoint();
///
bool get( float[4] ) const;
///
MFloatPoint & operator=( const MFloatPoint & src );
///
float & operator()(unsigned i);
///
float operator()(unsigned i) const;
///
float & operator[](unsigned i);
///
float operator[](unsigned i) const;
///
MFloatVector operator-( const MFloatPoint & other ) const;
///
MFloatPoint operator+( const MFloatVector & other ) const;
///
MFloatPoint operator-( const MFloatVector & other ) const;
///
MFloatPoint & operator+=( const MFloatVector & vector );
///
MFloatPoint & operator-=( const MFloatVector & vector );
///
MFloatPoint operator*(const float scale) const;
///
MFloatPoint operator/(const float scale) const;
///
MFloatPoint operator*(const MFloatMatrix &) const;
///
MFloatPoint & operator*=(const MFloatMatrix &);
///
friend OPENMAYA_EXPORT MFloatPoint operator*( const MFloatMatrix &,
const MFloatPoint & );
///
bool operator==( const MFloatPoint & other ) const;
///
bool operator!=( const MFloatPoint & other ) const;
///
MFloatPoint & cartesianize();
///
MFloatPoint & rationalize();
///
MFloatPoint & homogenize();
///
float distanceTo( const MFloatPoint & other ) const;
///
bool isEquivalent( const MFloatPoint & other,
float tolerance = MFloatPoint_kTol)
const;
///
friend OPENMAYA_EXPORT IOS_REF(ostream)& operator<< ( IOS_REF(ostream)& os,
const MFloatPoint& p );
///
static const MFloatPoint origin;
/// the x component of the point
float x;
/// the y component of the point
float y;
/// the z component of the point
float z;
/// the w component of the point
float w;
protected:
// No protected members
private:
// No private members
};
#if defined(_WIN32)
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFloatPoint */

View File

@ -0,0 +1,137 @@
#ifndef _MFloatPointArray
#define _MFloatPointArray
//
//-
// ==========================================================================
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// ==========================================================================
//+
//
// CLASS: MFloatPointArray
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFloatPointArray)
//
// This class implements an array of MFloatPoints. Common convenience
// functions are available, and the implementation is compatible with the
// internal Maya implementation so that it can be passed efficiently between
// plugins and internal maya data structures.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MStatus.h>
#include <maya/MFloatPoint.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFloatPointArray)
/// Array of MFloatPoint data type
/**
Implement an array of MFloatPoint data type.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFloatPointArray
{
public:
///
MFloatPointArray();
///
MFloatPointArray( const MFloatPointArray& other );
///
MFloatPointArray( const MFloatPoint points[], unsigned count );
///
MFloatPointArray( const float points[][4], unsigned count );
///
MFloatPointArray( const double points[][4], unsigned count );
///
MFloatPointArray( unsigned initialSize,
const MFloatPoint &initialValue
= MFloatPoint::origin );
///
~MFloatPointArray();
///
const MFloatPoint& operator[]( unsigned index ) const;
///
MFloatPoint& operator[]( unsigned index );
///
MFloatPointArray & operator=( const MFloatPointArray & other );
///
MStatus set( const MFloatPoint& element, unsigned index);
///
MStatus set( unsigned index, float x, float y, float z=0,
float w=1);
///
MStatus set( float element[4], unsigned index);
///
MStatus set( double element[4], unsigned index);
///
MStatus setLength( unsigned length );
///
unsigned length() const;
///
MStatus remove( unsigned index );
///
MStatus insert( const MFloatPoint & element, unsigned index );
///
MStatus append( const MFloatPoint & element );
///
MStatus append( float x, float y, float z=0, float w=1 );
///
MStatus copy( const MFloatPointArray& source );
///
MStatus clear();
///
MStatus get( float [][4] ) const;
///
MStatus get( double [][4] ) const;
///
void setSizeIncrement ( unsigned newIncrement );
///
unsigned sizeIncrement () const;
///
friend OPENMAYA_EXPORT IOS_REF(ostream) &operator<<(IOS_REF(ostream) &os,
const MFloatPointArray &array);
protected:
// No protected members
private:
MFloatPointArray( void* );
void * arr;
bool own;
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFloatPointArray */

View File

@ -0,0 +1,196 @@
#ifndef _MFloatVector
#define _MFloatVector
//
//-
// ==========================================================================
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// ==========================================================================
//+
//
// CLASS: MFloatVector
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFloatVector)
//
// This class provides access to Maya's internal vector math library allowing
// vectors to be handled easily, and in a manner compatible with internal
// Maya data structures.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MStatus.h>
// *****************************************************************************
// DECLARATIONS
class MFloatMatrix;
class MVector;
class MPoint;
#define MFloatVector_kTol 1.0e-5F
// *****************************************************************************
// CLASS DECLARATION (MFloatVector)
/// A vector math class for vectors of floats
/**
This class provides access to Maya's vector math library.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFloatVector
{
public:
///
MFloatVector();
///
MFloatVector( const MFloatVector&);
///
MFloatVector( const MVector&);
///
MFloatVector( const MPoint&);
///
MFloatVector( float xx, float yy, float zz = 0.0);
///
MFloatVector( const float[3] );
///
~MFloatVector();
///
MFloatVector& operator= ( const MFloatVector& src );
///
float& operator()( unsigned i );
///
float operator()( unsigned i ) const;
///
float& operator[]( unsigned i );
///
float operator[]( unsigned i )const;
///
MFloatVector operator^( const MFloatVector& right) const;
///
MFloatVector& operator/=( float scalar );
///
MFloatVector operator/( float scalar ) const;
///
MFloatVector& operator*=( float scalar );
///
MFloatVector operator*( float scalar ) const;
///
friend OPENMAYA_EXPORT MFloatVector operator*( int,
const MFloatVector& );
///
friend OPENMAYA_EXPORT MFloatVector operator*( short,
const MFloatVector& );
///
friend OPENMAYA_EXPORT MFloatVector operator*( unsigned int,
const MFloatVector& );
///
friend OPENMAYA_EXPORT MFloatVector operator*( unsigned short,
const MFloatVector& );
///
friend OPENMAYA_EXPORT MFloatVector operator*( float,
const MFloatVector& );
///
friend OPENMAYA_EXPORT MFloatVector operator*( double,
const MFloatVector& );
///
MFloatVector operator+( const MFloatVector& other) const;
///
MFloatVector& operator+=( const MFloatVector& other );
///
MFloatVector operator-() const;
///
MFloatVector operator-( const MFloatVector& other ) const;
///
MFloatVector operator*( const MFloatMatrix&) const;
///
MFloatVector& operator*=( const MFloatMatrix&);
///
friend OPENMAYA_EXPORT MFloatVector operator*( const MFloatMatrix&,
const MFloatVector& );
///
float operator*( const MFloatVector& other ) const;
///
bool operator!=( const MFloatVector& other ) const;
///
bool operator==( const MFloatVector& other ) const;
///
MStatus get( float[3] ) const;
///
float length() const;
///
MFloatVector normal() const;
///
MStatus normalize();
///
float angle( const MFloatVector& other ) const;
///
bool isEquivalent( const MFloatVector& other,
float tolerance = MFloatVector_kTol )
const;
///
bool isParallel( const MFloatVector& other,
float tolerance = MFloatVector_kTol )
const;
///
MFloatVector transformAsNormal( const MFloatMatrix & matrix ) const;
///
friend OPENMAYA_EXPORT IOS_REF(ostream)& operator<<( IOS_REF(ostream)& os,
const MFloatVector& v );
/// The null vector
static const MFloatVector zero;
/// Unit vector in the positive x direction
static const MFloatVector xAxis;
/// Unit vector in the positive y direction
static const MFloatVector yAxis;
/// Unit vector in the positive z direction
static const MFloatVector zAxis;
/// Unit vector in the negative z direction
static const MFloatVector xNegAxis;
/// Unit vector in the negative z direction
static const MFloatVector yNegAxis;
/// Unit vector in the negative z direction
static const MFloatVector zNegAxis;
/// The x component of the vector
float x;
/// The y component of the vector
float y;
/// The z component of the vector
float z;
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFloatVector */

View File

@ -0,0 +1,133 @@
#ifndef _MFloatVectorArray
#define _MFloatVectorArray
//
//-
// ==========================================================================
// Copyright (C) Alias|Wavefront, a division of Silicon Graphics Limited.
// All rights reserved. These coded instructions, statements and computer
// programs contain unpublished information proprietary to Alias|Wavefront,
// a division of Silicon Graphics Limited, which is protected by the
// Canadian and US federal copyright law and may not be disclosed to third
// parties or copied or duplicated, in whole or in part, without prior
// written consent of Alias|Wavefront, a division of Silicon Graphics Limited
// ==========================================================================
//+
//
// CLASS: MFloatVectorArray
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFloatVectorArray)
//
// This class implements an array of MFloatVectors. Common convenience
// functions are available, and the implementation is compatible with the
// internal Maya implementation so that it can be passed efficiently between
// plugins and internal maya data structures.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MTypes.h>
#include <maya/MStatus.h>
// *****************************************************************************
// DECLARATIONS
#include <maya/MFloatVector.h>
// *****************************************************************************
// CLASS DECLARATION (MFloatVectorArray)
/// Array of MFloatVectors data type
/**
Implement an array of MFloatVectors data type.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFloatVectorArray
{
public:
///
MFloatVectorArray();
///
MFloatVectorArray( const MFloatVectorArray& other );
///
MFloatVectorArray( const MFloatVector vectors[], unsigned count );
///
MFloatVectorArray( const double vectors[][3], unsigned count );
///
MFloatVectorArray( const float vectors[][3], unsigned count );
///
MFloatVectorArray( unsigned initialSize,
const MFloatVector &initialValue
= MFloatVector::zero );
///
~MFloatVectorArray();
///
const MFloatVector& operator[]( unsigned index ) const;
///
MFloatVector & operator[]( unsigned index );
///
MFloatVectorArray & operator=( const MFloatVectorArray & other );
///
bool set( const MFloatVector& element, unsigned index );
///
bool set( double element[3], unsigned index );
///
bool set( float element[3], unsigned index );
///
MStatus setLength( unsigned length );
///
unsigned length() const;
///
bool remove( unsigned index );
///
bool insert( const MFloatVector & element, unsigned index );
///
bool append( const MFloatVector & element );
///
MStatus copy( const MFloatVectorArray& source );
///
bool clear();
///
bool get( double [][3] ) const;
///
bool get( float [][3] ) const;
///
void setSizeIncrement ( unsigned newIncrement );
///
unsigned sizeIncrement () const;
///
friend OPENMAYA_EXPORT IOS_REF(ostream) &operator<<(IOS_REF(ostream) &os,
const MFloatVectorArray &array);
protected:
// No protected members
private:
MFloatVectorArray( void* );
void * arr;
bool own;
static const char* className();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFloatVectorArray */

1883
lib/mayamacsdk5/include/maya/MFn.h Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,105 @@
#ifndef _MFnAirField
#define _MFnAirField
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnAirField
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnAirField)
//
// Function set for Air Fields
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnField.h>
#include <maya/MVector.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFnAirField)
/// Function set for Air Fields (OpenMayaFX)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAFX_EXPORT MFnAirField : public MFnField
{
declareDagMFn(MFnAirField, MFnField);
public:
///
MVector direction ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setDirection ( const MVector & airDirection );
///
double speed ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setSpeed ( double value );
///
double inheritVelocity ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setInheritVelocity ( double velocity );
///
bool inheritRotation ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setInheritRotation ( bool enable );
///
bool componentOnly ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setComponentOnly ( bool enable );
///
double spread ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setSpread ( double value );
///
bool enableSpread ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setEnableSpread ( bool enable );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnAirField */

View File

@ -0,0 +1,99 @@
#ifndef _MFnAmbientLight
#define _MFnAmbientLight
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnAmbientLight
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnAmbientLight)
//
// MFnAmbientLight facilitates creation and manipulation of ambient light
// dependency graph nodes.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDagNode.h>
#include <maya/MObject.h>
#include <maya/MStatus.h>
#include <maya/MFnLight.h>
// *****************************************************************************
// DECLARATIONS
class MPoint;
class MColor;
class MDagPath;
// *****************************************************************************
// CLASS DECLARATION (MFnAmbientLight)
/// Manage Ambient Light dependency Nodes
/**
Facilitate the creation and manipulation of ambient light nodes.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnAmbientLight : public MFnLight
{
declareDagMFn(MFnAmbientLight,MFnLight);
public:
///
MObject create( bool UIvisible = true, MStatus * ReturnStatus = NULL );
///
MObject create( const MObject& parent, bool UIvisible = true,
MStatus * ReturnStatus = NULL );
///
float ambientShade( MStatus * ReturnStatus = NULL ) const;
///
MStatus setAmbientShade( const float& ambient_shade );
///
bool castSoftShadows( MStatus * ReturnStatus = NULL ) const;
///
MStatus setCastSoftShadows( const bool& cast_soft_shadows );
///
float shadowRadius( MStatus * ReturnStatus = NULL ) const;
///
MStatus setShadowRadius( const float& shadow_radius );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnAmbientLight */

View File

@ -0,0 +1,377 @@
#ifndef _MFnAnimCurve
#define _MFnAnimCurve
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnAnimCurve
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnAnimCurve)
//
// In Maya Animation Curves (Anim Curves) are implemented as Dependency Graph
// (DG) Nodes. Each Node has multiple ordered and indexed keyframes.
//
// There are 8 different types of Anim Curve nodes:
// timeToAngular (animCurveTA)
// timeToLinear (animCurveTL)
// timeToTime (animCurveTT)
// timeToUnitless (animCurveTU)
// unitlessToAngular (animCurveUA)
// unitlessToLinear (animCurveUL)
// unitlessToTime (animCurveUT)
// unitlessToUnitless (animCurveUU)
// Specifying the correct AnimCurveType during creation will avoid implicit
// unit conversions.
//
// The Anim Curve Function Set provides methods for creating, querying and
// editing Anim Curve Nodes and the keyframes which are internal to the Nodes.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDependencyNode.h>
#include <maya/MTime.h>
#include <maya/MAngle.h>
#include <maya/MDoubleArray.h>
#include <maya/MTimeArray.h>
// *****************************************************************************
// DECLARATIONS
class MAnimCurveChange;
class MPlug;
class MDGModifier;
// *****************************************************************************
// CLASS DECLARATION (MFnAnimCurve)
/// Anim Curve Function Set (OpenMayaAnim)
/**
Create, query and edit Anim Curve Nodes and the keys internal to
those Nodes.
Create an Anim Curve Node and connect its output to any animatable
attribute on another Node.
Evaluate an Anim Curve at a particular time.
Determine the number of keys held by an Anim Curve.
Determine the time and value of individual keys, as well as the
(angle,weight) or (x,y) values and type of key tangents. The in-tangent
refers to the tangent entering the key. The out-tangent refers to the tangent
leaving the key.
Find the index of the key at, or closest to a particular time.
Set the time and value of individual keys, as well as the type of
the tangent to the curve entering (in-tangent) and leaving
(out-tangent) the key, specify the tangent as either (angle,weight) or (x,y).
Add and remove keys from an Anim Curve.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MFnAnimCurve : public MFnDependencyNode
{
declareMFn(MFnAnimCurve, MFnDependencyNode);
public:
///
MFnAnimCurve (const MPlug &plug, MStatus *ReturnStatus = NULL);
public:
///
enum AnimCurveType {
/// kAnimCurveTA = 0
kAnimCurveTA = 0,
/// kAnimCurveTL
kAnimCurveTL,
/// kAnimCurveTT
kAnimCurveTT,
/// kAnimCurveTU
kAnimCurveTU,
/// kAnimCurveUA
kAnimCurveUA,
/// kAnimCurveUL
kAnimCurveUL,
/// kAnimCurveUT
kAnimCurveUT,
/// kAnimCurveUU
kAnimCurveUU,
/// kAnimCurveUnknown
kAnimCurveUnknown
};
///
enum TangentType {
///
kTangentGlobal = 0,
///
kTangentFixed,
///
kTangentLinear,
///
kTangentFlat,
///
kTangentSmooth,
///
kTangentStep,
///OBSOLETE kTangentSlow should not be used. Using this tangent type may produce unwanted and unexpected results.
kTangentSlow,
///OBSOLETE kTangentFast should not be used. Using this tangent type may produce unwanted and unexpected results.
kTangentFast,
///
kTangentClamped
};
///
enum InfinityType {
///
kConstant = 0,
///
kLinear = 1,
///
kCycle = 3,
///
kCycleRelative = 4,
///
kOscillate = 5
};
///
MObject create( const MObject & node,
const MObject & attribute,
MDGModifier * modifier = NULL,
MStatus * ReturnStatus = NULL );
///
MObject create( const MObject & node,
const MObject & attribute,
AnimCurveType animCurveType,
MDGModifier * modifier = NULL,
MStatus * ReturnStatus = NULL );
///
MObject create( MPlug & plug,
MDGModifier * modifier = NULL,
MStatus * ReturnStatus = NULL );
///
MObject create( MPlug & plug,
AnimCurveType animCurveType,
MDGModifier * modifier = NULL,
MStatus * ReturnStatus = NULL );
///
// the following create method builds an animCurve with
// no connections
MObject create( AnimCurveType animCurveType,
MDGModifier * modifier = NULL,
MStatus * ReturnStatus = NULL );
///
AnimCurveType animCurveType (MStatus *ReturnStatus = NULL) const;
///
AnimCurveType timedAnimCurveTypeForPlug( MPlug& plug,
MStatus *ReturnStatus = NULL) const;
///
AnimCurveType unitlessAnimCurveTypeForPlug( MPlug& plug,
MStatus *ReturnStatus = NULL) const;
///
double evaluate( const MTime &atTime,
MStatus * ReturnStatus = NULL ) const;
///
MStatus evaluate( const MTime &atTime, double &value ) const;
///
MStatus evaluate( const MTime &atTime, MTime &timeValue ) const;
///
MStatus evaluate( const double &atUnitlessInput, double &value ) const;
///
MStatus evaluate( const double &atUnitlessInput,
MTime &timeValue ) const;
///
bool isStatic( MStatus * ReturnStatus = NULL ) const;
///
unsigned numKeyframes( MStatus * ReturnStatus = NULL ) const;
///
unsigned numKeys( MStatus * ReturnStatus = NULL ) const;
///
MStatus remove( unsigned index, MAnimCurveChange * change = NULL );
///
MStatus addKeyframe( MTime time, double value,
MAnimCurveChange * change = NULL );
///
MStatus addKeyframe( MTime time, double value,
TangentType tangentInType,
TangentType tangentOutType,
MAnimCurveChange * change = NULL );
///
// for animCurveTU, animCurveTL and animCurveTA
unsigned addKey( MTime time, double value,
TangentType tangentInType = kTangentGlobal,
TangentType tangentOutType = kTangentGlobal,
MAnimCurveChange * change = NULL,
MStatus * ReturnStatus = NULL );
///
// for animCurveTT
unsigned addKey( MTime timeInput, MTime timeValue,
TangentType tangentInType = kTangentGlobal,
TangentType tangentOutType = kTangentGlobal,
MAnimCurveChange * change = NULL,
MStatus * ReturnStatus = NULL );
///
// for animCurveUU, animCurveUL and animCurveUA
unsigned addKey( double unitlessInput, double value,
TangentType tangentInType = kTangentGlobal,
TangentType tangentOutType = kTangentGlobal,
MAnimCurveChange * change = NULL,
MStatus * ReturnStatus = NULL );
///
// for animCurveUT
unsigned addKey( double unitlessInput, MTime time,
TangentType tangentInType = kTangentGlobal,
TangentType tangentOutType = kTangentGlobal,
MAnimCurveChange * change = NULL,
MStatus * ReturnStatus = NULL );
///
// block add keys for TL, TA and TU animCurves
MStatus addKeys( MTimeArray * timeArray,
MDoubleArray * valueArray,
TangentType tangentInType = kTangentGlobal,
TangentType tangentOutType = kTangentGlobal,
bool keepExistingKeys = false,
MAnimCurveChange * change = NULL );
///
bool find( MTime time, unsigned &index,
MStatus * ReturnStatus = NULL ) const;
///
bool find( double unitlessInput, unsigned & index,
MStatus * ReturnStatus = NULL ) const;
///
unsigned findClosest( MTime time, MStatus * ReturnStatus = NULL ) const;
///
unsigned findClosest( double unitlessInput,
MStatus * ReturnStatus = NULL ) const;
///
MTime time( unsigned index, MStatus * ReturnStatus = NULL ) const;
///
double value( unsigned index, MStatus * ReturnStatus = NULL ) const;
///
double unitlessInput( unsigned index,
MStatus * ReturnStatus = NULL ) const;
///
MStatus setValue( unsigned index, double value,
MAnimCurveChange * change = NULL );
///
MStatus setTime( unsigned index, MTime time,
MAnimCurveChange * change = NULL );
///
MStatus setUnitlessInput( unsigned index, double unitlessInput,
MAnimCurveChange * change = NULL );
///
bool isTimeInput( MStatus * ReturnStatus = NULL ) const;
///
bool isUnitlessInput( MStatus * ReturnStatus = NULL ) const;
///
TangentType inTangentType( unsigned index,
MStatus * ReturnStatus = NULL ) const;
///
TangentType outTangentType( unsigned index,
MStatus * ReturnStatus = NULL ) const;
///
MStatus setInTangentType( unsigned index, TangentType tangentType,
MAnimCurveChange * change = NULL );
///
MStatus setOutTangentType( unsigned index, TangentType tangentType,
MAnimCurveChange * change = NULL );
///
MStatus getTangent( unsigned index, float &x, float &y,
bool inTangent ) const;
///
MStatus getTangent( unsigned index, MAngle &angle, double &weight,
bool inTangent ) const;
///
MStatus setTangent( unsigned index, float x, float y, bool inTangent,
MAnimCurveChange * change = NULL );
///
MStatus setTangent( unsigned index, MAngle angle, double weight,
bool inTangent, MAnimCurveChange * change = NULL );
///
MStatus setAngle( unsigned index, MAngle angle, bool inTangent,
MAnimCurveChange * change = NULL );
///
MStatus setWeight( unsigned index, double weight, bool inTangent,
MAnimCurveChange * change = NULL );
///
bool weightsLocked( unsigned index,
MStatus * ReturnStatus = NULL ) const;
///
bool tangentsLocked( unsigned index,
MStatus * ReturnStatus = NULL ) const;
///
MStatus setWeightsLocked( unsigned index, bool locked,
MAnimCurveChange * change = NULL );
///
MStatus setTangentsLocked( unsigned index, bool locked,
MAnimCurveChange * change = NULL );
///
InfinityType preInfinityType( MStatus * ReturnStatus = NULL ) const;
///
InfinityType postInfinityType( MStatus * ReturnStatus = NULL ) const;
///
MStatus setPreInfinityType( InfinityType infinityType,
MAnimCurveChange * change = NULL );
///
MStatus setPostInfinityType( InfinityType infinityType,
MAnimCurveChange * change = NULL );
///
bool isWeighted (MStatus *ReturnStatus = NULL) const;
///
MStatus setIsWeighted (bool isWeighted,
MAnimCurveChange *change = NULL);
///
bool isBreakdown( unsigned index,
MStatus * ReturnStatus = NULL ) const;
///
MStatus setIsBreakdown( unsigned index,
bool isBreakdown,
MAnimCurveChange *change = NULL);
protected:
// No protected members
private:
// No private members
// *****************************************************************************
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
#endif /* __cplusplus */
#endif /* _MFnAnimCurve */

View File

@ -0,0 +1,87 @@
#ifndef _MFnAreaLight
#define _MFnAreaLight
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnAreaLight
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnAreaLight)
//
// MFnAreaLight facilitates creation and manipulation of dependency graph nodes
// representing area lights.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDagNode.h>
#include <maya/MObject.h>
#include <maya/MStatus.h>
#include <maya/MFnNonExtendedLight.h>
// *****************************************************************************
// DECLARATIONS
class MFltMatrix;
// *****************************************************************************
// CLASS DECLARATION (MFnAreaLight)
/// Manage Area Light dependency Nodes
/**
Facilitate the creation and manipulation of area light nodes
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnAreaLight : public MFnNonExtendedLight
{
declareDagMFn(MFnAreaLight,MFnNonExtendedLight);
public:
///
MObject create( bool UIvisible = true, MStatus * ReturnStatus = NULL );
///
MObject create( const MObject& parent, bool UIvisible = true,
MStatus * ReturnStatus = NULL );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnAreaLight */

View File

@ -0,0 +1,132 @@
#ifndef _MFnArrayAttrsData
#define _MFnArrayAttrsData
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnArrayAttrsData
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnArrayAttrsData)
//
// MFnArrayAttrsData allows the creation and manipulation of MVectorArray and
// MDoubleArray data objects for use in the dependency graph.
//
// If a user written dependency node either accepts or produces MVectorArrays,
// then this class is used to extract or create the data that comes from or
// goes to other dependency graph nodes. The MDataHandle::type method will
// return kVectorArray when data of this type is present. To access it, the
// MDataHandle::data method is used to get an MObject for the data and this
// should then be used to initialize an instance of MFnArrayAttrsData.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnData.h>
// *****************************************************************************
// DECLARATIONS
class MVectorArray;
class MDoubleArray;
class MIntArray;
class MStringArray;
// *****************************************************************************
// CLASS DECLARATION (MFnArrayAttrsData)
/// Function set for multiple arrays of attributes for dependency node data.
/**
Function set for multiple arrays of attributes for dependency node data.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnArrayAttrsData : public MFnData
{
declareMFn( MFnArrayAttrsData, MFnData );
public:
enum Type {
///
kInvalid,
/// use vectorArray() method to extract the attribute array.
kVectorArray,
/// use doubleArray() method to extract the attribute array.
kDoubleArray,
/// use intArray() method to extract the attribute array.
kIntArray,
/// use stringArray() method to extract the attribute array.
kStringArray,
///
kLast
};
///
MStatus clear();
///
unsigned count() const;
///
MStringArray list( MStatus *ReturnStatus = NULL) const;
///
bool checkArrayExist( const MString attrName,
Type &arrayType,
MStatus *ReturnStatus = NULL);
///
MVectorArray vectorArray( const MString attrName,
MStatus *ReturnStatus = NULL );
///
MDoubleArray doubleArray( const MString attrName,
MStatus *ReturnStatus = NULL );
///
MIntArray intArray( const MString attrName,
MStatus *ReturnStatus = NULL );
///
MStringArray stringArray( const MString attrName,
MStatus *ReturnStatus = NULL );
///
MObject create( MStatus *ReturnStatus = NULL );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnArrayAttrsData */

View File

@ -0,0 +1,189 @@
#ifndef _MFnAttribute
#define _MFnAttribute
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnAttribute
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnAttribute)
//
// MFnAttribute is the function set for dependency node attributes.
//
// An attribute of a dependency node describes a piece of data that belongs to
// nodes of that type. For example, a node that makes a sphere might have a
// radius attribute. A node's attributes describe connections sites on the
// node that can be used in the dependency graph.
//
// Attributes typically belong to a class of nodes, rather than to an
// individual node. For example, all sphere nodes have a radius. Even though
// a single attribute may be shared by all nodes of a given type, each node
// will have its own value for the attribute.
//
// Attributes are heirarchical. For example, the translate scale attribute
// of a transform has x, y, and z child attributes.
//
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnBase.h>
#include <maya/MFnData.h>
// *****************************************************************************
// DECLARATIONS
class MTypeId;
class MString;
class MStringArray;
// *****************************************************************************
// CLASS DECLARATION (MFnAttribute)
/// Dependency node attribute function set
/**
Function set for attributes of dependency nodes.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnAttribute : public MFnBase
{
declareMFn(MFnAttribute, MFnBase);
public:
///
enum DisconnectBehavior {
/// delete array element on disconnect (array attributes only)
kDelete,
/// reset the attribute to its default on disconnect
kReset,
/// do nothing to the attribute's value on disconnect
kNothing
};
///
bool isReadable( MStatus* ReturnStatus=NULL ) const;
///
bool isWritable( MStatus* ReturnStatus=NULL ) const;
///
bool isConnectable( MStatus* ReturnStatus=NULL ) const;
///
bool isStorable( MStatus* ReturnStatus=NULL ) const;
///
bool isCached( MStatus* ReturnStatus=NULL ) const;
///
bool isArray( MStatus* ReturnStatus=NULL ) const;
///
bool indexMatters( MStatus* ReturnStatus=NULL ) const;
///
bool isKeyable( MStatus* ReturnStatus=NULL ) const;
///
bool isHidden( MStatus* ReturnStatus=NULL ) const;
///
bool isUsedAsColor( MStatus* ReturnStatus=NULL ) const;
///
bool isIndeterminant( MStatus* ReturnStatus=NULL ) const;
///
bool isRenderSource( MStatus* ReturnStatus=NULL ) const;
///
bool isDynamic( MStatus* ReturnStatus=NULL ) const;
///
DisconnectBehavior disconnectBehavior( MStatus* ReturnStatus=NULL ) const;
///
bool usesArrayDataBuilder( MStatus* ReturnStatus=NULL ) const;
///
bool internal( MStatus* ReturnStatus=NULL ) const;
///
MStatus setReadable( bool state );
///
MStatus setWritable( bool state );
///
MStatus setConnectable( bool state );
///
MStatus setStorable( bool state );
///
MStatus setCached( bool state );
///
MStatus setArray( bool state );
///
MStatus setIndexMatters( bool state );
///
MStatus setKeyable( bool state );
///
MStatus setHidden( bool state );
///
MStatus setUsedAsColor( bool state );
///
MStatus setIndeterminant( bool state );
///
MStatus setRenderSource( bool state );
///
MStatus setDisconnectBehavior( DisconnectBehavior behavior );
///
MStatus setUsesArrayDataBuilder( bool state );
///
MStatus setInternal( bool state );
///
bool accepts( MFnData::Type type, MStatus* ReturnStatus=NULL ) const;
///
bool accepts( const MTypeId& id, MStatus* ReturnStatus=NULL ) const;
///
MObject parent(MStatus* ReturnStatus=NULL) const;
///
MStatus setParent( const MObject & parent );
///
MString name( MStatus* ReturnStatus=NULL ) const;
///
MString shortName( MStatus* ReturnStatus=NULL ) const;
///
MString getAddAttrCmd(
bool useLongName = false,
MStatus* status=NULL
) const;
protected:
void * ca[3];
void setPtr( MPtrBase* );
private:
virtual bool objectChanged( MFn::Type, MStatus * );
};
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnAttribute */

View File

@ -0,0 +1,187 @@
#ifndef _MFnBase
#define _MFnBase
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnBase
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnBase)
//
// The API provides access to Maya Objects as generic MObjects. Under the
// C++ class scheme MObjects simply have type MObject with no base or
// derived hierarchy. However, MObjects may be many different types of
// model or scene objects, from Attributes to Xforms, within Maya. This
// allows many different types of objects to be moved across or accessed
// through the API without undue concern on the part of plug-in developers
// for the type of object being manipulated.
//
// Since it is impractical to provide every applicable method on MObjects,
// the methods applicable to Maya Objects are encapsulated in Function
// Sets. Function Sets can be attached to compatible MObjects to provide
// an external interface to methods appropriate to that MObject.
//
// The link between an MObject and the role it performs as a Maya scene or
// model object, as well as the compatibility between MObjects and
// Function Sets is managed by the API Run-Time Type Identification (RTTI)
// system. The two key concepts of this system are the Maya Object type
// and the Function Set type (both are MFn::Type). All MObjects have
// one and only one Maya Object type. All Function Sets have one and only
// one Function Set type. MObjects may, however, be compatible with many
// types of Function Sets. This compatibility follows the class hierarchy
// of the Function Sets. Thus an MObject with Maya Object type
// MFn::kNurbsSurface would be compatible with MFnNurbsSurface,
// MFnDagNode, MFnDependencyNode, MFnNamedObject and MFnBase.
//
// Any MObject can be queried with the MObject::hasFn() method to
// determine if it is comaptible with a given Function Set.
//
// The purpose of the Base Function Set (MFnBase) is to provide methods
// for determining whether or not a Function Set is compatible with a
// given Maya Object (MObject) type (MFn::Type) or a specific MObject. See:
// MFnBase::hasObj(MFn::Type)
// and
// MFnBase::hasObj(const MObject &)
//
// As well, this Function Set provides virtual methods for determining the
// type of a Function Set under the API RTTI system.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFn.h>
#include <maya/MStatus.h>
#include <maya/MTypes.h>
// *****************************************************************************
// DECLARATIONS
class MObject;
class MPtrBase;
// *****************************************************************************
// CLASS DECLARATION (MFnBase)
/// Function Set Base Class
/**
Defines the interface for the API RTTI and Maya Object attachment methods
common to all Function Set Classes.
Implements the Function Set compatibility test methods for all Function Sets.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnBase
{
public:
///
virtual ~MFnBase();
///
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 );
protected:
MFnBase();
virtual const char* className() const;
void setPtr( MPtrBase* );
void setPtr( const MPtrBase* );
void setPtrNull();
virtual bool objectChanged( MFn::Type, MStatus * );
MPtrBase* f_ptr; // initialized/set with volatile
const MPtrBase* f_constptr; // initialized/set with volatile/const
// Specific for function sets which use internally reference counted objects!
// Only those function sets which use these objects need to set this to true.
// By default it is set to false.
//
// Classes which do not use internally reference counted objects must not
// tamper with this boolean value. Doing so can cause crashes when dealing with
// manually deleted objects.
//
bool fIsReferenceCounted;
private:
#ifndef _WIN32
MFnBase & operator=( const MFnBase & ) const;
#endif
MFnBase & operator=( const MFnBase & );
MFnBase * operator& () const;
MFnBase * operator& ();
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#define declareMinimalMFn( MFnClass ) \
public: \
virtual MFn::Type type() const; \
virtual ~MFnClass(); \
\
protected: \
virtual const char* className() const; \
\
private: \
MFnClass & operator=( const MFnClass & ) const; \
MFnClass & operator=( const MFnClass & ); \
MFnClass * operator& () const; \
MFnClass * operator& ()
#define declareMFn( MFnClass, MFnParentClass ) \
declareMinimalMFn( MFnClass ); \
public: \
MFnClass() {}; \
MFnClass( MObject & object, MStatus * ReturnStatus = NULL );\
MFnClass( const MObject & object, MStatus * ReturnStatus = NULL )
// Standard MFn class interface *without* the class constructor. This
// is to allow derived MFn classes to optionally specify their own
// custom constructor. For example if they wanted to declare that they
// use internally reference counted objects, they could set fIsReferenceCounted
// to true inside their own custom constructor.
//
#define declareMFnNoConstructor( MFnClass, MFnParentClass ) \
declareMinimalMFn( MFnClass ); \
public: \
MFnClass( MObject & object, MStatus * ReturnStatus = NULL );\
MFnClass( const MObject & object, MStatus * ReturnStatus = NULL )
#endif /* __cplusplus */
#endif /* _MFnBase */

View File

@ -0,0 +1,192 @@
#ifndef _MFnBlendShapeDeformer
#define _MFnBlendShapeDeformer
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnBlendShapeDeformer
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnBlendShapeDeformer)
//
// MFnBlendShapeDeformer is the function set for blend shape deformers. A
// blend shape deformer takes a base shape (polygonal surface, curve,
// surface, or lattice) and blends it with other target shapes based on
// weight values.
//
// The blend shape deformer is actually a small network of dependency
// nodes in the dependency graph. This function set is provided to make
// manipulation of the network easier. The main deformer node should be
// given to this function set as its object.
//
// There are three parts to a blend shape deformer. There are the base
// objects, the target objects, and the weight values.
//
// The base objects are the shapes that are to be deformed. There must be
// at least one base object. The base objects will change form as the
// targets and deformation parameters are modified.
//
// Each base object has a list of target objects that affect its shape.
// Each target is associated with one of the the deformer's weight
// values. When the weight value increases, the target has more influence
// on the base shape.
//
// There is just one array of weight values between all of the base
// objects and targets. So, it is possible for targets of different base
// objects to share the same weight index. When the weight value changes,
// it will affect all of the base objects that have targets using that
// weight value.
//
// It is also possible to chain together target shapes so that a base
// object will deform through each shape one at a time as the weight value
// increases. This is done by adding multiple targets to a base shape
// using the same weight index for all of them. When each target is
// added, a weight value is specified at which that target will be in full
// effect. Give each target a different full weight value.
//
// For example, one could take a sphere and make it blend into a cone and
// then into a cylinder. One way to do this is to make sphere the base
// shape. Then, add the cone as a target for the sphere at weight index 0
// with a full effect weight of 0.5. Next, add the cylinder as a second
// target for the sphere also at weight index 0, but with a full effect
// weight of 1.0. Now, as the weight goes from 0 to 1, the base shape
// will start as a sphere, morph into a cone, and then into a cylinder.
//
// It is not necessary for the base shape and it's targets to have
// identical geometry, but the blend will be more effective if they do.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDependencyNode.h>
#include <maya/MPoint.h>
// *****************************************************************************
// DECLARATIONS
class MDagPath;
class MObjectArray;
class MIntArray;
// *****************************************************************************
// CLASS DECLARATION (MFnBlendShapeDeformer)
/// blend shape deformer function set (OpenMayaAnim)
/**
Function set for blend shape deformer
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MFnBlendShapeDeformer : public MFnDependencyNode
{
declareMFn(MFnBlendShapeDeformer, MFnDependencyNode );
public:
///
enum Origin {
///
kLocalOrigin,
///
kWorldOrigin
};
///
enum HistoryLocation {
///
kFrontOfChain,
///
kNormal
};
///
MObject create( MObject baseObject,
Origin originSpace = kLocalOrigin,
MStatus * ReturnStatus = NULL );
///
MObject create( MObjectArray baseObjects,
Origin originSpace = kLocalOrigin,
HistoryLocation = kNormal,
MStatus * ReturnStatus = NULL );
///
MStatus addBaseObject( MObject & object );
///
MStatus getBaseObjects( MObjectArray & objects ) const;
///
MStatus addTarget( const MObject & baseObject, int weightIndex,
const MObject & newTarget, double fullWeight );
///
MStatus removeTarget( const MObject & baseObject,
int weightIndex,
const MObject & target,
double fullWeight );
///
MStatus getTargets( MObject baseObject, int weightIndex,
MObjectArray & targetObjects ) const;
///
unsigned numWeights( MStatus * ReturnStatus = NULL ) const;
///
MStatus weightIndexList( MIntArray& indexList ) const;
///
MStatus targetItemIndexList( unsigned targetIndex,
MObject baseObject,
MIntArray& inbetweens ) const;
///
float weight( unsigned index, MStatus * ReturnStatus = NULL ) const;
///
MStatus setWeight( unsigned index, float weight );
///
float envelope( MStatus * ReturnStatus = NULL ) const;
///
MStatus setEnvelope( float envelope );
///
Origin origin( MStatus * ReturnStatus = NULL ) const;
///
MStatus setOrigin( Origin space );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnBlendShapeDeformer */

View File

@ -0,0 +1,89 @@
#ifndef _MFnBlinnShader
#define _MFnBlinnShader
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnBlinnShader
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnBlinnShader)
//
// MFnBlinnShader facilitates creation and manipulation of dependency graph
// nodes representing Blinn shaders.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MObject.h>
#include <maya/MStatus.h>
#include <maya/MFnReflectShader.h>
// *****************************************************************************
// DECLARATIONS
class MFnReflectShader;
// *****************************************************************************
// CLASS DECLARATION (MFnBlinnShader)
/// Manage Blinn shaders.
/**
Facilitate the creation and manipulation of Blinn shaders.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnBlinnShader : public MFnReflectShader
{
declareMFn( MFnBlinnShader, MFnReflectShader );
public:
///
MObject create( bool UIvisible = true, MStatus * ReturnStatus = NULL );
///
float eccentricity( MStatus * ReturnStatus = NULL ) const;
///
MStatus setEccentricity( const float& eccentricity );
///
float specularRollOff( MStatus * ReturnStatus = NULL ) const;
///
MStatus setSpecularRollOff( const float& specular_rolloff );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnBlinnShader */

View File

@ -0,0 +1,342 @@
#ifndef _MFnCamera
#define _MFnCamera
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnCamera
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnCamera)
//
// Function set for creation, edit, and query of cameras.
//
// Many of the camera settings only affect the resulting rendered image.
// E.g. the F/Stop, shutter speed, the film related options, etc.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDagNode.h>
#include <maya/MObject.h>
#include <maya/MStatus.h>
#include <maya/MPoint.h>
// *****************************************************************************
// DECLARATIONS
//class MPoint;
class MVector;
class MDagPath;
class MFloatMatrix;
// *****************************************************************************
// CLASS DECLARATION (MFnCamera)
/// Function set for cameras
/**
*/
#if defined(_WIN32)
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnCamera : public MFnDagNode
{
declareDagMFn(MFnCamera,MFnDagNode);
public:
///
MObject create( MStatus * ReturnStatus = NULL );
///
MObject create( MObject & parent, MStatus * ReturnStatus = NULL );
///
MPoint eyePoint( MSpace::Space space = MSpace::kObject,
MStatus * ReturnStatus = NULL ) const;
///
MVector viewDirection( MSpace::Space space = MSpace::kObject,
MStatus * ReturnStatus = NULL ) const;
///
MVector upDirection( MSpace::Space space = MSpace::kObject,
MStatus * ReturnStatus = NULL ) const;
///
MVector rightDirection( MSpace::Space space = MSpace::kObject,
MStatus * ReturnStatus = NULL ) const;
///
MPoint centerOfInterestPoint(
MSpace::Space space = MSpace::kObject,
MStatus * ReturnStatus = NULL ) const;
///
MStatus set ( const MPoint & wsEyeLocation,
const MVector & wsViewDirection,
const MVector & wsUpDirection,
double horizFieldOfView,
double aspectRatio );
///
MStatus setEyePoint( const MPoint &eyeLocation,
MSpace::Space space = MSpace::kObject );
///
MStatus setCenterOfInterestPoint( const MPoint &centerOfInterest,
MSpace::Space space = MSpace::kObject );
///
bool hasSamePerspective( const MDagPath &otherCamera,
MStatus * ReturnStatus = NULL );
///
MStatus copyViewFrom( const MDagPath &otherCamera );
///
MStatus getFilmFrustum( double distance, MPoint clipPlane[4] ) const;
///
MStatus getFilmFrustum( double distance,
double& hSize,
double& vSize,
double& hOffset,
double& vOffset ) const;
///
MStatus getPortFieldOfView( int width, int height,
double& horizontalFOV,
double& verticalFOV ) const;
///
MStatus getViewingFrustum( double windowAspect,
double& left, double& right,
double& bottom, double& top,
bool applyOverscan = false,
bool applySqueeze = false ) const;
///
MStatus getRenderingFrustum( double windowAspect,
double& left, double& right,
double& bottom, double& top ) const;
///
MFloatMatrix projectionMatrix( MStatus * ReturnStatus = NULL ) const;
///
MStatus setHorizontalFilmAperture( double hFilmAperture );
///
double horizontalFilmAperture( MStatus * ReturnStatus = NULL ) const;
///
MStatus setVerticalFilmAperture( double vFilmAperture );
///
double verticalFilmAperture( MStatus * ReturnStatus = NULL ) const;
///
MStatus getFilmApertureLimits( double & min, double & max ) const;
///
MStatus setAspectRatio( double aspectRatio );
///
double aspectRatio( MStatus * ReturnStatus = NULL ) const;
///
MStatus getAspectRatioLimits(double & min, double & max) const;
///
MStatus setVerticalLock( bool lockFlag );
///
bool isVerticalLock( MStatus * ReturnStatus = NULL ) const;
///
double horizontalFilmOffset( MStatus * ReturnStatus = NULL ) const;
///
MStatus setHorizontalFilmOffset( double hOffset );
///
double verticalFilmOffset( MStatus * ReturnStatus = NULL ) const;
///
MStatus setVerticalFilmOffset( double vOffset );
///
enum FilmFit {
///
kFillFilmFit,
///
kHorizontalFilmFit,
///
kVerticalFilmFit,
///
kOverscanFilmFit,
///
kInvalid
};
///
MStatus setFilmFit( FilmFit filmFit );
///
FilmFit filmFit( MStatus * ReturnStatus = NULL ) const;
///
MStatus setFilmFitOffset( double filmFitOffset );
///
double filmFitOffset( MStatus * ReturnStatus = NULL ) const;
///
MStatus setOverscan( double overscan );
///
double overscan( MStatus * ReturnStatus = NULL ) const;
///
MStatus setHorizontalRollPivot( double horizontalRollPivot );
///
double horizontalRollPivot( MStatus * ReturnStatus = NULL ) const;
///
MStatus setVerticalRollPivot( double verticalRollPivot );
///
double verticalRollPivot( MStatus * ReturnStatus = NULL ) const;
///
MStatus setFilmRollValue( double filmRollValue );
///
double filmRollValue( MStatus * ReturnStatus = NULL ) const;
///
enum RollOrder {
///
kRotateTranslate,
///
kTranslateRotate
};
///
MStatus setFilmRollOrder( RollOrder filmRollOrder );
///
RollOrder filmRollOrder( MStatus * ReturnStatus = NULL ) const;
///
MStatus setPreScale( double sf );
///
double preScale( MStatus * ReturnStatus = NULL ) const;
///
MStatus setPostScale( double sf );
///
double postScale( MStatus * ReturnStatus = NULL ) const;
///
MStatus setFilmTranslateH( double translate );
///
double filmTranslateH( MStatus * ReturnStatus = NULL ) const;
///
MStatus setFilmTranslateV( double translate );
///
double filmTranslateV( MStatus * ReturnStatus = NULL ) const;
///
MFloatMatrix postProjectionMatrix( MStatus * ReturnStatus = NULL ) const;
///
MStatus setDisplayFilmGate( bool displayFilmGate );
///
bool isDisplayFilmGate( MStatus * ReturnStatus = NULL ) const;
///
MStatus setHorizontalFieldOfView( double fov );
///
double horizontalFieldOfView( MStatus * ReturnStatus = NULL ) const;
///
MStatus setVerticalFieldOfView( double fov );
///
double verticalFieldOfView( MStatus * ReturnStatus = NULL ) const;
///
MStatus setFocalLength( double focalLength );
///
double focalLength( MStatus * ReturnStatus = NULL ) const;
///
MStatus getFocalLengthLimits( double & min, double & max ) const;
///
MStatus setLensSqueezeRatio( double lensSqueezeRatio );
///
double lensSqueezeRatio( MStatus * ReturnStatus = NULL ) const;
///
MStatus setClippingPlanes( bool ClippingPlanes );
///
bool isClippingPlanes( MStatus * ReturnStatus = NULL ) const;
///
MStatus setNearClippingPlane( double dNear );
///
double nearClippingPlane( MStatus * ReturnStatus = NULL ) const;
///
MStatus setFarClippingPlane( double dFar );
///
double farClippingPlane( MStatus * ReturnStatus = NULL ) const;
///
MStatus setNearFarClippingPlanes( double dNear, double dFar );
///
MStatus setDepthOfField( bool depthOfField );
///
bool isDepthOfField( MStatus * ReturnStatus = NULL ) const;
///
MStatus setFStop( double fStop );
///
double fStop( MStatus * ReturnStatus = NULL ) const;
///
MStatus setFocusDistance( double distance );
///
double focusDistance( MStatus * ReturnStatus = NULL ) const;
///
MStatus setNearFocusDistance( double nearFocusDistance );
///
double nearFocusDistance( MStatus * ReturnStatus = NULL ) const;
///
MStatus setFarFocusDistance( double farFocusDistance );
///
double farFocusDistance( MStatus * ReturnStatus = NULL ) const;
///
MStatus computeDepthOfField();
///
MStatus computeDepthOfField( double nearLimit );
///
MStatus setMotionBlur( bool motionBlur );
///
bool isMotionBlur( MStatus * ReturnStatus = NULL ) const;
///
MStatus setShutterAngle( double shutterAngle );
///
double shutterAngle( MStatus * ReturnStatus = NULL ) const;
///
MStatus setCenterOfInterest( double dist );
///
double centerOfInterest( MStatus * ReturnStatus = NULL ) const;
///
MStatus setIsOrtho( bool orthoState );
///
MStatus setIsOrtho( bool orthoState, double useDist );
///
bool isOrtho( MStatus * ReturnStatus = NULL ) const;
///
MStatus setOrthoWidth( double orthoWidth );
///
double orthoWidth( MStatus * ReturnStatus = NULL ) const;
///
MStatus setCameraScale( double scale );
///
double cameraScale( MStatus * ReturnStatus = NULL ) const;
///
MStatus setStereo( bool stereo );
///
bool isStereo( MStatus * ReturnStatus = NULL ) const;
///
MStatus setParallelView( bool parallelView );
///
bool isParallelView( MStatus * ReturnStatus = NULL ) const;
///
MStatus setEyeOffset( double eyeOffset );
///
double eyeOffset( MStatus * ReturnStatus = NULL ) const;
///
MStatus setTumblePivot( const MPoint& point );
///
MPoint tumblePivot( MStatus * ReturnStatus = NULL ) const;
protected:
// No protected members
private:
// No private members
};
#if defined(_WIN32)
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnCamera */

View File

@ -0,0 +1,134 @@
#ifndef _MFnCharacter
#define _MFnCharacter
//
// *****************************************************************************
//
// Copyright (C) 2000-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnCharacter
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnCharacter)
//
// MFnCharacter is the function set that is used for manipulating characters.
// Characters in Maya are dependency nodes used to manage any set of keyable
// attributes. The attributes contained in a character can be manipulated
// using clips, scheduled in a nonlinear manner by a clipScheduler node.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MString.h>
#include <maya/MFnSet.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
class MObjectArray;
class MSelectionList;
class MDagPath;
class TsetCmd;
class Tstring;
class MDGModifier;
// *****************************************************************************
// CLASS DECLARATION (MFnCharacter)
/// Function Set for Characters
/**
Function set for characters
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MFnCharacter : public MFnSet
{
declareMFn(MFnCharacter, MFnSet);
public:
///
MStatus attachSourceToCharacter( MObject& sourceClip,
MDGModifier& dgMod);
///
MStatus attachInstanceToCharacter( MObject& instanceClip,
MDGModifier& dgMod);
///
MStatus addCurveToClip( MObject& curve,
MObject& sourceClip,
MPlug& characterPlug,
MDGModifier& dgMod);
///
MObject createBlend( MObject& instancedClip1,
MObject& instancedClip2,
MObject& blendAnimCurve,
MDGModifier& dgMod,
MStatus *ReturnStatus = NULL);
///
bool blendExists(MObject& instancedClip1,
MObject& instancedClip2,
MObject& blendResult);
///
bool removeBlend(MObject& instancedClip1,
MObject& instancedClip2,
MDGModifier& dgMod,
MStatus* ReturnStatus = NULL);
///
bool getCharacterThatOwnsPlug(MPlug& plug, MObject& result) const;
///
MStatus getMemberPlugs(MPlugArray& result) const;
///
MStatus getSubCharacters(MSelectionList& result) const;
///
MObject getClipScheduler(MStatus * ReturnStatus = NULL);
///
int getScheduledClipCount(MStatus * ReturnStatus = NULL);
///
MObject getScheduledClip(int index, MStatus * ReturnStatus = NULL);
///
int getSourceClipCount(MStatus * ReturnStatus = NULL);
///
MObject getSourceClip(int index, MStatus * ReturnStatus = NULL);
///
int getBlendCount(MStatus * ReturnStatus = NULL);
///
MObject getBlend(int index, MStatus * ReturnStatus = NULL);
///
MStatus getBlendClips(int index, MObject& clip1, MObject& clip2);
protected:
virtual Tstring setCommandString();
virtual TsetCmd* setCommand();
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnCharacter */

View File

@ -0,0 +1,114 @@
#ifndef _MFnCircleSweepManip
#define _MFnCircleSweepManip
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnCircleSweepManip
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnCircleSweepManip)
//
// Function set for a base manipulator - the CircleSweepManip
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnBase.h>
#include <maya/MFnManip3D.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
class MPoint;
class MVector;
class MAngle;
// *****************************************************************************
// CLASS DECLARATION (MFnCircleSweepManip)
/// CircleSweepManip function set (OpenMayaUI)
/**
MFnCircleSweepManip is the function set for circle sweep manipulators.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MFnCircleSweepManip : public MFnManip3D
{
declareDagMFn(MFnCircleSweepManip, MFnManip3D);
public:
///
MObject create(MStatus *ReturnStatus = NULL);
///
MObject create(const MString &manipName,
const MString &angleName,
MStatus *ReturnStatus = NULL);
///
MStatus connectToAnglePlug(MPlug &anglePlug);
///
MStatus setCenterPoint(const MPoint &centerPoint);
///
MStatus setStartPoint(const MPoint &startPoint);
///
MStatus setEndPoint(const MPoint &endPoint);
///
MStatus setNormal(const MVector &normal);
///
MStatus setRadius(double radius);
///
MStatus setAngle(MAngle angle);
///
MStatus setDrawAsArc(bool state);
///
MPoint startPoint(MStatus *ReturnStatus = NULL) const;
///
MPoint endPoint(MStatus *ReturnStatus = NULL) const;
///
unsigned centerIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned axisIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned angleIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned startCircleIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned endCircleIndex(MStatus *ReturnStatus = NULL) const;
protected:
private:
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnCircleSweepManip */

View File

@ -0,0 +1,133 @@
#ifndef _MFnClip
#define _MFnClip
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnClip
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnClip)
//
// MFnClip is the function set for clips.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDependencyNode.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
class MObject;
class MTime;
class MDGModifier;
// *****************************************************************************
// CLASS DECLARATION (MFnClip)
/// clip function set (OpenMayaAnim)
/**
MFnClip is the function set for creating, querying and
editing animation clips.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MFnClip : public MFnDependencyNode
{
declareMFn(MFnClip, MFnDependencyNode);
public:
///
MObject createSourceClip ( const MTime& sourceStart,
const MTime& sourceDuration,
MDGModifier& dgMod,
MStatus * ReturnStatus = NULL );
///
MObject createInstancedClip ( MObject& sourceClip,
const MTime& start,
MDGModifier& dgMod,
MStatus * ReturnStatus = NULL,
bool absolute = 1,
double cycle = 1.0,
double weight = 1.0,
double scale = 1.0 );
///
bool isInstancedClip(MStatus *ReturnStatus = NULL);
///
bool isPose(MStatus *ReturnStatus = NULL);
///
MObject sourceClip(MStatus *ReturnStatus = NULL);
///
double getCycle(MStatus *ReturnStatus = NULL);
///
double getWeight(MStatus *ReturnStatus = NULL);
///
double getScale(MStatus *ReturnStatus = NULL);
///
bool getAbsolute(MStatus *ReturnStatus = NULL);
///
bool getEnabled(MStatus *ReturnStatus = NULL);
///
MTime getStartFrame(MStatus *ReturnStatus = NULL);
///
MTime getSourceStart(MStatus *ReturnStatus = NULL);
///
MTime getSourceDuration(MStatus *ReturnStatus = NULL);
///
MStatus getMemberAnimCurves(MObjectArray& curves,
MPlugArray& associatedAttrs);
///
MStatus setPoseClip(bool state, MDGModifier* mod = NULL);
///
MStatus setCycle(double cycle, MDGModifier* mod = NULL);
///
MStatus setWeight(double wt, MDGModifier* mod = NULL);
///
MStatus setScale(double scale, MDGModifier* mod = NULL);
///
MStatus setAbsolute(bool abs, MDGModifier* mod = NULL);
///
MStatus setEnabled(bool val, MDGModifier* mod = NULL);
///
MStatus setStartFrame(const MTime& start, MDGModifier* mod = NULL);
///
MStatus setSourceData(const MTime& start,const MTime& duration,
MDGModifier* mod = NULL);
protected:
// No protected members
private:
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnClip */

View File

@ -0,0 +1,109 @@
#ifndef _MFnComponent
#define _MFnComponent
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnComponent
//
// This is the base class for all function sets which deal with
// component objects.
//
// Components are MObjects which hold index information for shapes.
// The component object does not contain any information about the
// shape, it just contains index values and type information.
//
// Components can be marked as complete meaning that the component
// represents a complete set of indices from 0 to numElements-1;
//
// Components come is 3 varieties based upon the dimensions of the
// index. The types are single, double, and triple indexed.
// Examples of these types are mesh vertices (single indexed),
// nurbs surface CVs (double indexed), and lattice points (triple indexed).
//
// To create, edit, or query a specific type of component, use the
// derived classes MFnSingleIndexedComponent, MFnDoubleIndexedComponent,
// and MFnTripleIndexedComponent.
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnComponent)
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnBase.h>
#include <maya/MString.h>
// *****************************************************************************
// DECLARATIONS
class MIntArray;
// *****************************************************************************
// CLASS DECLARATION (MFnComponent)
/// Base class for component function sets
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnComponent : public MFnBase
{
declareMFnNoConstructor( MFnComponent, MFnBase );
public:
///
MFnComponent();
///
int elementCount( MStatus* ReturnStatus = NULL );
///
MFn::Type type( MStatus * ReturnStatus = NULL );
///
bool isEmpty( MStatus * ReturnStatus = NULL ) const;
///
bool isEqual( MObject &, MStatus * ReturnStatus = NULL ) const;
///
bool isComplete( MStatus * ReturnStatus = NULL ) const;
///
MStatus setComplete( bool );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnComponent */

View File

@ -0,0 +1,100 @@
#ifndef _MFnComponentListData
#define _MFnComponentListData
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnComponentListData
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnComponentListData)
//
// MFnComponentListData allows the creation and manipulation of component list
// (represented as MObjects) data objects for use in the dependency graph.
//
// If a user written dependency node either accepts or produces MObjects
// containing component lists, then this class is used to extract or
// create the data that comes from or goes to other dependency graph
// nodes. To access it, the MDataHandle::data method is used to get an
// MObject for the data and this should then be used to initialize an
// instance of MFnComponentListData.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnData.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFnComponentListData)
/// Component list function set for dependency node data
/**
Create and manipulate Component Lists dependency node data.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnComponentListData : public MFnData
{
declareMFn(MFnComponentListData, MFnData);
public:
///
unsigned length( MStatus* ReturnStatus = NULL ) const;
///
bool has( const MObject& obj,
MStatus* ReturnStatus = NULL ) const;
///
MObject operator[]( unsigned index) const;
///
MStatus add( MObject& );
///
MStatus remove( const MObject& );
///
MStatus remove( unsigned index );
///
MStatus clear();
///
MObject create( MStatus* ReturnStatus = NULL );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnComponentListData */

View File

@ -0,0 +1,110 @@
#ifndef _MFnCompoundAttribute
#define _MFnCompoundAttribute
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnCompoundAttribute
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnCompoundAttribute)
//
// MFnCompoundAttribute is the function set for compound dependency node
// attributes.
//
// Compound attributes allow the grouping of related attributes into a larger
// unit. It is possible to connect to a compound attribute as a whole, or
// to any of the individual children.
//
// For example, the three attributes RED, GREEN, and BLUE could be grouped
// into a compound attribute of type COLOR. It is then possible to connect
// two COLOR attributes together. This removes the need to connect each
// child explicitly.
//
// A second use for compound attributes is when there are multi attributes that
// relate to each other on an element-by-element basis. An example of this
// is the weighted matrix node that has a multi attribute with matrices that
// must be matched with the multi attribute that provides the weights for each
// matrix.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnAttribute.h>
// *****************************************************************************
// DECLARATIONS
class MString;
// *****************************************************************************
// CLASS DECLARATION (MFnCompoundAttribute)
/// Compound attribute function set
/**
Function set for compound attributes of dependency nodes
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnCompoundAttribute : public MFnAttribute
{
declareMFn(MFnCompoundAttribute, MFnAttribute);
public:
///
MObject create( const MString& full,
const MString& brief,
MStatus* ReturnStatus = NULL );
///
MStatus addChild( const MObject & child );
///
MStatus removeChild( const MObject & child );
///
unsigned numChildren( MStatus* ReturnStatus = NULL ) const;
///
MObject child( unsigned index, MStatus* ReturnStatus = NULL ) const;
///
MStatus getAddAttrCmds(
MStringArray& cmds,
bool useLongNames = false
) const;
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnCompoundAttribute */

View File

@ -0,0 +1,103 @@
#ifndef _MFnCurveSegmentManip
#define _MFnCurveSegmentManip
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnCurveSegmentManip
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnCurveSegmentManip)
//
// Function set for a base manipulator - the CurveSegmentManip.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnBase.h>
#include <maya/MFnManip3D.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
class MPoint;
// *****************************************************************************
// CLASS DECLARATION (MFnCurveSegmentManip)
/// CurveSegmentManip function set (OpenMayaUI)
/**
MFnCurveSegmentManip is the function set for curve segment manipulators.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MFnCurveSegmentManip : public MFnManip3D
{
declareDagMFn(MFnCurveSegmentManip, MFnManip3D);
public:
///
MObject create(MStatus *ReturnStatus = NULL);
///
MObject create(const MString &manipName,
const MString &startParamName,
const MString &endParamName,
MStatus *ReturnStatus = NULL);
///
MStatus connectToCurvePlug(MPlug &curvePlug);
///
MStatus connectToStartParamPlug(MPlug &startParamPlug);
///
MStatus connectToEndParamPlug(MPlug &endParamPlug);
///
MStatus setStartParameter(double startParameter);
///
MStatus setEndParameter(double endParameter);
///
double startParameter(MStatus *ReturnStatus = NULL) const;
///
double endParameter(MStatus *ReturnStatus = NULL) const;
///
unsigned curveIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned startParamIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned endParamIndex(MStatus *ReturnStatus = NULL) const;
protected:
private:
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnCurveSegmentManip */

View File

@ -0,0 +1,246 @@
#ifndef _MFnDagNode
#define _MFnDagNode
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnDagNode
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnDagNode)
//
// The MFnDagNode function set is used to query and set the attributes of
// nodes in the DAG (Directed Acyclic Graph). The DAG is a graph that
// describes the hierarchy of the objects in the model. At each level of
// the hierarchy there is a four by four transformation matrix that
// affects all of the objects beneath it in the DAG.
//
// In the DAG, geometry objects (also known as shapes) do not have
// transformation information associated with them. Only transform
// nodes have actual transform matrices (see MFnTransform).
//
// Each node that exists in the DAG is also a dependency node that
// exists in the dependency graph. This makes it possible to control
// the attributes of a DAG node based on calculations performed by
// dependency nodes.
//
// There are two ways to specify a DAG node in Maya. The first is
// to use an MObject handle, which acts as a pointer to a specific
// node in the DAG. Given only an MObject, it is not possible to do
// world space operations on a DAG node because there may be more
// than one path through the DAG to any given node. In other words,
// it is not possible to identify a particular instance only given
// an MObject.
//
// In many cases it is preferable to use a DAG path (MDagPath) to specify
// a DAG node. A DAG path always refers to a specific instance of an
// object. This makes it possible to perform unambiguous world space
// transformations.
//
// It is also possible to iterate over the nodes in the DAG using a
// DAG iterator (MItDag).
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDependencyNode.h>
#include <maya/MObject.h>
#include <stdlib.h>
// *****************************************************************************
// DECLARATIONS
class MMatrix;
class MDagPath;
class MDagPathArray;
class MBoundingBox;
// *****************************************************************************
// CLASS DECLARATION (MFnDagNode)
/// DAG Node Function Set
/**
Provides methods for attaching Function Sets to, querying, and adding
children to DAG Nodes. Particularly useful when used in conjunction
with the DAG Iterator class (MItDag).
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnDagNode : public MFnDependencyNode
{
declareMinimalMFn( MFnDagNode );
public:
enum {
/// used by addChild to indicate the next empty position in the list.
kNextPos = 0xff
};
///
MFnDagNode();
///
MFnDagNode( MObject & object, MStatus * ret = NULL );
///
MFnDagNode( const MObject & object, MStatus * ret = NULL );
///
MFnDagNode( const MDagPath & object, MStatus * ret = NULL );
///
MObject create( const MTypeId &typeId,
MObject &parent = MObject::kNullObj,
MStatus* ReturnStatus = NULL );
///
MObject create( const MTypeId &typeId,
const MString &name,
MObject &parent = MObject::kNullObj,
MStatus* ReturnStatus = NULL );
///
MObject create( const MString &type,
MObject &parent = MObject::kNullObj,
MStatus* ReturnStatus = NULL );
///
MObject create( const MString &type,
const MString &name,
MObject &parent = MObject::kNullObj,
MStatus* ReturnStatus = NULL );
///
unsigned int parentCount( MStatus * ReturnStatus = NULL ) const;
///
MObject parent( unsigned int i,
MStatus * ReturnStatus = NULL ) const;
///
MStatus addChild( MObject & child, unsigned int index = kNextPos );
///
MStatus removeChild( MObject & child );
///
MStatus removeChildAt( unsigned int index );
///
unsigned int childCount( MStatus * ReturnStatus = NULL ) const;
///
MObject child( unsigned int i,
MStatus * ReturnStatus = NULL ) const;
///
MObject dagRoot( MStatus * ReturnStatus = NULL );
///
bool hasParent( const MObject & node,
MStatus * ReturnStatus = NULL ) const;
///
bool hasChild (const MObject& node,
MStatus * ReturnStatus = NULL ) const;
///
bool isChildOf (const MObject& node,
MStatus * ReturnStatus = NULL ) const;
///
bool isParentOf (const MObject& node,
MStatus * ReturnStatus = NULL ) const;
///
bool inUnderWorld ( MStatus * ReturnStatus = NULL ) const;
///
bool isInstanced( bool indirect = true,
MStatus * ReturnStatus = NULL ) const;
///
bool isInstancedAttribute( const MObject& attr,
MStatus * ReturnStatus = NULL ) const;
///
unsigned int instanceCount( bool total,
MStatus * ReturnStatus = NULL ) const;
///
MObject duplicate( bool instance = false,
bool instanceLeaf = false,
MStatus * ReturnStatus = NULL ) const;
///
MStatus getPath( MDagPath& path );
///
MStatus getAllPaths( MDagPathArray& paths );
///
MString fullPathName(MStatus *ReturnStatus = NULL);
///
MString partialPathName(MStatus *ReturnStatus = NULL);
///
MMatrix transformationMatrix( MStatus * ReturnStatus = NULL ) const;
///
bool isIntermediateObject( MStatus * ReturnStatus = NULL ) const;
///
MStatus setIntermediateObject( bool isIntermediate );
///
int objectColor( MStatus * ReturnStatus = NULL ) const;
///
MStatus setObjectColor( int color );
///
bool usingObjectColor ( MStatus * ReturnStatus = NULL ) const;
///
MStatus setUseObjectColor( bool useObjectColor );
///
MBoundingBox boundingBox( MStatus * ReturnStatus = NULL ) const;
///
MDagPath dagPath( MStatus * ReturnStatus = NULL ) const;
///
virtual MStatus setObject( const MDagPath & path );
///
virtual MStatus setObject( MObject & object );
///
virtual MStatus setObject( const MObject & object );
/// OBSOLETE
MObject model( MStatus * ReturnStatus = NULL ) const;
protected:
void * f_path;
void * f_xform;
void * f_data1;
void * f_data2;
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
#define declareDagMFn( MFnClass, MFnParentClass ) \
declareMinimalMFn( MFnClass ); \
public: \
MFnClass(); \
MFnClass( MObject & object, MStatus * ret = NULL ); \
MFnClass( const MObject & object, MStatus * ret = NULL ); \
MFnClass( const MDagPath & object, MStatus * ret = NULL )
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnDagNode */

View File

@ -0,0 +1,136 @@
#ifndef _MFnData
#define _MFnData
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnData
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnData)
//
// MFnData is the parent class for all dependency graph data function
// sets. Conceptually, data objects are what flow through the connections
// in the dependency graph.
//
// Each node in the dependency graph has a data block associated with it.
// The data block holds the data objects for all of the node's attributes
// (see MDataBlock). The data block is only available during the compute
// method of a node. A data handle (MDataHandle) can be created to access
// a particular attribute's data inside of the data block.
//
// Once a data handle is obtained, it is possible to get the data object
// from it. This is only necessary for heavier data structures such as
// geometry or strings. Simple numeric data can be manipulated straight
// through the data handle.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnBase.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFnData)
/// Parent Class for dependency graph data function sets.
/**
Common methods for manipulating dependency graph data.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnData : public MFnBase
{
declareMFnNoConstructor( MFnData, MFnBase );
public:
///
MFnData();
///
enum Type {
///
kInvalid,
/// Numeric, use MFnNumericData extract the node data.
kNumeric,
/// Plugin Blind Data, use MFnPluginData to extract the node data.
kPlugin,
/// Plugin Geometry, use MFnGeometryData to extract the node data.
kPluginGeometry,
/// String, use MFnStringData to extract the node data.
kString,
/// Matrix, use MFnMatrixData to extract the node data.
kMatrix,
/// String Array, use MFnStringArrayData to extract the node data.
kStringArray,
/// Double Array, use MFnDoubleArrayData to extract the node data.
kDoubleArray,
/// Int Array, use MFnIntArrayData to extract the node data.
kIntArray,
/// Point Array, use MFnPointArrayData to extract the node data.
kPointArray,
/// Vector Array, use MFnVectorArrayData to extract the node data.
kVectorArray,
/// Component List, use MFnComponentListData to extract the node data.
kComponentList,
/// Mesh, use MFnMeshData to extract the node data.
kMesh,
/// Lattice, use MFnLatticeData to extract the node data.
kLattice,
/// Nurbs Curve, use MFnNurbsCurveData to extract the node data.
kNurbsCurve,
/// Nurbs Surface, use MFnNurbsSurfaceData to extract the node data.
kNurbsSurface,
/// Sphere, use MFnSphereData to extract the node data.
kSphere,
/// ArrayAttrs, use MFnArrayAttrsData to extract the node data.
kDynArrayAttrs,
/// SweptGeometry, use MFnDynSweptGeometryData to extract the node data.
kDynSweptGeometry,
/// Subdivision Surface, use MFnSubdData to extract the node data.
kSubdSurface,
///
kLast
};
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnData */

View File

@ -0,0 +1,193 @@
#ifndef _MFnDependencyNode
#define _MFnDependencyNode
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnDependencyNode
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnDependencyNode)
//
// MFnDependencyNode allows the creation and manipulation of dependency
// graph nodes. Traversal of the dependency graph is possible using the
// getConnections method.
//
// This function set does not support creation or removal of connections.
// MDGModifier should be used for that purpose.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnBase.h>
#include <maya/MTypeId.h>
#include <maya/MString.h>
// *****************************************************************************
// DECLARATIONS
class MPlugArray;
class MPlug;
class MTypeId;
class MPxNode;
class MObjectArray;
// *****************************************************************************
// CLASS DECLARATION (MFnDependencyNode)
/// Dependency node function set
/**
MFnNumericData allows the manipulation of nodes in the dependency graph
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnDependencyNode : public MFnBase
{
declareMFn(MFnDependencyNode, MFnBase);
public:
///
enum MAttrClass {
///
kGlobalDynamicAttr = 1,
///
kLocalDynamicAttr,
//
kNormalAttr,
//
kInvalidAttr
};
///
MObject create( const MTypeId &typeId,
MStatus* ReturnStatus = NULL );
///
MObject create( const MTypeId &typeId,
const MString& name,
MStatus* ReturnStatus = NULL );
///
MObject create( const MString &type,
MStatus* ReturnStatus = NULL );
///
MObject create( const MString &type,
const MString& name,
MStatus* ReturnStatus = NULL );
///
MTypeId typeId( MStatus* ReturnStatus = NULL ) const;
///
MString typeName( MStatus* ReturnStatus = NULL ) const;
///
MString name( MStatus * ReturnStatus = NULL ) const;
///
MString setName( const MString &name,
MStatus * ReturnStatus = NULL );
///
MStatus getConnections( MPlugArray& array ) const;
///
unsigned attributeCount( MStatus* ReturnStatus=NULL) const;
///
MObject attribute( unsigned index,
MStatus* ReturnStatus=NULL) const;
///
MObject reorderedAttribute( unsigned index,
MStatus* ReturnStatus=NULL) const;
///
MObject attribute( const MString& attrName,
MStatus* ReturnStatus=NULL) const;
///
MAttrClass attributeClass( const MObject& attr,
MStatus* ReturnStatus=NULL) const;
///
MStatus getAffectedAttributes ( const MObject& attr,
MObjectArray& affectedAttributes ) const;
///
MStatus getAffectedByAttributes ( const MObject& attr,
MObjectArray& affectedByAttributes ) const;
///
MPlug findPlug( const MObject & attr,
MStatus* ReturnStatus=NULL) const;
///
MPlug findPlug( const MString & attrName,
MStatus* ReturnStatus=NULL) const;
///
MStatus addAttribute( const MObject & attr,
MAttrClass type = kLocalDynamicAttr );
///
MStatus removeAttribute( const MObject & attr,
MAttrClass type = kLocalDynamicAttr );
///
MPxNode * userNode( MStatus* ReturnStatus=NULL ) const;
///
bool isFromReferencedFile(MStatus* ReturnStatus=NULL) const;
///
bool isShared(MStatus* ReturnStatus=NULL) const;
///
bool hasUniqueName(MStatus* ReturnStatus=NULL) const;
///
MString parentNamespace(MStatus* ReturnStatus=NULL) const;
///
bool isLocked(MStatus* ReturnStatus=NULL) const;
///
MStatus setLocked( bool locked );
///
static MString classification( const MString & nodeTypeName );
///
bool isNewAttribute( const MObject& attr,
MStatus* ReturnStatus=NULL) const;
///
static unsigned allocateFlag(
const MString pluginName, MStatus* ReturnStatus=NULL
);
///
static MStatus deallocateFlag(const MString pluginName, unsigned flag);
///
static MStatus deallocateAllFlags(const MString pluginName);
///
MStatus setFlag(unsigned flag, bool state);
///
bool isFlagSet(unsigned flag, MStatus* ReturnStatus=NULL) const;
///
bool isDefaultNode(MStatus* ReturnStatus=NULL) const;
///
bool canBeWritten(MStatus* ReturnStatus=NULL) const;
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnDependencyNode */

View File

@ -0,0 +1,96 @@
#ifndef _MFnDirectionManip
#define _MFnDirectionManip
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnDirectionManip
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnDirectionManip)
//
// Function set for a base manipulator - DirectionManip.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnBase.h>
#include <maya/MFnManip3D.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
class MPoint;
// *****************************************************************************
// CLASS DECLARATION (MFnDirectionManip)
/// DirectionManip function set (OpenMayaUI)
/**
MFnDirectionManip is the function set for direction manipulators.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MFnDirectionManip : public MFnManip3D
{
declareDagMFn(MFnDirectionManip, MFnManip3D);
public:
///
MObject create(MStatus *ReturnStatus = NULL);
///
MObject create(const MString &manipName,
const MString &directionName,
MStatus *ReturnStatus = NULL);
///
MStatus connectToDirectionPlug(MPlug &directionPlug);
///
MStatus setNormalizeDirection(bool state);
///
MStatus setDrawStart(bool state);
///
MStatus setStartPoint(MPoint &startPoint);
///
unsigned startPointIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned endPointIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned directionIndex(MStatus *ReturnStatus = NULL) const;
protected:
private:
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnDirectionManip */

View File

@ -0,0 +1,91 @@
#ifndef _MFnDirectionalLight
#define _MFnDirectionalLight
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnDirectionalLight
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnDirectionalLight)
//
// MFnDirectionalLight facilitates creation and manipulation of dependency
// nodes representing direction lights.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDagNode.h>
#include <maya/MObject.h>
#include <maya/MStatus.h>
#include <maya/MFnNonExtendedLight.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFnDirectionalLight)
/// Manage Directional Light dependency Nodes
/**
Facilitate the creation and manipulation of directional light nodes.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnDirectionalLight : public MFnNonExtendedLight
{
declareDagMFn(MFnDirectionalLight,MFnNonExtendedLight);
public:
///
MObject create( bool UIvisible = true, MStatus * ReturnStatus = NULL );
///
MObject create( const MObject& parent, bool UIvisible = true,
MStatus * ReturnStatus = NULL );
///
float shadowAngle( MStatus * ReturnStatus = NULL ) const;
///
MStatus setShadowAngle( const float& shadow_angle );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnDirectionalLight */

View File

@ -0,0 +1,100 @@
#ifndef _MFnDiscManip
#define _MFnDiscManip
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnDiscManip
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnDiscManip)
//
// Function set for a base manipulator - the DiscManip.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnBase.h>
#include <maya/MFnManip3D.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
class MPoint;
class MVector;
class MAngle;
// *****************************************************************************
// CLASS DECLARATION (MFnDiscManip)
/// DiscManip function set (OpenMayaUI)
/**
MFnDiscManip is the function set for disc manipulators.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MFnDiscManip : public MFnManip3D
{
declareDagMFn(MFnDiscManip, MFnManip3D);
public:
///
MObject create(MStatus *ReturnStatus = NULL);
///
MObject create(const MString &manipName,
const MString &angleName,
MStatus *ReturnStatus = NULL);
///
MStatus connectToAnglePlug(MPlug &anglePlug);
///
MStatus setCenterPoint(const MPoint &centerPoint);
///
MStatus setNormal(const MVector &normal);
///
MStatus setRadius(double radius);
///
MStatus setAngle(MAngle angle);
///
unsigned centerIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned axisIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned angleIndex(MStatus *ReturnStatus = NULL) const;
protected:
private:
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnDiscManip */

View File

@ -0,0 +1,106 @@
#ifndef _MFnDistanceManip
#define _MFnDistanceManip
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnDistanceManip
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnDistanceManip)
//
// Function set for a base manipulator - the DistanceManip
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnBase.h>
#include <maya/MFnManip3D.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFnDistanceManip)
/// DistanceManip function set (OpenMayaUI)
/**
MFnDistanceManip is the function set for distance manipulators.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MFnDistanceManip : public MFnManip3D
{
declareDagMFn(MFnDistanceManip, MFnManip3D);
public:
///
MObject create(MStatus *ReturnStatus = NULL);
///
MObject create(const MString &manipName,
const MString &distanceName,
MStatus *ReturnStatus = NULL);
///
MStatus connectToDistancePlug(MPlug &distancePlug);
///
MStatus setStartPoint(const MPoint &point);
///
MStatus setDirection(const MVector &vector);
///
MStatus setDrawStart(bool state);
///
MStatus setDrawLine(bool state);
///
MStatus setScalingFactor(double scalingFactor);
///
bool isDrawStartOn(MStatus *ReturnStatus = NULL) const;
///
bool isDrawLineOn(MStatus *ReturnStatus = NULL) const;
///
double scalingFactor(MStatus *ReturnStatus = NULL) const;
///
unsigned distanceIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned directionIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned startPointIndex(MStatus *ReturnStatus = NULL) const;
///
unsigned currentPointIndex(MStatus *ReturnStatus = NULL) const;
protected:
private:
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnDistanceManip */

View File

@ -0,0 +1,101 @@
#ifndef _MFnDoubleArrayData
#define _MFnDoubleArrayData
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnDoubleArrayData
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnDoubleArrayData)
//
// MFnDoubleArrayData allows the creation and manipulation of MDoubleArray data
// objects for use in the dependency graph.
//
// If a user written dependency node either accepts or produces MDoubleArrays,
// then this class is used to extract or create the data that comes from or
// goes to other dependency graph nodes. The MDataHandle::type method will
// return kDoubleArray when data of this type is present. To access it, the
// MDataHandle::data method is used to get an MObject for the data and this
// should then be used to initialize an instance of MFnDoubleArrayData.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnData.h>
// *****************************************************************************
// DECLARATIONS
class MDoubleArray;
// *****************************************************************************
// CLASS DECLARATION (MFnDoubleArrayData)
/// double array function set for dependency node data
/**
Create and manipulate MDoubleArray dependency node data.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnDoubleArrayData : public MFnData
{
declareMFn(MFnDoubleArrayData, MFnData);
public:
///
unsigned length( MStatus* ReturnStatus = NULL ) const;
///
double operator[]( unsigned index ) const;
///
double& operator[]( unsigned index );
///
MStatus copyTo( MDoubleArray& ) const;
///
MStatus set( const MDoubleArray& newArray );
///
MDoubleArray array( MStatus*ReturnStatus=NULL );
///
MObject create( MStatus*ReturnStatus=NULL );
///
MObject create( const MDoubleArray& in, MStatus*ReturnStatus=NULL );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnDoubleArrayData */

View File

@ -0,0 +1,108 @@
#ifndef _MFnDoubleIndexedComponent
#define _MFnDoubleIndexedComponent
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnDoubleIndexedComponent
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnDoubleIndexedComponent)
//
// This function set allows you to create, edit, and query double indexed
// components. Double indexed components store 2 dimensional index
// values.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnBase.h>
#include <maya/MString.h>
#include <maya/MFnComponent.h>
// *****************************************************************************
// DECLARATIONS
class MIntArray;
// *****************************************************************************
// CLASS DECLARATION (MFnDoubleIndexedComponent)
/// Double indexed component function set
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnDoubleIndexedComponent : public MFnComponent
{
declareMFn( MFnDoubleIndexedComponent, MFnComponent );
public:
// Create a double indexed component of the given type.
// Allowable types are
//
// MFn::kSurfaceCVComponent
// MFn::kSurfaceEPComponent
// MFn::kSurfaceKnotComponent
//
///
MObject create( MFn::Type compType, MStatus * ReturnStatus = NULL );
///
MStatus addElement( int uIndex, int vIndex );
///
MStatus addElements( const MIntArray& uIndexArray,
const MIntArray& vIndexArray );
///
MStatus getElement( int index, int & uIndex, int & vIndex ) const;
///
MStatus getElements( MIntArray& uIndexArray,
MIntArray& vIndexArray ) const;
///
MStatus setCompleteData( int maxU, int maxV );
///
MStatus getCompleteData( int & maxU, int & maxV ) const;
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnDoubleIndexedComponent */

View File

@ -0,0 +1,85 @@
#ifndef _MFnDragField
#define _MFnDragField
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnDragField
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnDragField)
//
// Function set for Drag Fields
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDagNode.h>
#include <maya/MFnField.h>
#include <maya/MVector.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFnDragField)
/// Function set for Drag Fields (OpenMayaFX)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAFX_EXPORT MFnDragField : public MFnField
{
declareDagMFn(MFnDragField, MFnField);
public:
///
MVector direction ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setDirection ( const MVector & dragDirection );
///
bool useDirection ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setUseDirection ( bool enable );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnDragField */

View File

@ -0,0 +1,89 @@
#ifndef _MFnDynSweptGeometryData
#define _MFnDynSweptGeometryData
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnDynSweptGeometryData
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnDynSweptGeometryData)
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnData.h>
// *****************************************************************************
// DECLARATIONS
class MDynSweptLine;
class MDynSweptTriangle;
// *****************************************************************************
// CLASS DECLARATION (MFnDynSweptGeometryData)
/// Swept Geometry function set for dependency node data (OpenMayaFX)
/**
Access MDynSweptLine and MDynSweptTriangle dependency node data
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAFX_EXPORT MFnDynSweptGeometryData : public MFnData
{
declareMFn(MFnDynSweptGeometryData, MFnData);
public:
///
int lineCount( MStatus* ReturnStatus = NULL ) const;
///
int triangleCount( MStatus* ReturnStatus = NULL ) const;
///
MDynSweptLine sweptLine( int index,
MStatus* ReturnStatus = NULL ) const;
///
MDynSweptTriangle sweptTriangle( int index,
MStatus* ReturnStatus = NULL ) const;
///
MObject create( MStatus* ReturnStatus=NULL );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnDynSweptGeometryData */

View File

@ -0,0 +1,108 @@
#ifndef _MFnEnumAttribute
#define _MFnEnumAttribute
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnEnumAttribute
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnEnumAttribute)
//
// Function object for enumerated attributes. These attributes accept fields as
// input. Each field consists of a short and its associated string, which is a
// descriptive name for the short.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnAttribute.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
class MString;
// CLASS DECLARATION (MFnEnumAttribute)
/// Enumerated attribute function set
/**
Function set for enumerated attributes.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnEnumAttribute : public MFnAttribute
{
declareMFn(MFnEnumAttribute, MFnAttribute);
public:
///
MObject create( const MString& fullName,
const MString& briefName,
short defaultValue = 0,
MStatus* ReturnStatus = NULL );
///
MStatus addField( const MString & fieldString, short index);
///
MString fieldName( short index, MStatus *ReturnStatus = NULL ) const;
///
short fieldIndex( const MString & fieldString,
MStatus *ReturnStatus = NULL ) const;
///
MStatus getMin ( short& minValue ) const;
///
MStatus getMax ( short& maxValue ) const;
///
MStatus setDefault( short index );
///
MStatus setDefault( const MString &fieldString );
///
MStatus getDefault( short &index ) const;
///
MStatus getDefault( MString &fieldString ) const;
protected:
// No protected members
private:
MStatus commonGetDefault( short &index ) const;
MStatus commonSetDefault( short index ) const;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnEnumAttribute */

View File

@ -0,0 +1,116 @@
#ifndef _MFnExpression
#define _MFnExpression
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnExpression
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnExpression)
//
// Function set for expressions.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDependencyNode.h>
#include <maya/MObject.h>
#include <maya/MString.h>
// *****************************************************************************
// DECLARATIONS
class MDoubleArray;
class MPtrBase;
// *****************************************************************************
// CLASS DECLARATION (MFnExpression)
/// expression function set
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnExpression : public MFnDependencyNode
{
declareMFn( MFnExpression, MFnDependencyNode );
public:
///
enum UnitConversion {
/// convert all units
kAll,
/// do not do any unit conversion
kNone,
/// only convert angular units
kAngularOnly
};
///
MObject create( const MString & expression,
MObject & object = MObject::kNullObj,
MStatus * ReturnStatus = NULL );
///
MStatus getExpression( MString & expression );
///
MStatus setExpression( MString & expression );
///
MStatus getDefaultObject( MObject & object );
///
MStatus setDefaultObject( MObject & object );
///
bool isAnimated( MStatus * ReturnStatus = NULL );
///
MStatus setAnimated( bool value = false );
///
MStatus evaluate( MDoubleArray & result );
///
UnitConversion unitConversion( MStatus * ReturnStatus = NULL ) const;
///
MStatus setUnitConversion( UnitConversion conversion );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
#endif /* __cplusplus */
#endif /* _MFnExpression */

View File

@ -0,0 +1,113 @@
#ifndef _MFnField
#define _MFnField
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnField
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnField)
//
// Function set for Dynamic Fields
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDagNode.h>
// *****************************************************************************
// DECLARATIONS
class MPointArray;
class MVectorArray;
class MDoubleArray;
// *****************************************************************************
// CLASS DECLARATION (MFnField)
/// Function set for Dynamic Fields (OpenMayaFX)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAFX_EXPORT MFnField : public MFnDagNode
{
declareDagMFn(MFnField, MFnDagNode);
public:
///
MStatus getForceAtPoint(const MPointArray& point,
const MVectorArray& velocity,
const MDoubleArray& mass,
MVectorArray& force,
double deltaTime = 1.0 / 24.0 );
///
MStatus getForceAtPoint(const MVectorArray& point,
const MVectorArray& velocity,
const MDoubleArray& mass,
MVectorArray& force,
double deltaTime = 1.0 / 24.0 );
///
double magnitude ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setMagnitude ( double mag );
///
double attenuation ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setAttenuation ( double atten );
///
double maxDistance ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setMaxDistance ( double maxDist );
///
bool perVertex ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setPerVertex ( bool enable );
///
bool useMaxDistance ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setUseMaxDistance ( bool enable );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnField */

View File

@ -0,0 +1,242 @@
#ifndef _MFnFluid
#define _MFnFluid
//
// *****************************************************************************
//
// Copyright (C) 2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnFluid
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnFluid)
//
// This is the function set for fluid objects.
//
// A fluid object is a node in the dependency graph that contains a grid which
// is made up of cells. Each cell has a variety of values assigned to it such
// as density, velocity, temperature, and color. The grid may be 2D or 3D.
// See the methods below for full details.
//
// Fluid objects may be used for simulation purposes. This function set allows
// read and write access to the values in the cells of the fluid object.
//
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDagNode.h>
// *****************************************************************************
// DECLARATIONS
class MPointArray;
class MVectorArray;
class MDoubleArray;
// *****************************************************************************
// CLASS DECLARATION (MFnFluid)
/// Fluid node function set
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAFX_EXPORT MFnFluid : public MFnDagNode
{
declareDagMFn(MFnFluid, MFnDagNode);
///
enum FluidMethod {
/// all values in grid are zero
kZero,
/// values in the grid are static
kStaticGrid,
/// values in the grid come from a dynamic solver
kDynamicGrid,
/// ramps the value based on the gradient setting
kGradient
};
///
enum FluidGradient {
/// value is set to one across the volume
kConstant,
/// ramp the value from zero to one along the X axis
kXGradient,
/// ramp the value from zero to one along the Y axis
kYGradient,
/// ramp the value from zero to one along the Z axis
kZGradient,
/// ramp the value from one to zero along the X axis
kNegXGradient,
/// ramp the value from one to zero along the Y axis
kNegYGradient,
/// ramp the value from one to zero along the Z axis
kNegZGradient,
/// ramps the value from one at the center to zero at the edges
kCenterGradient
};
///
enum ColorMethod {
/// off, use shading color instead
kUseShadingColor,
/// values in the grid are static
kStaticColorGrid,
/// values in the grid come from a dynamic solver
kDynamicColorGrid
};
///
enum CoordinateMethod {
/// values are equal the object space coordinates
kFixed,
/// coordinate values will be moved using the current density solver
kGrid
};
// Create 2D and 3D fluids
///
MObject create3D ( unsigned Xres, unsigned Yres, unsigned Zres,
double Xdim, double Ydim, double Zdim,
MObject parentOrOwner = MObject::kNullObj,
MStatus * ReturnStatus = NULL );
///
MObject create2D ( unsigned Xres, unsigned Yres,
double Xdim, double Ydim,
MObject parentOrOwner = MObject::kNullObj,
MStatus * ReturnStatus = NULL );
// get and set resolution, dimensions
///
MStatus getResolution ( unsigned &Xres, unsigned &Yres,
unsigned &Zres ) const;
///
MStatus getResolution ( unsigned &Xres, unsigned &Yres ) const;
///
MStatus getDimensions ( double &Xdim, double &Ydim,
double &Zdim ) const;
///
MStatus getDimensions ( double &Xdim, double &Ydim ) const;
///
MStatus setSize ( unsigned Xres, unsigned Yres, unsigned Zres,
double Xdim, double Ydim, double Zdim,
bool resample );
///
MStatus setSize ( unsigned Xres, unsigned Yres,
double Xdim, double Ydim,
bool resample );
///
unsigned gridSize ( MStatus * ReturnStatus = NULL );
// get pointers to actual data area
// users may get and set data into these arrays,
///
float * density ( MStatus * ReturnStatus = NULL );
///
MStatus getVelocity ( float *& Xvel, float *& Yvel, float *& Zvel );
///
float * temperature ( MStatus * ReturnStatus = NULL );
///
float * fuel ( MStatus * ReturnStatus = NULL );
///
MStatus getCoordinates ( float *& u, float *& v, float *& w );
///
MStatus getColors ( float *& r, float *& g, float *& b );
// set Data Modes
///
MStatus setDensityMode ( FluidMethod mode, FluidGradient gradient );
///
MStatus getDensityMode ( FluidMethod &mode, FluidGradient &gradient );
///
MStatus setVelocityMode ( FluidMethod mode, FluidGradient gradient );
///
MStatus getVelocityMode ( FluidMethod &mode, FluidGradient &gradient );
///
MStatus setTemperatureMode ( FluidMethod mode, FluidGradient gradient );
///
MStatus getTemperatureMode ( FluidMethod &mode, FluidGradient &gradient );
///
MStatus setFuelMode ( FluidMethod mode, FluidGradient gradient );
///
MStatus getFuelMode ( FluidMethod &mode, FluidGradient &gradient );
///
MStatus setCoordinateMode ( CoordinateMethod mode ) ;
///
MStatus getCoordinateMode ( CoordinateMethod & mode );
///
MStatus setColorMode ( ColorMethod mode );
///
MStatus getColorMode ( ColorMethod & mode );
///
MStatus getForceAtPoint(const MPointArray& point,
const MVectorArray& velocity,
const MDoubleArray& mass,
MVectorArray& force,
double deltaTime = 1.0 / 24.0 );
///
MStatus getForceAtPoint(const MVectorArray& point,
const MVectorArray& velocity,
const MDoubleArray& mass,
MVectorArray& force,
double deltaTime = 1.0 / 24.0 );
///
MStatus updateGrid ();
// convert to/from single index
///
int index ( int xi, int yi );
///
int index ( int xi, int yi, int zi );
///
void index ( int ai, int & xi, int & yi, int & zi );
protected:
virtual bool objectChanged ( MFn::Type, MStatus * );
void * updateGeomPtr ();
void * updateConstGeomPtr () const;
private:
MObject create ( MObject parent, bool is2d,
MStatus * );
unsigned fNx, fNy, fNz;
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnFluid */

View File

@ -0,0 +1,112 @@
#ifndef _MFnFreePointTriadManip
#define _MFnFreePointTriadManip
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnFreePointTriadManip
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnFreePointTriadManip)
//
// Function set for a base manipulator - the FreePointTriadManip.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnBase.h>
#include <maya/MFnManip3D.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFnFreePointTriadManip)
/// FreePointTriadManip function set (OpenMayaUI)
/**
MFnFreePointTriadManip is the function set for free point triad manipulators.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAUI_EXPORT MFnFreePointTriadManip : public MFnManip3D
{
declareDagMFn(MFnFreePointTriadManip, MFnManip3D);
public:
///
enum ManipPlane {
/// Y-Z Plane
kYZPlane = 0,
/// X-Z Plane
kXZPlane,
/// X-Y Plane
kXYPlane,
/// View Plane
kViewPlane
};
///
MObject create(MStatus *ReturnStatus = NULL);
///
MObject create(const MString &manipName,
const MString &pointName,
MStatus *ReturnStatus = NULL);
///
MStatus connectToPointPlug(MPlug &pointPlug);
///
MStatus setDrawAxes(bool state);
///
MStatus setSnapMode(bool state);
///
MStatus setKeyframeAll(bool state);
///
MStatus setDrawArrowHead(bool state);
///
MStatus setGlobalTriadPlane(ManipPlane whichPlane);
///
bool isDrawAxesOn(MStatus *ReturnStatus = NULL) const;
///
bool isSnapModeOn(MStatus *ReturnStatus = NULL) const;
///
bool isKeyframeAllOn(MStatus *ReturnStatus = NULL) const;
///
unsigned pointIndex(MStatus *ReturnStatus = NULL) const;
protected:
private:
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnFreePointTriadManip */

View File

@ -0,0 +1,101 @@
#ifndef _MFnGenericAttribute
#define _MFnGenericAttribute
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnGenericAttribute
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnGenericAttribute)
//
// MFnGenericAttribute is a function set for attributes that can accept
// several types of data. A generic attribute is similar to a typed
// attribute (MFnTypedAttribute) except that it has a list of types that
// it considers valid.
//
// If the attribute will only take one type of data then it is more
// efficient to use one of the other attribute function sets such as
// MFnTypedAttribute or MFnNumericAttribute.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnAttribute.h>
#include <maya/MFnData.h>
#include <maya/MFnNumericData.h>
class MTypeId;
class MString;
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFnGenericAttribute)
/// Generic attribute function set
/**
Function set for generic attributes of a dependency node
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnGenericAttribute : public MFnAttribute
{
declareMFn(MFnGenericAttribute, MFnAttribute);
public:
///
MObject create( const MString& full,
const MString& brief,
MStatus* ReturnStatus = NULL );
///
MStatus addAccept( MFnData::Type newType );
///
MStatus addAccept( MFnNumericData::Type newType );
///
MStatus addAccept( const MTypeId& id );
///
MStatus removeAccept( MFnData::Type oldType );
///
MStatus removeAccept( MFnNumericData::Type oldType );
///
MStatus removeAccept( const MTypeId& id );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnGenericAttribute */

View File

@ -0,0 +1,139 @@
#ifndef _MFnGeometryData
#define _MFnGeometryData
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnGeometryData
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnGeometryData)
//
// 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.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnData.h>
// *****************************************************************************
// DECLARATIONS
class MMatrix;
// *****************************************************************************
// CLASS DECLARATION (MFnGeometryData)
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
///
/**
*/
class OPENMAYA_EXPORT MFnGeometryData : public MFnData
{
declareMFn( MFnGeometryData, MFnData );
public:
///
MStatus setMatrix( const MMatrix & );
///
MStatus getMatrix ( MMatrix & ) const;
///
bool matrixIsIdentity( MStatus * ReturnStatus = NULL ) const;
///
bool matrixIsNotIdentity( MStatus * ReturnStatus = NULL ) const;
// methods to add/remove object groups
//
///
bool hasObjectGroup( unsigned id,
MStatus* ReturnStatus = NULL ) const;
///
MStatus addObjectGroup( unsigned );
///
MStatus removeObjectGroup( unsigned );
///
MStatus changeObjectGroupId( unsigned , unsigned );
// methods to get the i'th object group
//
///
unsigned objectGroupCount( MStatus * ReturnStatus = NULL ) const;
///
unsigned objectGroup( unsigned index,
MStatus* ReturnStatus = NULL ) const;
// method to get the type of component stored by an object group
//
///
MFn::Type objectGroupType( unsigned,
MStatus* ReturnStatus = NULL ) const;
// methods to access and edit members of object group
//
///
MObject objectGroupComponent( unsigned,
MStatus* ReturnStatus = NULL ) const;
///
MStatus setObjectGroupComponent( unsigned, MObject & );
///
MStatus addObjectGroupComponent( unsigned, MObject & );
///
MStatus removeObjectGroupComponent( unsigned, MObject & );
// Method to copy object groups from the geometry data sent in.
//
///
MStatus copyObjectGroups( MObject & inGeom );
protected:
// No protected members
private:
// No Private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnGeometryData */

View File

@ -0,0 +1,113 @@
#ifndef _MFnGeometryFilter
#define _MFnGeometryFilter
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnGeometryFilter
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnGeometryFilter)
//
// MFnGeometryFilter is the function set for geometry filters (deformers)
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDependencyNode.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
class MObject;
class MDagPath;
class MIntArray;
class MFloatArray;
class MObjectArray;
class MSelectionList;
class MString;
// *****************************************************************************
// CLASS DECLARATION (MFnGeometryFilter)
/// geometry filter function set (OpenMayaAnim)
/**
MFnGeometryFilter is the function set for deformers.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MFnGeometryFilter : public MFnDependencyNode
{
declareMFn(MFnGeometryFilter, MFnDependencyNode);
public:
///
MStatus getInputGeometry(MObjectArray &objects) const;
///
MStatus getOutputGeometry(MObjectArray &objects) const;
///
MObject inputShapeAtIndex(unsigned index,
MStatus *ReturnStatus = NULL) const;
///
MObject outputShapeAtIndex(unsigned index,
MStatus *ReturnStatus = NULL) const;
///
unsigned indexForOutputShape(const MObject &shape,
MStatus *ReturnStatus = NULL) const;
///
MStatus getPathAtIndex(unsigned index,
MDagPath &path) const;
///
unsigned indexForGroupId(unsigned groupId,
MStatus *ReturnStatus = NULL) const;
///
unsigned groupIdAtIndex(unsigned index,
MStatus *ReturnStatus = NULL) const;
///
unsigned numOutputConnections(MStatus *ReturnStatus = NULL) const;
///
unsigned indexForOutputConnection(unsigned connectionIndex,
MStatus *ReturnStatus = NULL) const;
///
MObject deformerSet(MStatus *ReturnStatus = NULL) const;
///
float envelope(MStatus *ReturnStatus = NULL) const;
///
MStatus setEnvelope(float envelope);
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnGeometryFilter */

View File

@ -0,0 +1,80 @@
#ifndef _MFnGravityField
#define _MFnGravityField
//
// *****************************************************************************
//
// Copyright (C) 1998-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnGravityField
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnGravityField)
//
// Function set for Gravity Fields
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnField.h>
#include <maya/MVector.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFnGravityField)
/// Function set for Gravity Fields (OpenMayaFX)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAFX_EXPORT MFnGravityField : public MFnField
{
declareDagMFn(MFnGravityField, MFnField);
public:
///
MVector direction ( MStatus *ReturnStatus = NULL ) const;
///
MStatus setDirection ( const MVector & gravityDirection );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnGravityField */

View File

@ -0,0 +1,78 @@
#ifndef _MFnIkEffector
#define _MFnIkEffector
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnIkEffector
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnIkEffector)
//
//
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnTransform.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFnIkEffector)
/// Inverse kinematics end effector function set (OpenMayaAnim)
/**
Function set for inverse kinematics end effectors
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MFnIkEffector : public MFnTransform
{
declareDagMFn( MFnIkEffector, MFn::kEffector );
public:
///
MObject create( MObject parent = MObject::kNullObj,
MStatus * ReturnStatus = NULL );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnIkEffector */

View File

@ -0,0 +1,125 @@
#ifndef _MFnIkHandle
#define _MFnIkHandle
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnIkHandle
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnIkHandle)
//
// This is the function set for inverse kinematics (IK) handles.
// An ik handle specifies the joints in a skeleton that are effected
// by an attached ik solver.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnTransform.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
class MObjectArray;
// *****************************************************************************
// CLASS DECLARATION (MFnIkHandle)
/// Function set for inverse kinematics (IK) handles (OpenMayaAnim)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MFnIkHandle : public MFnTransform
{
declareDagMFn( MFnIkHandle, MFn::kHandle );
public:
///
enum Stickiness {
///
kStickyOff,
///
kStickyOn,
///
kSuperSticky
};
///
MObject create( MDagPath& startJoint,
MDagPath& effector,
MStatus * ReturnStatus = NULL );
///
MStatus getStartJoint( MDagPath &jointPath );
///
MStatus setStartJoint( const MDagPath &jointPath );
///
MStatus getEffector( MDagPath &effectorPath );
///
MStatus setEffector( const MDagPath &effectorPath );
///
MStatus setStartJointAndEffector( const MDagPath &jointPath,
const MDagPath &effectorPath );
///
unsigned priority( MStatus * ReturnStatus = NULL );
///
MStatus setPriority( unsigned priority );
///
Stickiness stickiness( MStatus * ReturnStatus = NULL );
///
MStatus setStickiness( Stickiness stickiness );
///
double weight( MStatus * ReturnStatus = NULL );
///
MStatus setWeight( double weight );
///
double poWeight( MStatus * ReturnStatus = NULL );
///
MStatus setPOWeight( double weight );
///
MObject solver( MStatus * ReturnStatus = NULL );
///
MStatus setSolver( const MObject &solver );
///
MStatus setSolver( const MString & solverName );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnIkHandle */

View File

@ -0,0 +1,181 @@
#ifndef _MFnIkJoint
#define _MFnIkJoint
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnIkJoint
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnIkJoint)
//
// This is the function set for joints.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnTransform.h>
#include <maya/MTransformationMatrix.h>
#include <maya/MObject.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFnIkJoint)
/// Function set for joints (OpenMayaAnim)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MFnIkJoint : public MFnTransform
{
declareDagMFn( MFnIkJoint, MFn::kJoint );
public:
///
enum Axis {
///
kXAxis,
///
kYAxis,
///
kZAxis,
///
kNone };
///
MObject create( MObject parent = MObject::kNullObj,
MStatus * ReturnStatus = NULL );
///
MStatus getOrientation( MQuaternion &quaternion ) const;
///
MStatus setOrientation( const MQuaternion &quaternion );
///
MStatus getOrientation( MEulerRotation &rotation ) const;
///
MStatus setOrientation( const MEulerRotation &rotation );
///
MStatus getOrientation( double rotation[3],
MTransformationMatrix::RotationOrder &order )
const;
///
MStatus setOrientation( const double rotation[3],
MTransformationMatrix::RotationOrder order );
///
MStatus getScaleOrientation( MQuaternion &quaternion ) const;
///
MStatus setScaleOrientation( const MQuaternion &quaternion );
///
MStatus getScaleOrientation( double rotation[3],
MTransformationMatrix::RotationOrder &order )
const;
///
MStatus setScaleOrientation( const double rotation[3],
MTransformationMatrix::RotationOrder order );
///
MStatus getSegmentScale( double scale[3] ) const;
///
MStatus setSegmentScale( const double scale[3] );
///
MStatus getStiffness( double stiffness[3] ) const;
///
MStatus setStiffness( const double stiffness[3] );
///
MStatus getPreferedAngle( double rotation[3] ) const;
///
MStatus setPreferedAngle( const double rotation[3] );
///
MStatus getDegreesOfFreedom( bool &freeInX, bool &freeInY,
bool &freeInZ ) const;
///
MStatus setDegreesOfFreedom( bool freeInX, bool freeInY,
bool freeInZ );
///
double minRotateDampXRange( MStatus * ReturnStatus = NULL ) const;
///
double minRotateDampYRange( MStatus * ReturnStatus = NULL ) const;
///
double minRotateDampZRange( MStatus * ReturnStatus = NULL ) const;
///
double maxRotateDampXRange( MStatus * ReturnStatus = NULL ) const;
///
double maxRotateDampYRange( MStatus * ReturnStatus = NULL ) const;
///
double maxRotateDampZRange( MStatus * ReturnStatus = NULL ) const;
///
MStatus setMinRotateDampXRange( double angle );
///
MStatus setMinRotateDampYRange( double angle );
///
MStatus setMinRotateDampZRange( double angle );
///
MStatus setMaxRotateDampXRange( double angle );
///
MStatus setMaxRotateDampYRange( double angle );
///
MStatus setMaxRotateDampZRange( double angle );
///
double minRotateDampXStrength( MStatus * ReturnStatus = NULL ) const;
///
double minRotateDampYStrength( MStatus * ReturnStatus = NULL ) const;
///
double minRotateDampZStrength( MStatus * ReturnStatus = NULL ) const;
///
double maxRotateDampXStrength( MStatus * ReturnStatus = NULL ) const;
///
double maxRotateDampYStrength( MStatus * ReturnStatus = NULL ) const;
///
double maxRotateDampZStrength( MStatus * ReturnStatus = NULL ) const;
///
MStatus setMinRotateDampXStrength( double angle );
///
MStatus setMinRotateDampYStrength( double angle );
///
MStatus setMinRotateDampZStrength( double angle );
///
MStatus setMaxRotateDampXStrength( double angle );
///
MStatus setMaxRotateDampYStrength( double angle );
///
MStatus setMaxRotateDampZStrength( double angle );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnIkJoint */

View File

@ -0,0 +1,85 @@
#ifndef _MFnIkSolver
#define _MFnIkSolver
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnIkSolver
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnIkSolver)
//
// This is the function set for inverse kinematics (IK) solvers.
// This function set is used for setting and querying attached
// ik solvers.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnDependencyNode.h>
#include <maya/MFnTransform.h>
// *****************************************************************************
// DECLARATIONS
// *****************************************************************************
// CLASS DECLARATION (MFnIkSolver)
/// Function set for inverse kinematics (IK) solvers (OpenMayaAnim)
/**
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYAANIM_EXPORT MFnIkSolver : public MFnDependencyNode
{
declareMFn( MFnIkSolver, MFn::kIkSolver );
public:
///
unsigned maxIterations( MStatus * ReturnStatus = NULL );
///
MStatus setMaxIterations( unsigned maxIters );
///
double tolerance( MStatus * ReturnStatus = NULL );
///
MStatus setTolerance( double tolerance );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnIkSolver */

View File

@ -0,0 +1,101 @@
#ifndef _MFnIntArrayData
#define _MFnIntArrayData
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnIntArrayData
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnIntArrayData)
//
// MFnIntArrayData allows the creation and manipulation of MIntArray data
// objects for use in the dependency graph.
//
// If a user written dependency node either accepts or produces MIntArrays,
// then this class is used to extract or create the data that comes from or
// goes to other dependency graph nodes. The MDataHandle::type method will
// return kIntArray when data of this type is present. To access it, the
// MDataHandle::data method is used to get an MObject for the data and this
// should then be used to initialize an instance of MFnIntArrayData.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MFnData.h>
// *****************************************************************************
// DECLARATIONS
class MIntArray;
// *****************************************************************************
// CLASS DECLARATION (MFnIntArrayData)
/// int array function set for dependency node data
/**
Create and manipulate MIntArray dependency node data.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnIntArrayData : public MFnData
{
declareMFn(MFnIntArrayData, MFnData);
public:
///
unsigned length( MStatus* ReturnStatus = NULL ) const;
///
int operator[]( unsigned index ) const;
///
int& operator[]( unsigned index );
///
MStatus copyTo( MIntArray& ) const;
///
MStatus set( const MIntArray& newArray );
///
MIntArray array( MStatus*ReturnStatus=NULL );
///
MObject create( MStatus*ReturnStatus=NULL );
///
MObject create( const MIntArray& in, MStatus*ReturnStatus=NULL );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnIntArrayData */

View File

@ -0,0 +1,127 @@
#ifndef _MFnLambertShader
#define _MFnLambertShader
//
// *****************************************************************************
//
// Copyright (C) 1997-2003 Alias|Wavefront Inc.
//
// These coded instructions, statements and computer programs contain
// unpublished information proprietary to Alias|Wavefront Inc. and are
// protected by Canadian and US federal copyright laws. They may not be
// disclosed to third parties or copied or duplicated, in whole or in part,
// without prior written consent of Alias|Wavefront Inc.
//
// Unpublished-rights reserved under the Copyright Laws of the United States.
//
// *****************************************************************************
//
// CLASS: MFnLambertShader
//
// *****************************************************************************
//
// CLASS DESCRIPTION (MFnLambertShader)
//
// MFnLambertShader facilitates creation and manipulation of dependency graph
// nodes representing lambertian shaders.
//
// *****************************************************************************
#if defined __cplusplus
// *****************************************************************************
// INCLUDED HEADER FILES
#include <maya/MObject.h>
#include <maya/MStatus.h>
#include <maya/MFnDependencyNode.h>
// *****************************************************************************
// DECLARATIONS
class MFnDependencyNode;
class MFltVector;
class MColor;
// *****************************************************************************
// CLASS DECLARATION (MFnLambertShader)
/// Manage Lambert shaders
/**
Facilitate the creation and manipulation of Lambert shaders.
*/
#ifdef _WIN32
#pragma warning(disable: 4522)
#endif // _WIN32
class OPENMAYA_EXPORT MFnLambertShader : public MFnDependencyNode
{
declareMFn( MFnLambertShader, MFnDependencyNode );
public:
///
MObject create( bool UIvisible = true, MStatus * ReturnStatus = NULL );
///
short refractedRayDepthLimit( MStatus * ReturnStatus = NULL ) const;
///
MStatus setRefractedRayDepthLimit( const short& new_limit );
///
float refractiveIndex( MStatus * ReturnStatus = NULL ) const;
///
MStatus setRefractiveIndex( const float& refractive_index );
///
bool rtRefractedColor( MStatus * ReturnStatus = NULL ) const;
///
MStatus setRtRefractedColor( const bool& rt_refracted_color );
///
float diffuseCoeff( MStatus * ReturnStatus = NULL ) const;
///
MStatus setDiffuseCoeff( const float& diffuse_coeff );
///
MColor color( MStatus * ReturnStatus = NULL ) const;
///
MStatus setColor( const MColor & col );
///
MColor transparency( MStatus * ReturnStatus = NULL ) const;
///
MStatus setTransparency( const MColor & transp );
///
MColor ambientColor( MStatus * ReturnStatus = NULL ) const;
///
MStatus setAmbientColor( const MColor & ambient_color );
///
MColor incandescence( MStatus * ReturnStatus = NULL ) const;
///
MStatus setIncandescence( const MColor & incand );
///
float translucenceCoeff( MStatus * ReturnStatus = NULL ) const;
///
MStatus setTranslucenceCoeff( const float& translucence_coeff );
///
float glowIntensity( MStatus * ReturnStatus = NULL ) const;
///
MStatus setGlowIntensity( const float& glow_intensity );
///
bool hideSource( MStatus * ReturnStatus = NULL ) const;
///
MStatus setHideSource( const bool& hide_source );
protected:
// No protected members
private:
// No private members
};
#ifdef _WIN32
#pragma warning(default: 4522)
#endif // _WIN32
// *****************************************************************************
#endif /* __cplusplus */
#endif /* _MFnLambertShader */

Some files were not shown because too many files have changed in this diff Show More