X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_duplicate.cpp;h=2b67c3ebdfed50c66971beeb33af0b11ef51eac6;hb=d537b3fd28a3970ac04dde178ad67a1fe1bc2a6d;hp=61ca9eca10483674830b0d3db0c5f148840f4f78;hpb=03f9d7a946e2d2465f263349b2d6c60dd426d036;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp b/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp index 61ca9ec..2b67c3e 100644 --- a/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp @@ -58,10 +58,10 @@ ValueNode_Duplicate::ValueNode_Duplicate(const ValueBase::Type &x): ValueNode_Duplicate::ValueNode_Duplicate(const ValueBase &x): LinkableValueNode(x.get_type()) { - set_link("from", ValueNode_Const::create(int(1))); - set_link("to", ValueNode_Const::create(x.get(int()))); - set_link("step", ValueNode_Const::create(int(1))); - index = 1; + set_link("from", ValueNode_Const::create(Real(1.0))); + set_link("to", ValueNode_Const::create(x.get(Real()))); + set_link("step", ValueNode_Const::create(Real(1.0))); + index = 1.0; } ValueNode_Duplicate* @@ -148,16 +148,16 @@ ValueNode_Duplicate::get_link_index_from_name(const String &name)const void ValueNode_Duplicate::reset_index(Time t)const { - int from = (*from_)(t).get(int()); + Real from = (*from_)(t).get(Real()); index = from; } bool ValueNode_Duplicate::step(Time t)const { - int from = (*from_)(t).get(int()); - int to = (*to_ )(t).get(int()); - int step = (*step_)(t).get(int()); + Real from = (*from_)(t).get(Real()); + Real to = (*to_ )(t).get(Real()); + Real step = (*step_)(t).get(Real()); if (step == 0) return false; @@ -178,9 +178,9 @@ ValueNode_Duplicate::step(Time t)const int ValueNode_Duplicate::count_steps(Time t)const { - int from = (*from_)(t).get(int()); - int to = (*to_ )(t).get(int()); - int step = (*step_)(t).get(int()); + Real from = (*from_)(t).get(Real()); + Real to = (*to_ )(t).get(Real()); + Real step = (*step_)(t).get(Real()); if (step == 0) return 1; @@ -208,5 +208,6 @@ ValueNode_Duplicate::get_local_name()const bool ValueNode_Duplicate::check_type(ValueBase::Type type) { - return type==ValueBase::TYPE_INTEGER; + // never offer this as a choice. it's used automatically by the 'Duplicate' layer. + return false; }