Panda3D
 All Classes Functions Variables Enumerations
maya_funcs.h
1 // Filename: maya_funcs.h
2 // Created by: drose (16Feb00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef MAYA_FUNCS_H
16 #define MAYA_FUNCS_H
17 
18 #include "pandatoolbase.h"
19 #include "luse.h"
20 #include "config_maya.h"
21 
22 #include "pre_maya_include.h"
23 #include <maya/MFnAttribute.h>
24 #include <maya/MPlug.h>
25 #include <maya/MStatus.h>
26 #include <maya/MFnDependencyNode.h>
27 #include <maya/MObject.h>
28 #include <maya/MString.h>
29 #include <maya/MVector.h>
30 #include "post_maya_include.h"
31 
32 class MObject;
33 
34 bool
35 get_maya_plug(MObject &node, const string &attribute_name, MPlug &plug);
36 
37 bool
38 is_connected(MObject &node, const string &attribute_name);
39 
40 template<class ValueType>
41 bool
42 get_maya_attribute(MObject &node, const string &attribute_name,
43  ValueType &value);
44 
45 template<class ValueType>
46 bool
47 set_maya_attribute(MObject &node, const string &attribute_name,
48  ValueType &value);
49 
50 bool
51 has_attribute(MObject &node, const string &attribute_name);
52 
53 bool
54 remove_attribute(MObject &node, const string &attribute_name);
55 
56 bool
57 get_bool_attribute(MObject &node, const string &attribute_name,
58  bool &value);
59 
60 bool
61 get_angle_attribute(MObject &node, const string &attribute_name,
62  double &value);
63 
64 bool
65 get_vec2_attribute(MObject &node, const string &attribute_name,
66  LVecBase2 &value);
67 
68 bool
69 get_vec3_attribute(MObject &node, const string &attribute_name,
70  LVecBase3 &value);
71 
72 bool
73 get_vec2d_attribute(MObject &node, const string &attribute_name,
74  LVecBase2d &value);
75 
76 bool
77 get_vec3d_attribute(MObject &node, const string &attribute_name,
78  LVecBase3d &value);
79 
80 bool
81 get_mat4d_attribute(MObject &node, const string &attribute_name,
82  LMatrix4d &value);
83 
84 void
85 get_tag_attribute_names(MObject &node, pvector<string> &tag_names);
86 
87 bool
88 get_enum_attribute(MObject &node, const string &attribute_name,
89  string &value);
90 
91 bool
92 get_string_attribute(MObject &node, const string &attribute_name,
93  string &value);
94 
95 bool
96 set_string_attribute(MObject &node, const string &attribute_name,
97  const string &value);
98 
99 void
100 describe_maya_attribute(MObject &node, const string &attribute_name);
101 
102 bool
103 describe_compound_attribute(MObject &node);
104 
105 string
106 string_mfndata_type(MFnData::Type type);
107 
108 void
109 list_maya_attributes(MObject &node);
110 
111 // Also, we must define some output functions for Maya objects, since
112 // we can't use those built into Maya (which forward-defines the
113 // ostream type incorrectly).
114 INLINE ostream &operator << (ostream &out, const MString &str);
115 INLINE ostream &operator << (ostream &out, const MVector &vec);
116 
117 #include "maya_funcs.I"
118 #include "maya_funcs.T"
119 
120 #endif
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:105
This is a 4-by-4 transform matrix.
Definition: lmatrix.h:4716
This is the base class for all two-component vectors and points.
Definition: lvecBase2.h:1241
This is the base class for all two-component vectors and points.
Definition: lvecBase2.h:105
This is the base class for all three-component vectors and points.
Definition: lvecBase3.h:1455