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_POLYSMOOTH_H__ 11 #define __MayaDM_POLYSMOOTH_H__ 12 #include "MayaDMTypes.h" 13 #include "MayaDMConnectables.h" 14 #include "MayaDMPolyModifier.h" 15 namespace MayaDM 16 { 17 class PolySmooth : public PolyModifier 18 { 19 public: 20 public: 21 PolySmooth()22 PolySmooth():PolyModifier(){} 23 PolySmooth(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true) 24 :PolyModifier(file, name, parent, "polySmooth", shared, create){} ~PolySmooth()25 virtual ~PolySmooth(){} 26 setSmoothness(short sm)27 void setSmoothness(short sm) 28 { 29 if(sm == 1) return; 30 fprintf(mFile,"\tsetAttr \".sm\" %i;\n", sm); 31 } getSmoothness()32 void getSmoothness()const 33 { 34 fprintf(mFile,"\"%s.sm\"",mName.c_str()); 35 } 36 protected: 37 PolySmooth(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true) PolyModifier(file,name,parent,nodeType,shared,create)38 :PolyModifier(file, name, parent, nodeType, shared, create) {} 39 40 }; 41 }//namespace MayaDM 42 #endif//__MayaDM_POLYSMOOTH_H__ 43