Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

pandatool/src/maya/maya_funcs.h

Go to the documentation of this file.
00001 // Filename: maya_funcs.h
00002 // Created by:  drose (16Feb00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef MAYA_FUNCS_H
00020 #define MAYA_FUNCS_H
00021 
00022 #include "pandatoolbase.h"
00023 #include "luse.h"
00024 #include "config_maya.h"
00025 
00026 #include "pre_maya_include.h"
00027 #include <maya/MFnAttribute.h>
00028 #include <maya/MPlug.h>
00029 #include <maya/MStatus.h>
00030 #include <maya/MFnDependencyNode.h>
00031 #include <maya/MObject.h>
00032 #include <maya/MString.h>
00033 #include <maya/MVector.h>
00034 #include "post_maya_include.h"
00035 
00036 class MObject;
00037 
00038 bool
00039 get_maya_plug(MObject &node, const string &attribute_name, MPlug &plug);
00040 
00041 template<class ValueType>
00042 bool
00043 get_maya_attribute(MObject &node, const string &attribute_name,
00044                    ValueType &value);
00045 
00046 template<class ValueType>
00047 bool
00048 set_maya_attribute(MObject &node, const string &attribute_name,
00049                    ValueType &value);
00050 
00051 bool
00052 has_attribute(MObject &node, const string &attribute_name);
00053 
00054 bool
00055 get_bool_attribute(MObject &node, const string &attribute_name,
00056                    bool &value);
00057 
00058 bool
00059 get_angle_attribute(MObject &node, const string &attribute_name,
00060                     double &value);
00061 
00062 bool
00063 get_vec2f_attribute(MObject &node, const string &attribute_name,
00064                     LVecBase2f &value);
00065 
00066 bool
00067 get_vec3f_attribute(MObject &node, const string &attribute_name,
00068                     LVecBase3f &value);
00069 
00070 bool
00071 get_vec2d_attribute(MObject &node, const string &attribute_name,
00072                     LVecBase2d &value);
00073 
00074 bool
00075 get_vec3d_attribute(MObject &node, const string &attribute_name,
00076                     LVecBase3d &value);
00077 
00078 bool
00079 get_mat4d_attribute(MObject &node, const string &attribute_name,
00080                     LMatrix4d &value);
00081 
00082 bool
00083 get_enum_attribute(MObject &node, const string &attribute_name,
00084                    string &value);
00085 
00086 bool
00087 get_string_attribute(MObject &node, const string &attribute_name,
00088                      string &value);
00089 
00090 bool
00091 set_string_attribute(MObject &node, const string &attribute_name,
00092                      const string &value);
00093 
00094 void
00095 describe_maya_attribute(MObject &node, const string &attribute_name);
00096 
00097 string
00098 string_mfndata_type(MFnData::Type type);
00099 
00100 void
00101 list_maya_attributes(MObject &node);
00102 
00103 // Also, we must define some output functions for Maya objects, since
00104 // we can't use those built into Maya (which forward-defines the
00105 // ostream type incorrectly).
00106 INLINE ostream &operator << (ostream &out, const MString &str);
00107 INLINE ostream &operator << (ostream &out, const MVector &vec);
00108 
00109 #include "maya_funcs.I"
00110 #include "maya_funcs.T"
00111 
00112 #endif

Generated on Fri May 2 03:21:15 2003 for Panda-Tool by doxygen1.3