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_POLYSMOOTHFACE_H__
11
#define __MayaDM_POLYSMOOTHFACE_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMPolyModifier.h"
17
class PolySmoothFace : public PolyModifier
22
PolySmoothFace():PolyModifier(){}
23
PolySmoothFace(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:PolyModifier(file, name, parent, "polySmoothFace", shared, create){}
25
virtual ~PolySmoothFace(){}
27
void setMethod(unsigned int mth)
30
fprintf(mFile,"\tsetAttr \".mth\" %i;\n", mth);
32
void setContinuity(float c)
35
fprintf(mFile,"\tsetAttr \".c\" %f;\n", c);
37
void setDivisions(short dv)
40
fprintf(mFile,"\tsetAttr \".dv\" %i;\n", dv);
42
void setSmoothUVs(bool suv)
44
if(suv == false) return;
45
fprintf(mFile,"\tsetAttr \".suv\" %i;\n", suv);
47
void setKeepBorder(bool kb)
49
if(kb == true) return;
50
fprintf(mFile,"\tsetAttr \".kb\" %i;\n", kb);
52
void setKeepSelectionBorder(bool ksb)
54
if(ksb == true) return;
55
fprintf(mFile,"\tsetAttr \".ksb\" %i;\n", ksb);
57
void setKeepHardEdge(bool khe)
59
if(khe == false) return;
60
fprintf(mFile,"\tsetAttr \".khe\" %i;\n", khe);
62
void setPropagateEdgeHardness(bool peh)
64
if(peh == false) return;
65
fprintf(mFile,"\tsetAttr \".peh\" %i;\n", peh);
67
void setKeepMapBorders(unsigned int kmb)
70
fprintf(mFile,"\tsetAttr \".kmb\" %i;\n", kmb);
72
void setKeepTessellation(bool kt)
74
if(kt == true) return;
75
fprintf(mFile,"\tsetAttr \".kt\" %i;\n", kt);
77
void setSubdivisionLevels(int sl)
80
fprintf(mFile,"\tsetAttr \".sl\" %i;\n", sl);
82
void setDivisionsPerEdge(int dpe)
85
fprintf(mFile,"\tsetAttr \".dpe\" %i;\n", dpe);
87
void setDegree(int deg)
90
fprintf(mFile,"\tsetAttr \".deg\" %i;\n", deg);
92
void setPushStrength(float ps)
95
fprintf(mFile,"\tsetAttr \".ps\" %f;\n", ps);
97
void setRoundness(float ro)
100
fprintf(mFile,"\tsetAttr \".ro\" %f;\n", ro);
102
void setMaya65Above(bool ma)
104
if(ma == false) return;
105
fprintf(mFile,"\tsetAttr \".ma\" %i;\n", ma);
107
void setMaya2008Above(bool m08)
109
if(m08 == false) return;
110
fprintf(mFile,"\tsetAttr \".m08\" %i;\n", m08);
112
void getMethod()const
114
fprintf(mFile,"\"%s.mth\"",mName.c_str());
116
void getContinuity()const
118
fprintf(mFile,"\"%s.c\"",mName.c_str());
120
void getDivisions()const
122
fprintf(mFile,"\"%s.dv\"",mName.c_str());
124
void getSmoothUVs()const
126
fprintf(mFile,"\"%s.suv\"",mName.c_str());
128
void getKeepBorder()const
130
fprintf(mFile,"\"%s.kb\"",mName.c_str());
132
void getKeepSelectionBorder()const
134
fprintf(mFile,"\"%s.ksb\"",mName.c_str());
136
void getKeepHardEdge()const
138
fprintf(mFile,"\"%s.khe\"",mName.c_str());
140
void getPropagateEdgeHardness()const
142
fprintf(mFile,"\"%s.peh\"",mName.c_str());
144
void getKeepMapBorders()const
146
fprintf(mFile,"\"%s.kmb\"",mName.c_str());
148
void getKeepTessellation()const
150
fprintf(mFile,"\"%s.kt\"",mName.c_str());
152
void getSubdivisionLevels()const
154
fprintf(mFile,"\"%s.sl\"",mName.c_str());
156
void getDivisionsPerEdge()const
158
fprintf(mFile,"\"%s.dpe\"",mName.c_str());
160
void getDegree()const
162
fprintf(mFile,"\"%s.deg\"",mName.c_str());
164
void getPushStrength()const
166
fprintf(mFile,"\"%s.ps\"",mName.c_str());
168
void getRoundness()const
170
fprintf(mFile,"\"%s.ro\"",mName.c_str());
172
void getMaya65Above()const
174
fprintf(mFile,"\"%s.ma\"",mName.c_str());
176
void getMaya2008Above()const
178
fprintf(mFile,"\"%s.m08\"",mName.c_str());
181
PolySmoothFace(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
182
:PolyModifier(file, name, parent, nodeType, shared, create) {}
186
#endif//__MayaDM_POLYSMOOTHFACE_H__