1 /*
2     Copyright (c) 2008-2009 NetAllied Systems GmbH
3 
4     This file is part of MayaDataModel.
5 
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
9 */
10 #ifndef __MayaDM_CREATECOLORSET_H__
11 #define __MayaDM_CREATECOLORSET_H__
12 #include "MayaDMTypes.h"
13 #include "MayaDMConnectables.h"
14 #include "MayaDMDependNode.h"
15 namespace MayaDM
16 {
17 class CreateColorSet : public DependNode
18 {
19 public:
20 public:
21 
CreateColorSet()22 	CreateColorSet():DependNode(){}
23 	CreateColorSet(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
24 		:DependNode(file, name, parent, "createColorSet", shared, create){}
~CreateColorSet()25 	virtual ~CreateColorSet(){}
26 
setColorSetName(const string & colos)27 	void setColorSetName(const string& colos)
28 	{
29 		if(colos == "NULL") return;
30 		fprintf(mFile,"\tsetAttr \".colos\" -type \"string\" ");
31 		colos.write(mFile);
32 		fprintf(mFile,";\n");
33 	}
setClamped(bool clam)34 	void setClamped(bool clam)
35 	{
36 		if(clam == true) return;
37 		fprintf(mFile,"\tsetAttr \".clam\" %i;\n", clam);
38 	}
setRepresentation(unsigned int rprt)39 	void setRepresentation(unsigned int rprt)
40 	{
41 		if(rprt == 3) return;
42 		fprintf(mFile,"\tsetAttr \".rprt\" %i;\n", rprt);
43 	}
getInputGeometry()44 	void getInputGeometry()const
45 	{
46 		fprintf(mFile,"\"%s.ig\"",mName.c_str());
47 	}
getOutputGeometry()48 	void getOutputGeometry()const
49 	{
50 		fprintf(mFile,"\"%s.og\"",mName.c_str());
51 	}
getColorSetName()52 	void getColorSetName()const
53 	{
54 		fprintf(mFile,"\"%s.colos\"",mName.c_str());
55 	}
getClamped()56 	void getClamped()const
57 	{
58 		fprintf(mFile,"\"%s.clam\"",mName.c_str());
59 	}
getRepresentation()60 	void getRepresentation()const
61 	{
62 		fprintf(mFile,"\"%s.rprt\"",mName.c_str());
63 	}
64 protected:
65 	CreateColorSet(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
DependNode(file,name,parent,nodeType,shared,create)66 		:DependNode(file, name, parent, nodeType, shared, create) {}
67 
68 };
69 }//namespace MayaDM
70 #endif//__MayaDM_CREATECOLORSET_H__
71