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_RENDERGLOBALS_H__
11
#define __MayaDM_RENDERGLOBALS_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMDependNode.h"
17
class RenderGlobals : public DependNode
22
RenderGlobals():DependNode(){}
23
RenderGlobals(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24
:DependNode(file, name, parent, "renderGlobals", shared, create){}
25
virtual ~RenderGlobals(){}
27
void setMacCodec(int macc)
29
if(macc == 1919706400) return;
30
fprintf(mFile,"\tsetAttr \".macc\" %i;\n", macc);
32
void setMacDepth(int macd)
34
if(macd == 32) return;
35
fprintf(mFile,"\tsetAttr \".macd\" %i;\n", macd);
37
void setMacQual(int macq)
39
if(macq == 1024) return;
40
fprintf(mFile,"\tsetAttr \".macq\" %i;\n", macq);
42
void setComFrrt(int mcfr)
44
if(mcfr == 24) return;
45
fprintf(mFile,"\tsetAttr \".mcfr\" %i;\n", mcfr);
47
void setIgnoreFilmGate(bool ifg)
49
if(ifg == true) return;
50
fprintf(mFile,"\tsetAttr \".ifg\" %i;\n", ifg);
52
void setClipFinalShadedColor(bool clip)
54
if(clip == true) return;
55
fprintf(mFile,"\tsetAttr \".clip\" %i;\n", clip);
57
void setEnableDepthMaps(bool edm)
59
if(edm == true) return;
60
fprintf(mFile,"\tsetAttr \".edm\" %i;\n", edm);
62
void setEnableDefaultLight(bool edl)
64
if(edl == true) return;
65
fprintf(mFile,"\tsetAttr \".edl\" %i;\n", edl);
67
void setCurrentRenderer(const string& ren)
69
if(ren == "mayaSoftware") return;
70
fprintf(mFile,"\tsetAttr \".ren\" -type \"string\" ");
74
void setEnableStrokeRender(bool esr)
76
if(esr == true) return;
77
fprintf(mFile,"\tsetAttr \".esr\" %i;\n", esr);
79
void setOnlyRenderStrokes(bool ors)
81
if(ors == false) return;
82
fprintf(mFile,"\tsetAttr \".ors\" %i;\n", ors);
84
void setStrokesDepthFile(const string& sdf)
86
if(sdf == "NULL") return;
87
fprintf(mFile,"\tsetAttr \".sdf\" -type \"string\" ");
91
void setImageFormat(unsigned int outf)
94
fprintf(mFile,"\tsetAttr \".outf\" %i;\n", outf);
96
void setImfPluginKey(const string& imfkey)
98
if(imfkey == "") return;
99
fprintf(mFile,"\tsetAttr \".imfkey\" -type \"string\" ");
101
fprintf(mFile,";\n");
103
void setGammaCorrection(float gama)
105
if(gama == 1.0) return;
106
fprintf(mFile,"\tsetAttr \".gama\" %f;\n", gama);
108
void setAnimation(bool an)
110
if(an == false) return;
111
fprintf(mFile,"\tsetAttr \".an\" %i;\n", an);
113
void setAnimationRange(unsigned int ar)
116
fprintf(mFile,"\tsetAttr \".ar\" %i;\n", ar);
118
void setStartFrame(double fs)
121
fprintf(mFile,"\tsetAttr \".fs\" %f;\n", fs);
123
void setEndFrame(double ef)
126
fprintf(mFile,"\tsetAttr \".ef\" %f;\n", ef);
128
void setByFrameStep(float bfs)
130
if(bfs == 1.0) return;
131
fprintf(mFile,"\tsetAttr \".bfs\" %f;\n", bfs);
133
void setModifyExtension(bool me)
135
if(me == false) return;
136
fprintf(mFile,"\tsetAttr \".me\" %i;\n", me);
138
void setStartExtension(float se)
140
if(se == 1.0) return;
141
fprintf(mFile,"\tsetAttr \".se\" %f;\n", se);
143
void setByExtension(float be)
145
if(be == 1.0) return;
146
fprintf(mFile,"\tsetAttr \".be\" %f;\n", be);
148
void setExtensionPadding(int ep)
151
fprintf(mFile,"\tsetAttr \".ep\" %i;\n", ep);
153
void setFieldExtControl(unsigned int fec)
156
fprintf(mFile,"\tsetAttr \".fec\" %i;\n", fec);
158
void setOutFormatControl(unsigned int ofc)
161
fprintf(mFile,"\tsetAttr \".ofc\" %i;\n", ofc);
163
void setOddFieldExt(const string& ofe)
165
if(ofe == "NULL") return;
166
fprintf(mFile,"\tsetAttr \".ofe\" -type \"string\" ");
168
fprintf(mFile,";\n");
170
void setEvenFieldExt(const string& efe)
172
if(efe == "NULL") return;
173
fprintf(mFile,"\tsetAttr \".efe\" -type \"string\" ");
175
fprintf(mFile,";\n");
177
void setOutFormatExt(const string& oft)
179
if(oft == "NULL") return;
180
fprintf(mFile,"\tsetAttr \".oft\" -type \"string\" ");
182
fprintf(mFile,";\n");
184
void setUseMayaFileName(bool umfn)
186
if(umfn == true) return;
187
fprintf(mFile,"\tsetAttr \".umfn\" %i;\n", umfn);
189
void setUseFrameExt(bool ufe)
191
if(ufe == false) return;
192
fprintf(mFile,"\tsetAttr \".ufe\" %i;\n", ufe);
194
void setPutFrameBeforeExt(bool pff)
196
if(pff == false) return;
197
fprintf(mFile,"\tsetAttr \".pff\" %i;\n", pff);
199
void setPeriodInExt(unsigned int peie)
201
if(peie == 1) return;
202
fprintf(mFile,"\tsetAttr \".peie\" %i;\n", peie);
204
void setImageFilePrefix(const string& ifp)
206
if(ifp == "NULL") return;
207
fprintf(mFile,"\tsetAttr \".ifp\" -type \"string\" ");
209
fprintf(mFile,";\n");
211
void setRenderVersion(const string& rv)
213
if(rv == "NULL") return;
214
fprintf(mFile,"\tsetAttr \".rv\" -type \"string\" ");
216
fprintf(mFile,";\n");
218
void setComposite(bool comp)
220
if(comp == false) return;
221
fprintf(mFile,"\tsetAttr \".comp\" %i;\n", comp);
223
void setCompositeThreshold(float cth)
225
if(cth == 0.0) return;
226
fprintf(mFile,"\tsetAttr \".cth\" %f;\n", cth);
228
void setShadowsObeyLightLinking(bool soll)
230
if(soll == true) return;
231
fprintf(mFile,"\tsetAttr \".soll\" %i;\n", soll);
233
void setShadowsObeyShadowLinking(bool sosl)
235
if(sosl == false) return;
236
fprintf(mFile,"\tsetAttr \".sosl\" %i;\n", sosl);
238
void setRecursionDepth(int rd)
241
fprintf(mFile,"\tsetAttr \".rd\" %i;\n", rd);
243
void setLeafPrimitives(int lp)
245
if(lp == 200) return;
246
fprintf(mFile,"\tsetAttr \".lp\" %i;\n", lp);
248
void setSubdivisionPower(float sp)
250
if(sp == 0.25) return;
251
fprintf(mFile,"\tsetAttr \".sp\" %f;\n", sp);
253
void setSubdivisionHashSize(int shs)
256
fprintf(mFile,"\tsetAttr \".shs\" %i;\n", shs);
258
void setLogRenderPerformance(bool lpr)
260
if(lpr == false) return;
261
fprintf(mFile,"\tsetAttr \".lpr\" %i;\n", lpr);
263
void setGeometryVector(int gv)
266
fprintf(mFile,"\tsetAttr \".gv\" %i;\n", gv);
268
void setShadingVector(int sv)
271
fprintf(mFile,"\tsetAttr \".sv\" %i;\n", sv);
273
void setMaximumMemory(int mm)
276
fprintf(mFile,"\tsetAttr \".mm\" %i;\n", mm);
278
void setNumCpusToUse(int npu)
281
fprintf(mFile,"\tsetAttr \".npu\" %i;\n", npu);
283
void setInterruptFrequency(int itf)
286
fprintf(mFile,"\tsetAttr \".itf\" %i;\n", itf);
288
void setShadowPass(bool shp)
290
if(shp == false) return;
291
fprintf(mFile,"\tsetAttr \".shp\" %i;\n", shp);
293
void setIprShadowPass(bool isp)
295
if(isp == false) return;
296
fprintf(mFile,"\tsetAttr \".isp\" %i;\n", isp);
298
void setUseFileCache(bool uf)
300
if(uf == true) return;
301
fprintf(mFile,"\tsetAttr \".uf\" %i;\n", uf);
303
void setOptimizeInstances(bool oi)
305
if(oi == true) return;
306
fprintf(mFile,"\tsetAttr \".oi\" %i;\n", oi);
308
void setReuseTessellations(bool rut)
310
if(rut == true) return;
311
fprintf(mFile,"\tsetAttr \".rut\" %i;\n", rut);
313
void setMatteOpacityUsesTransparency(bool mot)
315
if(mot == true) return;
316
fprintf(mFile,"\tsetAttr \".mot\" %i;\n", mot);
318
void setMotionBlur(bool mb)
320
if(mb == false) return;
321
fprintf(mFile,"\tsetAttr \".mb\" %i;\n", mb);
323
void setMotionBlurByFrame(float mbf)
325
if(mbf == 1.0) return;
326
fprintf(mFile,"\tsetAttr \".mbf\" %f;\n", mbf);
328
void setApplyFogInPost(bool afp)
330
if(afp == false) return;
331
fprintf(mFile,"\tsetAttr \".afp\" %i;\n", afp);
333
void setPostFogBlur(int pfb)
336
fprintf(mFile,"\tsetAttr \".pfb\" %i;\n", pfb);
338
void setPreMel(const string& pram)
340
if(pram == "NULL") return;
341
fprintf(mFile,"\tsetAttr \".pram\" -type \"string\" ");
343
fprintf(mFile,";\n");
345
void setPostMel(const string& poam)
347
if(poam == "NULL") return;
348
fprintf(mFile,"\tsetAttr \".poam\" -type \"string\" ");
350
fprintf(mFile,";\n");
352
void setPreRenderLayerMel(const string& prlm)
354
if(prlm == "NULL") return;
355
fprintf(mFile,"\tsetAttr \".prlm\" -type \"string\" ");
357
fprintf(mFile,";\n");
359
void setPostRenderLayerMel(const string& polm)
361
if(polm == "NULL") return;
362
fprintf(mFile,"\tsetAttr \".polm\" -type \"string\" ");
364
fprintf(mFile,";\n");
366
void setPreRenderMel(const string& prm)
368
if(prm == "NULL") return;
369
fprintf(mFile,"\tsetAttr \".prm\" -type \"string\" ");
371
fprintf(mFile,";\n");
373
void setPostRenderMel(const string& pom)
375
if(pom == "NULL") return;
376
fprintf(mFile,"\tsetAttr \".pom\" -type \"string\" ");
378
fprintf(mFile,";\n");
380
void setPreFurRenderMel(const string& pfrm)
382
if(pfrm == "NULL") return;
383
fprintf(mFile,"\tsetAttr \".pfrm\" -type \"string\" ");
385
fprintf(mFile,";\n");
387
void setPostFurRenderMel(const string& pfom)
389
if(pfom == "NULL") return;
390
fprintf(mFile,"\tsetAttr \".pfom\" -type \"string\" ");
392
fprintf(mFile,";\n");
394
void setBlurLength(float bll)
396
if(bll == 1.0) return;
397
fprintf(mFile,"\tsetAttr \".bll\" %f;\n", bll);
399
void setBlurSharpness(float bls)
401
if(bls == 1.0) return;
402
fprintf(mFile,"\tsetAttr \".bls\" %f;\n", bls);
404
void setSmoothValue(int smv)
407
fprintf(mFile,"\tsetAttr \".smv\" %i;\n", smv);
409
void setUseBlur2DMemoryCap(bool ubc)
411
if(ubc == true) return;
412
fprintf(mFile,"\tsetAttr \".ubc\" %i;\n", ubc);
414
void setBlur2DMemoryCap(float mbc)
416
if(mbc == 200.0) return;
417
fprintf(mFile,"\tsetAttr \".mbc\" %f;\n", mbc);
419
void setMotionBlurType(unsigned int mbt)
422
fprintf(mFile,"\tsetAttr \".mbt\" %i;\n", mbt);
424
void setUseDisplacementBoundingBox(bool udbx)
426
if(udbx == true) return;
427
fprintf(mFile,"\tsetAttr \".udbx\" %i;\n", udbx);
429
void setSmoothColor(bool smc)
431
if(smc == false) return;
432
fprintf(mFile,"\tsetAttr \".smc\" %i;\n", smc);
434
void setKeepMotionVector(bool kmv)
436
if(kmv == false) return;
437
fprintf(mFile,"\tsetAttr \".kmv\" %i;\n", kmv);
439
void setIprRenderShading(bool isl)
441
if(isl == true) return;
442
fprintf(mFile,"\tsetAttr \".isl\" %i;\n", isl);
444
void setIprRenderShadowMaps(bool ism)
446
if(ism == true) return;
447
fprintf(mFile,"\tsetAttr \".ism\" %i;\n", ism);
449
void setIprRenderMotionBlur(bool imb)
451
if(imb == true) return;
452
fprintf(mFile,"\tsetAttr \".imb\" %i;\n", imb);
454
void setRenderLayerEnable(bool rlen)
456
if(rlen == false) return;
457
fprintf(mFile,"\tsetAttr \".rlen\" %i;\n", rlen);
459
void setForceTileSize(bool frts)
461
if(frts == false) return;
462
fprintf(mFile,"\tsetAttr \".frts\" %i;\n", frts);
464
void setTileWidth(short tlwd)
466
if(tlwd == 64) return;
467
fprintf(mFile,"\tsetAttr \".tlwd\" %i;\n", tlwd);
469
void setTileHeight(short tlht)
471
if(tlht == 64) return;
472
fprintf(mFile,"\tsetAttr \".tlht\" %i;\n", tlht);
474
void setJitterFinalColor(bool jfc)
476
if(jfc == true) return;
477
fprintf(mFile,"\tsetAttr \".jfc\" %i;\n", jfc);
479
void setRaysSeeBackground(bool rsb)
481
if(rsb == true) return;
482
fprintf(mFile,"\tsetAttr \".rsb\" %i;\n", rsb);
484
void setOversamplePaintEffects(bool ope)
486
if(ope == false) return;
487
fprintf(mFile,"\tsetAttr \".ope\" %i;\n", ope);
489
void setOversamplePfxPostFilter(bool oppf)
491
if(oppf == false) return;
492
fprintf(mFile,"\tsetAttr \".oppf\" %i;\n", oppf);
494
void setHyperShadeBinList(const string& hbl)
496
if(hbl == "NULL") return;
497
fprintf(mFile,"\tsetAttr \".hbl\" -type \"string\" ");
499
fprintf(mFile,";\n");
501
void getMacCodec()const
503
fprintf(mFile,"\"%s.macc\"",mName.c_str());
505
void getMacDepth()const
507
fprintf(mFile,"\"%s.macd\"",mName.c_str());
509
void getMacQual()const
511
fprintf(mFile,"\"%s.macq\"",mName.c_str());
513
void getComFrrt()const
515
fprintf(mFile,"\"%s.mcfr\"",mName.c_str());
517
void getRenderAll()const
519
fprintf(mFile,"\"%s.ra\"",mName.c_str());
521
void getQuality()const
523
fprintf(mFile,"\"%s.qual\"",mName.c_str());
525
void getResolution()const
527
fprintf(mFile,"\"%s.res\"",mName.c_str());
529
void getClipFinalShadedColor()const
531
fprintf(mFile,"\"%s.clip\"",mName.c_str());
533
void getEnableDepthMaps()const
535
fprintf(mFile,"\"%s.edm\"",mName.c_str());
537
void getEnableDefaultLight()const
539
fprintf(mFile,"\"%s.edl\"",mName.c_str());
541
void getEnableStrokeRender()const
543
fprintf(mFile,"\"%s.esr\"",mName.c_str());
545
void getOnlyRenderStrokes()const
547
fprintf(mFile,"\"%s.ors\"",mName.c_str());
549
void getStrokesDepthFile()const
551
fprintf(mFile,"\"%s.sdf\"",mName.c_str());
553
void getImageFormat()const
555
fprintf(mFile,"\"%s.outf\"",mName.c_str());
557
void getImfPluginKey()const
559
fprintf(mFile,"\"%s.imfkey\"",mName.c_str());
561
void getGammaCorrection()const
563
fprintf(mFile,"\"%s.gama\"",mName.c_str());
565
void getTopRegion()const
567
fprintf(mFile,"\"%s.top\"",mName.c_str());
569
void getLeftRegion()const
571
fprintf(mFile,"\"%s.left\"",mName.c_str());
573
void getBottomRegion()const
575
fprintf(mFile,"\"%s.bot\"",mName.c_str());
577
void getRightRegion()const
579
fprintf(mFile,"\"%s.rght\"",mName.c_str());
581
void getUseRenderRegion()const
583
fprintf(mFile,"\"%s.urr\"",mName.c_str());
585
void getByFrame()const
587
fprintf(mFile,"\"%s.bf\"",mName.c_str());
589
void getByFrameStep()const
591
fprintf(mFile,"\"%s.bfs\"",mName.c_str());
593
void getByExtension()const
595
fprintf(mFile,"\"%s.be\"",mName.c_str());
597
void getFieldExtControl()const
599
fprintf(mFile,"\"%s.fec\"",mName.c_str());
601
void getOutFormatControl()const
603
fprintf(mFile,"\"%s.ofc\"",mName.c_str());
605
void getOddFieldExt()const
607
fprintf(mFile,"\"%s.ofe\"",mName.c_str());
609
void getEvenFieldExt()const
611
fprintf(mFile,"\"%s.efe\"",mName.c_str());
613
void getOutFormatExt()const
615
fprintf(mFile,"\"%s.oft\"",mName.c_str());
617
void getComposite()const
619
fprintf(mFile,"\"%s.comp\"",mName.c_str());
621
void getCompositeThreshold()const
623
fprintf(mFile,"\"%s.cth\"",mName.c_str());
625
void getShadowsObeyLightLinking()const
627
fprintf(mFile,"\"%s.soll\"",mName.c_str());
629
void getShadowsObeyShadowLinking()const
631
fprintf(mFile,"\"%s.sosl\"",mName.c_str());
633
void getRecursionDepth()const
635
fprintf(mFile,"\"%s.rd\"",mName.c_str());
637
void getLeafPrimitives()const
639
fprintf(mFile,"\"%s.lp\"",mName.c_str());
641
void getSubdivisionPower()const
643
fprintf(mFile,"\"%s.sp\"",mName.c_str());
645
void getSubdivisionHashSize()const
647
fprintf(mFile,"\"%s.shs\"",mName.c_str());
649
void getLogRenderPerformance()const
651
fprintf(mFile,"\"%s.lpr\"",mName.c_str());
653
void getGeometryVector()const
655
fprintf(mFile,"\"%s.gv\"",mName.c_str());
657
void getShadingVector()const
659
fprintf(mFile,"\"%s.sv\"",mName.c_str());
661
void getMaximumMemory()const
663
fprintf(mFile,"\"%s.mm\"",mName.c_str());
665
void getNumCpusToUse()const
667
fprintf(mFile,"\"%s.npu\"",mName.c_str());
669
void getInterruptFrequency()const
671
fprintf(mFile,"\"%s.itf\"",mName.c_str());
673
void getShadowPass()const
675
fprintf(mFile,"\"%s.shp\"",mName.c_str());
677
void getIprShadowPass()const
679
fprintf(mFile,"\"%s.isp\"",mName.c_str());
681
void getUseFileCache()const
683
fprintf(mFile,"\"%s.uf\"",mName.c_str());
685
void getOptimizeInstances()const
687
fprintf(mFile,"\"%s.oi\"",mName.c_str());
689
void getReuseTessellations()const
691
fprintf(mFile,"\"%s.rut\"",mName.c_str());
693
void getMatteOpacityUsesTransparency()const
695
fprintf(mFile,"\"%s.mot\"",mName.c_str());
697
void getMotionBlurByFrame()const
699
fprintf(mFile,"\"%s.mbf\"",mName.c_str());
701
void getFogGeometry()const
703
fprintf(mFile,"\"%s.fg\"",mName.c_str());
705
void getApplyFogInPost()const
707
fprintf(mFile,"\"%s.afp\"",mName.c_str());
709
void getPostFogBlur()const
711
fprintf(mFile,"\"%s.pfb\"",mName.c_str());
713
void getPreMel()const
715
fprintf(mFile,"\"%s.pram\"",mName.c_str());
717
void getPostMel()const
719
fprintf(mFile,"\"%s.poam\"",mName.c_str());
721
void getPreRenderLayerMel()const
723
fprintf(mFile,"\"%s.prlm\"",mName.c_str());
725
void getPostRenderLayerMel()const
727
fprintf(mFile,"\"%s.polm\"",mName.c_str());
729
void getPreRenderMel()const
731
fprintf(mFile,"\"%s.prm\"",mName.c_str());
733
void getPostRenderMel()const
735
fprintf(mFile,"\"%s.pom\"",mName.c_str());
737
void getPreFurRenderMel()const
739
fprintf(mFile,"\"%s.pfrm\"",mName.c_str());
741
void getPostFurRenderMel()const
743
fprintf(mFile,"\"%s.pfom\"",mName.c_str());
745
void getCreateIprFile()const
747
fprintf(mFile,"\"%s.cif\"",mName.c_str());
749
void getBlurLength()const
751
fprintf(mFile,"\"%s.bll\"",mName.c_str());
753
void getBlurSharpness()const
755
fprintf(mFile,"\"%s.bls\"",mName.c_str());
757
void getSmoothValue()const
759
fprintf(mFile,"\"%s.smv\"",mName.c_str());
761
void getUseBlur2DMemoryCap()const
763
fprintf(mFile,"\"%s.ubc\"",mName.c_str());
765
void getBlur2DMemoryCap()const
767
fprintf(mFile,"\"%s.mbc\"",mName.c_str());
769
void getUseDisplacementBoundingBox()const
771
fprintf(mFile,"\"%s.udbx\"",mName.c_str());
773
void getSmoothColor()const
775
fprintf(mFile,"\"%s.smc\"",mName.c_str());
777
void getKeepMotionVector()const
779
fprintf(mFile,"\"%s.kmv\"",mName.c_str());
781
void getIprRenderShading()const
783
fprintf(mFile,"\"%s.isl\"",mName.c_str());
785
void getIprRenderShadowMaps()const
787
fprintf(mFile,"\"%s.ism\"",mName.c_str());
789
void getIprRenderMotionBlur()const
791
fprintf(mFile,"\"%s.imb\"",mName.c_str());
793
void getRendercallback()const
795
fprintf(mFile,"\"%s.rcb\"",mName.c_str());
797
void getRenderLayerEnable()const
799
fprintf(mFile,"\"%s.rlen\"",mName.c_str());
801
void getForceTileSize()const
803
fprintf(mFile,"\"%s.frts\"",mName.c_str());
805
void getTileWidth()const
807
fprintf(mFile,"\"%s.tlwd\"",mName.c_str());
809
void getTileHeight()const
811
fprintf(mFile,"\"%s.tlht\"",mName.c_str());
813
void getJitterFinalColor()const
815
fprintf(mFile,"\"%s.jfc\"",mName.c_str());
817
void getRaysSeeBackground()const
819
fprintf(mFile,"\"%s.rsb\"",mName.c_str());
821
void getOversamplePaintEffects()const
823
fprintf(mFile,"\"%s.ope\"",mName.c_str());
825
void getOversamplePfxPostFilter()const
827
fprintf(mFile,"\"%s.oppf\"",mName.c_str());
830
RenderGlobals(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
831
:DependNode(file, name, parent, nodeType, shared, create) {}
835
#endif//__MayaDM_RENDERGLOBALS_H__