2
Copyright (c) 2008-2009 NetAllied Systems GmbH
4
This file is part of MayaDataModel.
6
Licensed under the MIT Open Source License,
7
for details please see LICENSE file or the website
8
http://www.opensource.org/licenses/mit-license.php
10
#ifndef __MayaDM_PAIRBLEND_H__
11
#define __MayaDM_PAIRBLEND_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMDependNode.h"
17
class PairBlend : public DependNode
22
PairBlend():DependNode(){}
23
PairBlend(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:DependNode(file, name, parent, "pairBlend", shared, create){}
25
virtual ~PairBlend(){}
27
void setCurrentDriver(unsigned int c)
30
fprintf(mFile,"\tsetAttr \".c\" %i;\n", c);
32
void setInTranslate1(const double3& it1)
34
fprintf(mFile,"\tsetAttr \".it1\" -type \"double3\" ");
38
void setInTranslateX1(double itx1)
41
fprintf(mFile,"\tsetAttr \".it1.itx1\" %f;\n", itx1);
43
void setInTranslateY1(double ity1)
46
fprintf(mFile,"\tsetAttr \".it1.ity1\" %f;\n", ity1);
48
void setInTranslateZ1(double itz1)
51
fprintf(mFile,"\tsetAttr \".it1.itz1\" %f;\n", itz1);
53
void setInRotate1(const double3& ir1)
55
fprintf(mFile,"\tsetAttr \".ir1\" -type \"double3\" ");
59
void setInRotateX1(double irx1)
62
fprintf(mFile,"\tsetAttr \".ir1.irx1\" %f;\n", irx1);
64
void setInRotateY1(double iry1)
67
fprintf(mFile,"\tsetAttr \".ir1.iry1\" %f;\n", iry1);
69
void setInRotateZ1(double irz1)
72
fprintf(mFile,"\tsetAttr \".ir1.irz1\" %f;\n", irz1);
74
void setInTranslate2(const double3& it2)
76
fprintf(mFile,"\tsetAttr \".it2\" -type \"double3\" ");
80
void setInTranslateX2(double itx2)
83
fprintf(mFile,"\tsetAttr \".it2.itx2\" %f;\n", itx2);
85
void setInTranslateY2(double ity2)
88
fprintf(mFile,"\tsetAttr \".it2.ity2\" %f;\n", ity2);
90
void setInTranslateZ2(double itz2)
93
fprintf(mFile,"\tsetAttr \".it2.itz2\" %f;\n", itz2);
95
void setInRotate2(const double3& ir2)
97
fprintf(mFile,"\tsetAttr \".ir2\" -type \"double3\" ");
101
void setInRotateX2(double irx2)
103
if(irx2 == 0) return;
104
fprintf(mFile,"\tsetAttr \".ir2.irx2\" %f;\n", irx2);
106
void setInRotateY2(double iry2)
108
if(iry2 == 0) return;
109
fprintf(mFile,"\tsetAttr \".ir2.iry2\" %f;\n", iry2);
111
void setInRotateZ2(double irz2)
113
if(irz2 == 0) return;
114
fprintf(mFile,"\tsetAttr \".ir2.irz2\" %f;\n", irz2);
116
void setWeight(double w)
119
fprintf(mFile,"\tsetAttr \".w\" %f;\n", w);
121
void setRotateOrder(unsigned int ro)
124
fprintf(mFile,"\tsetAttr \".ro\" %i;\n", ro);
126
void setTranslateXMode(unsigned int txm)
129
fprintf(mFile,"\tsetAttr \".txm\" %i;\n", txm);
131
void setTranslateYMode(unsigned int tym)
134
fprintf(mFile,"\tsetAttr \".tym\" %i;\n", tym);
136
void setTranslateZMode(unsigned int tzm)
139
fprintf(mFile,"\tsetAttr \".tzm\" %i;\n", tzm);
141
void setRotateMode(unsigned int rm)
144
fprintf(mFile,"\tsetAttr \".rm\" %i;\n", rm);
146
void setRotInterpolation(unsigned int ri)
149
fprintf(mFile,"\tsetAttr \".ri\" %i;\n", ri);
151
void getInTranslate1()const
153
fprintf(mFile,"\"%s.it1\"",mName.c_str());
155
void getInTranslateX1()const
157
fprintf(mFile,"\"%s.it1.itx1\"",mName.c_str());
159
void getInTranslateY1()const
161
fprintf(mFile,"\"%s.it1.ity1\"",mName.c_str());
163
void getInTranslateZ1()const
165
fprintf(mFile,"\"%s.it1.itz1\"",mName.c_str());
167
void getInRotate1()const
169
fprintf(mFile,"\"%s.ir1\"",mName.c_str());
171
void getInRotateX1()const
173
fprintf(mFile,"\"%s.ir1.irx1\"",mName.c_str());
175
void getInRotateY1()const
177
fprintf(mFile,"\"%s.ir1.iry1\"",mName.c_str());
179
void getInRotateZ1()const
181
fprintf(mFile,"\"%s.ir1.irz1\"",mName.c_str());
183
void getInTranslate2()const
185
fprintf(mFile,"\"%s.it2\"",mName.c_str());
187
void getInTranslateX2()const
189
fprintf(mFile,"\"%s.it2.itx2\"",mName.c_str());
191
void getInTranslateY2()const
193
fprintf(mFile,"\"%s.it2.ity2\"",mName.c_str());
195
void getInTranslateZ2()const
197
fprintf(mFile,"\"%s.it2.itz2\"",mName.c_str());
199
void getInRotate2()const
201
fprintf(mFile,"\"%s.ir2\"",mName.c_str());
203
void getInRotateX2()const
205
fprintf(mFile,"\"%s.ir2.irx2\"",mName.c_str());
207
void getInRotateY2()const
209
fprintf(mFile,"\"%s.ir2.iry2\"",mName.c_str());
211
void getInRotateZ2()const
213
fprintf(mFile,"\"%s.ir2.irz2\"",mName.c_str());
215
void getWeight()const
217
fprintf(mFile,"\"%s.w\"",mName.c_str());
219
void getRotateOrder()const
221
fprintf(mFile,"\"%s.ro\"",mName.c_str());
223
void getOutTranslate()const
225
fprintf(mFile,"\"%s.ot\"",mName.c_str());
227
void getOutTranslateX()const
229
fprintf(mFile,"\"%s.ot.otx\"",mName.c_str());
231
void getOutTranslateY()const
233
fprintf(mFile,"\"%s.ot.oty\"",mName.c_str());
235
void getOutTranslateZ()const
237
fprintf(mFile,"\"%s.ot.otz\"",mName.c_str());
239
void getOutRotate()const
241
fprintf(mFile,"\"%s.or\"",mName.c_str());
243
void getOutRotateX()const
245
fprintf(mFile,"\"%s.or.orx\"",mName.c_str());
247
void getOutRotateY()const
249
fprintf(mFile,"\"%s.or.ory\"",mName.c_str());
251
void getOutRotateZ()const
253
fprintf(mFile,"\"%s.or.orz\"",mName.c_str());
256
PairBlend(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
257
:DependNode(file, name, parent, nodeType, shared, create) {}
261
#endif//__MayaDM_PAIRBLEND_H__