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_ANIMCURVEUA_H__
11
#define __MayaDM_ANIMCURVEUA_H__
12
#include "MayaDMTypes.h"
13
#include "MayaDMConnectables.h"
14
#include "MayaDMAnimCurve.h"
17
class AnimCurveUA : public AnimCurve
23
void write(FILE* file) const
25
fprintf(file,"%f ", keyTime);
26
fprintf(file,"%f", keyValue);
31
AnimCurveUA():AnimCurve(){}
32
AnimCurveUA(FILE* file,const std::string& name,const std::string& parent="",bool shared=false,bool create=true)
33
:AnimCurve(file, name, parent, "animCurveUA", shared, create){}
34
virtual ~AnimCurveUA(){}
36
void setKeyTimeValue(size_t ktv_i,const KeyTimeValue& ktv)
38
fprintf(mFile,"\tsetAttr \".ktv[%i]\" ",ktv_i);
42
void setKeyTimeValue(size_t ktv_start,size_t ktv_end,KeyTimeValue* ktv)
44
fprintf(mFile,"\tsetAttr \".ktv[%i:%i]\" ", ktv_start,ktv_end);
45
size_t size = (ktv_end-ktv_start)*1+1;
46
for(size_t i=0;i<size;++i)
53
void startKeyTimeValue(size_t ktv_start,size_t ktv_end)const
55
fprintf(mFile,"\tsetAttr \".ktv[%i:%i]\"",ktv_start,ktv_end);
56
fprintf(mFile," -type \"KeyTimeValue\" ");
58
void appendKeyTimeValue(const KeyTimeValue& ktv)const
63
void endKeyTimeValue()const
67
void setKeyTime(size_t ktv_i,double kt)
70
fprintf(mFile,"\tsetAttr \".ktv[%i].kt\" %f;\n", ktv_i,kt);
72
void setKeyValue(size_t ktv_i,double kv)
75
fprintf(mFile,"\tsetAttr \".ktv[%i].kv\" %f;\n", ktv_i,kv);
79
fprintf(mFile,"\"%s.i\"",mName.c_str());
83
fprintf(mFile,"\"%s.o\"",mName.c_str());
86
AnimCurveUA(FILE* file,const std::string& name,const std::string& parent,const std::string& nodeType,bool shared=false,bool create=true)
87
:AnimCurve(file, name, parent, nodeType, shared, create) {}
91
#endif//__MayaDM_ANIMCURVEUA_H__