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_TEXTUREBAKESET_H__
11
#define __MayaDM_TEXTUREBAKESET_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMBakeSet.h"
17
class TextureBakeSet : public BakeSet
22
TextureBakeSet():BakeSet(){}
23
TextureBakeSet(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:BakeSet(file, name, parent, "textureBakeSet", shared, create){}
25
virtual ~TextureBakeSet(){}
27
void setSeparation(unsigned int sep)
30
fprintf(mFile,"\tsetAttr \".sep\" %i;\n", sep);
32
void setXResolution(int xres)
34
if(xres == 512) return;
35
fprintf(mFile,"\tsetAttr \".xres\" %i;\n", xres);
37
void setYResolution(int yres)
39
if(yres == 512) return;
40
fprintf(mFile,"\tsetAttr \".yres\" %i;\n", yres);
42
void setFileFormat(unsigned int format)
44
if(format == 0) return;
45
fprintf(mFile,"\tsetAttr \".format\" %i;\n", format);
47
void setBitsPerChannel(unsigned int bits)
50
fprintf(mFile,"\tsetAttr \".bits\" %i;\n", bits);
52
void setOverrideUvSet(bool overrideuv)
54
if(overrideuv == 0) return;
55
fprintf(mFile,"\tsetAttr \".overrideuv\" %i;\n", overrideuv);
57
void setUvSetName(const string& set)
59
if(set == "uvSet1") return;
60
fprintf(mFile,"\tsetAttr \".set\" -type \"string\" ");
64
void setUvRange(unsigned int range)
66
if(range == 0) return;
67
fprintf(mFile,"\tsetAttr \".range\" %i;\n", range);
69
void setUMin(float ul)
72
fprintf(mFile,"\tsetAttr \".ul\" %f;\n", ul);
74
void setUMax(float uh)
77
fprintf(mFile,"\tsetAttr \".uh\" %f;\n", uh);
79
void setVMin(float vl)
82
fprintf(mFile,"\tsetAttr \".vl\" %f;\n", vl);
84
void setVMax(float vh)
87
fprintf(mFile,"\tsetAttr \".vh\" %f;\n", vh);
89
void setBackgroundMode(unsigned int bmode)
91
if(bmode == 0) return;
92
fprintf(mFile,"\tsetAttr \".bmode\" %i;\n", bmode);
94
void setBackgroundColor(const float3& bgc)
96
if(bgc == float3(0.0f,0.0f,0.0f)) return;
97
fprintf(mFile,"\tsetAttr \".bgc\" -type \"float3\" ");
101
void setBackgroundColorR(float bgr)
103
if(bgr == 0.0) return;
104
fprintf(mFile,"\tsetAttr \".bgc.bgr\" %f;\n", bgr);
106
void setBackgroundColorG(float bgg)
108
if(bgg == 0.0) return;
109
fprintf(mFile,"\tsetAttr \".bgc.bgg\" %f;\n", bgg);
111
void setBackgroundColorB(float bgb)
113
if(bgb == 0.0) return;
114
fprintf(mFile,"\tsetAttr \".bgc.bgb\" %f;\n", bgb);
116
void setFillTextureSeams(float fillseams)
118
if(fillseams == 1.0) return;
119
fprintf(mFile,"\tsetAttr \".fillseams\" %f;\n", fillseams);
121
void setFinalGatherQuality(float fgq)
124
fprintf(mFile,"\tsetAttr \".fgq\" %f;\n", fgq);
126
void setFinalGatherReflect(float fgr)
129
fprintf(mFile,"\tsetAttr \".fgr\" %f;\n", fgr);
131
void setBakeToOneMap(bool one)
134
fprintf(mFile,"\tsetAttr \".one\" %i;\n", one);
136
void setSamples(int nsp)
139
fprintf(mFile,"\tsetAttr \".nsp\" %i;\n", nsp);
141
void getSeparation()const
143
fprintf(mFile,"\"%s.sep\"",mName.c_str());
145
void getPrefix()const
147
fprintf(mFile,"\"%s.pre\"",mName.c_str());
149
void getXResolution()const
151
fprintf(mFile,"\"%s.xres\"",mName.c_str());
153
void getYResolution()const
155
fprintf(mFile,"\"%s.yres\"",mName.c_str());
157
void getFileFormat()const
159
fprintf(mFile,"\"%s.format\"",mName.c_str());
161
void getBitsPerChannel()const
163
fprintf(mFile,"\"%s.bits\"",mName.c_str());
165
void getOverrideUvSet()const
167
fprintf(mFile,"\"%s.overrideuv\"",mName.c_str());
169
void getUvSetName()const
171
fprintf(mFile,"\"%s.set\"",mName.c_str());
173
void getUvRange()const
175
fprintf(mFile,"\"%s.range\"",mName.c_str());
179
fprintf(mFile,"\"%s.ul\"",mName.c_str());
183
fprintf(mFile,"\"%s.uh\"",mName.c_str());
187
fprintf(mFile,"\"%s.vl\"",mName.c_str());
191
fprintf(mFile,"\"%s.vh\"",mName.c_str());
193
void getBackgroundMode()const
195
fprintf(mFile,"\"%s.bmode\"",mName.c_str());
197
void getBackgroundColor()const
199
fprintf(mFile,"\"%s.bgc\"",mName.c_str());
201
void getBackgroundColorR()const
203
fprintf(mFile,"\"%s.bgc.bgr\"",mName.c_str());
205
void getBackgroundColorG()const
207
fprintf(mFile,"\"%s.bgc.bgg\"",mName.c_str());
209
void getBackgroundColorB()const
211
fprintf(mFile,"\"%s.bgc.bgb\"",mName.c_str());
213
void getFillTextureSeams()const
215
fprintf(mFile,"\"%s.fillseams\"",mName.c_str());
217
void getFillScale()const
219
fprintf(mFile,"\"%s.fillscale\"",mName.c_str());
221
void getFinalGatherQuality()const
223
fprintf(mFile,"\"%s.fgq\"",mName.c_str());
225
void getFinalGatherReflect()const
227
fprintf(mFile,"\"%s.fgr\"",mName.c_str());
229
void getBakeToOneMap()const
231
fprintf(mFile,"\"%s.one\"",mName.c_str());
233
void getSamples()const
235
fprintf(mFile,"\"%s.nsp\"",mName.c_str());
238
TextureBakeSet(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
239
:BakeSet(file, name, parent, nodeType, shared, create) {}
243
#endif//__MayaDM_TEXTUREBAKESET_H__