00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef MAYA_FUNCS_H
00016 #define MAYA_FUNCS_H
00017
00018 #include "pandatoolbase.h"
00019 #include "luse.h"
00020 #include "config_maya.h"
00021
00022 #include "pre_maya_include.h"
00023 #include <maya/MFnAttribute.h>
00024 #include <maya/MPlug.h>
00025 #include <maya/MStatus.h>
00026 #include <maya/MFnDependencyNode.h>
00027 #include <maya/MObject.h>
00028 #include <maya/MString.h>
00029 #include <maya/MVector.h>
00030 #include "post_maya_include.h"
00031
00032 class MObject;
00033
00034 bool
00035 get_maya_plug(MObject &node, const string &attribute_name, MPlug &plug);
00036
00037 bool
00038 is_connected(MObject &node, const string &attribute_name);
00039
00040 template<class ValueType>
00041 bool
00042 get_maya_attribute(MObject &node, const string &attribute_name,
00043 ValueType &value);
00044
00045 template<class ValueType>
00046 bool
00047 set_maya_attribute(MObject &node, const string &attribute_name,
00048 ValueType &value);
00049
00050 bool
00051 has_attribute(MObject &node, const string &attribute_name);
00052
00053 bool
00054 remove_attribute(MObject &node, const string &attribute_name);
00055
00056 bool
00057 get_bool_attribute(MObject &node, const string &attribute_name,
00058 bool &value);
00059
00060 bool
00061 get_angle_attribute(MObject &node, const string &attribute_name,
00062 double &value);
00063
00064 bool
00065 get_vec2_attribute(MObject &node, const string &attribute_name,
00066 LVecBase2 &value);
00067
00068 bool
00069 get_vec3_attribute(MObject &node, const string &attribute_name,
00070 LVecBase3 &value);
00071
00072 bool
00073 get_vec2d_attribute(MObject &node, const string &attribute_name,
00074 LVecBase2d &value);
00075
00076 bool
00077 get_vec3d_attribute(MObject &node, const string &attribute_name,
00078 LVecBase3d &value);
00079
00080 bool
00081 get_mat4d_attribute(MObject &node, const string &attribute_name,
00082 LMatrix4d &value);
00083
00084 void
00085 get_tag_attribute_names(MObject &node, pvector<string> &tag_names);
00086
00087 bool
00088 get_enum_attribute(MObject &node, const string &attribute_name,
00089 string &value);
00090
00091 bool
00092 get_string_attribute(MObject &node, const string &attribute_name,
00093 string &value);
00094
00095 bool
00096 set_string_attribute(MObject &node, const string &attribute_name,
00097 const string &value);
00098
00099 void
00100 describe_maya_attribute(MObject &node, const string &attribute_name);
00101
00102 bool
00103 describe_compound_attribute(MObject &node);
00104
00105 string
00106 string_mfndata_type(MFnData::Type type);
00107
00108 void
00109 list_maya_attributes(MObject &node);
00110
00111
00112
00113
00114 INLINE ostream &operator << (ostream &out, const MString &str);
00115 INLINE ostream &operator << (ostream &out, const MVector &vec);
00116
00117 #include "maya_funcs.I"
00118 #include "maya_funcs.T"
00119
00120 #endif