00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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
00104
00105
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