From: dooglus Date: Mon, 22 Dec 2008 10:28:11 +0000 (+0000) Subject: Add optional debugging for calls to ValueNode_*::operator(). export SYNFIG_DEBUG_VAL... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ecff046513a5c0bd64db58b69fdd2fb42736bca7;p=synfig.git Add optional debugging for calls to ValueNode_*::operator(). export SYNFIG_DEBUG_VALUENODE_OPERATORS=1 to enable. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2318 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/valuenode_add.cpp b/synfig-core/trunk/src/synfig/valuenode_add.cpp index 7cd4ee9..c67d74e 100644 --- a/synfig-core/trunk/src/synfig/valuenode_add.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_add.cpp @@ -119,6 +119,9 @@ synfig::ValueNode_Add::~ValueNode_Add() synfig::ValueBase synfig::ValueNode_Add::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + if(!ref_a || !ref_b) throw runtime_error(strprintf("ValueNode_Add: %s",_("One or both of my parameters aren't set!"))); switch(get_type()) diff --git a/synfig-core/trunk/src/synfig/valuenode_anglestring.cpp b/synfig-core/trunk/src/synfig/valuenode_anglestring.cpp index d0da88a..978b8b8 100644 --- a/synfig-core/trunk/src/synfig/valuenode_anglestring.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_anglestring.cpp @@ -89,6 +89,9 @@ ValueNode_AngleString::~ValueNode_AngleString() ValueBase ValueNode_AngleString::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Real angle(Angle::deg((*angle_)(t).get(Angle())).get()); int width((*width_)(t).get(int())); int precision((*precision_)(t).get(int())); diff --git a/synfig-core/trunk/src/synfig/valuenode_atan2.cpp b/synfig-core/trunk/src/synfig/valuenode_atan2.cpp index 5f7381b..c4dd5e7 100644 --- a/synfig-core/trunk/src/synfig/valuenode_atan2.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_atan2.cpp @@ -86,6 +86,9 @@ ValueNode_Atan2::~ValueNode_Atan2() ValueBase ValueNode_Atan2::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return Angle::tan((*y_)(t).get(Real()), (*x_)(t).get(Real())); } diff --git a/synfig-core/trunk/src/synfig/valuenode_bline.cpp b/synfig-core/trunk/src/synfig/valuenode_bline.cpp index 83eb419..fc3e916 100644 --- a/synfig-core/trunk/src/synfig/valuenode_bline.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_bline.cpp @@ -445,9 +445,14 @@ ValueNode_BLine::create_list_entry(int index, Time time, Real origin) return ret; } +static int instance_count; + ValueBase ValueNode_BLine::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + std::vector ret_list; std::vector::const_iterator iter,first_iter; diff --git a/synfig-core/trunk/src/synfig/valuenode_blinecalctangent.cpp b/synfig-core/trunk/src/synfig/valuenode_blinecalctangent.cpp index 74b4b57..3a3c2cc 100644 --- a/synfig-core/trunk/src/synfig/valuenode_blinecalctangent.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_blinecalctangent.cpp @@ -90,6 +90,9 @@ ValueNode_BLineCalcTangent::~ValueNode_BLineCalcTangent() ValueBase ValueNode_BLineCalcTangent::operator()(Time t, Real amount)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + const std::vector bline((*bline_)(t).get_list()); handle bline_value_node(bline_); const bool looped(bline_value_node->get_loop()); diff --git a/synfig-core/trunk/src/synfig/valuenode_blinecalcvertex.cpp b/synfig-core/trunk/src/synfig/valuenode_blinecalcvertex.cpp index e32d9bc..a6fc589 100644 --- a/synfig-core/trunk/src/synfig/valuenode_blinecalcvertex.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_blinecalcvertex.cpp @@ -87,6 +87,9 @@ ValueNode_BLineCalcVertex::~ValueNode_BLineCalcVertex() ValueBase ValueNode_BLineCalcVertex::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + const std::vector bline((*bline_)(t).get_list()); handle bline_value_node(bline_); const bool looped(bline_value_node->get_loop()); diff --git a/synfig-core/trunk/src/synfig/valuenode_blinecalcwidth.cpp b/synfig-core/trunk/src/synfig/valuenode_blinecalcwidth.cpp index b754f2f..4d8ee0e 100644 --- a/synfig-core/trunk/src/synfig/valuenode_blinecalcwidth.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_blinecalcwidth.cpp @@ -88,6 +88,9 @@ ValueNode_BLineCalcWidth::~ValueNode_BLineCalcWidth() ValueBase ValueNode_BLineCalcWidth::operator()(Time t, Real amount)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + const std::vector bline((*bline_)(t).get_list()); handle bline_value_node(bline_); const bool looped(bline_value_node->get_loop()); diff --git a/synfig-core/trunk/src/synfig/valuenode_blinereversetangent.cpp b/synfig-core/trunk/src/synfig/valuenode_blinereversetangent.cpp index cd05015..ed2928b 100644 --- a/synfig-core/trunk/src/synfig/valuenode_blinereversetangent.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_blinereversetangent.cpp @@ -90,6 +90,9 @@ ValueNode_BLineRevTangent::~ValueNode_BLineRevTangent() ValueBase ValueNode_BLineRevTangent::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + if ((*reverse_)(t).get(bool())) { BLinePoint reference((*reference_)(t)); diff --git a/synfig-core/trunk/src/synfig/valuenode_composite.cpp b/synfig-core/trunk/src/synfig/valuenode_composite.cpp index 61b6c64..7e18ea0 100644 --- a/synfig-core/trunk/src/synfig/valuenode_composite.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_composite.cpp @@ -114,6 +114,9 @@ ValueNode_Composite::create_new()const ValueBase synfig::ValueNode_Composite::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + switch(get_type()) { case ValueBase::TYPE_VECTOR: diff --git a/synfig-core/trunk/src/synfig/valuenode_const.cpp b/synfig-core/trunk/src/synfig/valuenode_const.cpp index a34d891..dcf3d41 100644 --- a/synfig-core/trunk/src/synfig/valuenode_const.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_const.cpp @@ -87,6 +87,9 @@ ValueNode_Const::~ValueNode_Const() ValueBase ValueNode_Const::operator()(Time /*t*/)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return value; } diff --git a/synfig-core/trunk/src/synfig/valuenode_cos.cpp b/synfig-core/trunk/src/synfig/valuenode_cos.cpp index 40d22d9..efcd88a 100644 --- a/synfig-core/trunk/src/synfig/valuenode_cos.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_cos.cpp @@ -86,6 +86,9 @@ ValueNode_Cos::~ValueNode_Cos() ValueBase ValueNode_Cos::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return Angle::cos( (*angle_)(t).get(Angle()) diff --git a/synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp b/synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp index 1df04f9..55de6ae 100644 --- a/synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_dotproduct.cpp @@ -90,6 +90,9 @@ ValueNode_DotProduct::~ValueNode_DotProduct() ValueBase ValueNode_DotProduct::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Vector lhs((*lhs_)(t).get(Vector())); Vector rhs((*rhs_)(t).get(Vector())); diff --git a/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp b/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp index a8e5801..540c3a9 100644 --- a/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_duplicate.cpp @@ -191,6 +191,9 @@ ValueNode_Duplicate::count_steps(Time t)const ValueBase ValueNode_Duplicate::operator()(Time t __attribute__ ((unused)))const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return index; } diff --git a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp index ddcca6d..a8c253a 100644 --- a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp @@ -595,6 +595,9 @@ ValueNode_DynamicList::create_from(const ValueBase &value) ValueBase ValueNode_DynamicList::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + std::vector ret_list; std::vector::const_iterator iter; diff --git a/synfig-core/trunk/src/synfig/valuenode_exp.cpp b/synfig-core/trunk/src/synfig/valuenode_exp.cpp index 266034b..05d4b63 100644 --- a/synfig-core/trunk/src/synfig/valuenode_exp.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_exp.cpp @@ -86,6 +86,9 @@ ValueNode_Exp::~ValueNode_Exp() ValueBase ValueNode_Exp::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return (exp((*exp_)(t).get(Real())) * (*scale_)(t).get(Real())); } diff --git a/synfig-core/trunk/src/synfig/valuenode_gradientcolor.cpp b/synfig-core/trunk/src/synfig/valuenode_gradientcolor.cpp index 3fdf938..60c6e7e 100644 --- a/synfig-core/trunk/src/synfig/valuenode_gradientcolor.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_gradientcolor.cpp @@ -88,6 +88,9 @@ ValueNode_GradientColor::~ValueNode_GradientColor() ValueBase ValueNode_GradientColor::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Real index((*index_)(t).get(Real())); bool loop((*loop_)(t).get(bool())); if (loop) index -= floor(index); diff --git a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp index 642856d..3e06bfc 100644 --- a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp @@ -91,6 +91,9 @@ synfig::ValueNode_GradientRotate::~ValueNode_GradientRotate() synfig::ValueBase synfig::ValueNode_GradientRotate::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Gradient gradient; gradient=(*ref_gradient)(t).get(gradient); Real offset((*ref_offset)(t).get(Real())); diff --git a/synfig-core/trunk/src/synfig/valuenode_integer.cpp b/synfig-core/trunk/src/synfig/valuenode_integer.cpp index 2b04eb0..38cd082 100644 --- a/synfig-core/trunk/src/synfig/valuenode_integer.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_integer.cpp @@ -153,6 +153,9 @@ ValueNode_Integer::get_link_index_from_name(const String &name)const ValueBase ValueNode_Integer::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + int integer = (*integer_)(t).get(int()); switch (get_type()) diff --git a/synfig-core/trunk/src/synfig/valuenode_intstring.cpp b/synfig-core/trunk/src/synfig/valuenode_intstring.cpp index c62774f..c7011d2 100644 --- a/synfig-core/trunk/src/synfig/valuenode_intstring.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_intstring.cpp @@ -88,6 +88,9 @@ ValueNode_IntString::~ValueNode_IntString() ValueBase ValueNode_IntString::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + int integer((*int_)(t).get(int())); int width((*width_)(t).get(int())); int zero_pad((*zero_pad_)(t).get(bool())); diff --git a/synfig-core/trunk/src/synfig/valuenode_join.cpp b/synfig-core/trunk/src/synfig/valuenode_join.cpp index d5a6242..eaa8fbc 100644 --- a/synfig-core/trunk/src/synfig/valuenode_join.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_join.cpp @@ -98,6 +98,9 @@ ValueNode_Join::~ValueNode_Join() ValueBase ValueNode_Join::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + const std::vector strings((*strings_)(t).get_list()); const String before((*before_)(t).get(String())); const String separator((*separator_)(t).get(String())); diff --git a/synfig-core/trunk/src/synfig/valuenode_linear.cpp b/synfig-core/trunk/src/synfig/valuenode_linear.cpp index 2b7fd35..583612e 100644 --- a/synfig-core/trunk/src/synfig/valuenode_linear.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_linear.cpp @@ -108,6 +108,9 @@ ValueNode_Linear::~ValueNode_Linear() ValueBase ValueNode_Linear::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + switch(get_type()) { case ValueBase::TYPE_ANGLE: diff --git a/synfig-core/trunk/src/synfig/valuenode_log.cpp b/synfig-core/trunk/src/synfig/valuenode_log.cpp index a79dde5..59f82e5 100644 --- a/synfig-core/trunk/src/synfig/valuenode_log.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_log.cpp @@ -149,6 +149,9 @@ ValueNode_Logarithm::get_link_index_from_name(const String &name)const ValueBase ValueNode_Logarithm::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Real link = (*link_) (t).get(Real()); Real epsilon = (*epsilon_) (t).get(Real()); Real infinite = (*infinite_)(t).get(Real()); diff --git a/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp b/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp index a187568..a889c78 100644 --- a/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp @@ -96,6 +96,9 @@ ValueNode_RadialComposite::create_new()const ValueBase synfig::ValueNode_RadialComposite::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + switch(get_type()) { case ValueBase::TYPE_VECTOR: diff --git a/synfig-core/trunk/src/synfig/valuenode_range.cpp b/synfig-core/trunk/src/synfig/valuenode_range.cpp index fedea25..c45f369 100644 --- a/synfig-core/trunk/src/synfig/valuenode_range.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_range.cpp @@ -114,6 +114,9 @@ synfig::ValueNode_Range::~ValueNode_Range() synfig::ValueBase synfig::ValueNode_Range::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + if(!min_ || !max_ || !link_) throw runtime_error(strprintf("ValueNode_Range: %s",_("Some of my parameters aren't set!"))); diff --git a/synfig-core/trunk/src/synfig/valuenode_realstring.cpp b/synfig-core/trunk/src/synfig/valuenode_realstring.cpp index 085e3ca..e8231e7 100644 --- a/synfig-core/trunk/src/synfig/valuenode_realstring.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_realstring.cpp @@ -89,6 +89,9 @@ ValueNode_RealString::~ValueNode_RealString() ValueBase ValueNode_RealString::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Real real((*real_)(t).get(Real())); int width((*width_)(t).get(int())); int precision((*precision_)(t).get(int())); diff --git a/synfig-core/trunk/src/synfig/valuenode_reciprocal.cpp b/synfig-core/trunk/src/synfig/valuenode_reciprocal.cpp index 023e325..d31a995 100644 --- a/synfig-core/trunk/src/synfig/valuenode_reciprocal.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_reciprocal.cpp @@ -151,6 +151,9 @@ ValueNode_Reciprocal::get_link_index_from_name(const String &name)const ValueBase ValueNode_Reciprocal::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Real link = (*link_) (t).get(Real()); Real epsilon = (*epsilon_) (t).get(Real()); Real infinite = (*infinite_)(t).get(Real()); diff --git a/synfig-core/trunk/src/synfig/valuenode_reference.cpp b/synfig-core/trunk/src/synfig/valuenode_reference.cpp index 3c09b44..a235f02 100644 --- a/synfig-core/trunk/src/synfig/valuenode_reference.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_reference.cpp @@ -140,6 +140,9 @@ ValueNode_Reference::get_link_index_from_name(const String &name)const ValueBase ValueNode_Reference::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return (*link_)(t); } diff --git a/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp b/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp index 79e4f66..e676b93 100644 --- a/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_repeat_gradient.cpp @@ -96,6 +96,9 @@ synfig::ValueNode_Repeat_Gradient::~ValueNode_Repeat_Gradient() synfig::ValueBase synfig::ValueNode_Repeat_Gradient::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + const int count((*count_)(t).get(int())); int i; Gradient ret; diff --git a/synfig-core/trunk/src/synfig/valuenode_scale.cpp b/synfig-core/trunk/src/synfig/valuenode_scale.cpp index a6f0553..a0bba53 100644 --- a/synfig-core/trunk/src/synfig/valuenode_scale.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_scale.cpp @@ -112,6 +112,9 @@ synfig::ValueNode_Scale::~ValueNode_Scale() synfig::ValueBase synfig::ValueNode_Scale::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + if(!value_node || !scalar) throw runtime_error(strprintf("ValueNode_Scale: %s",_("One or both of my parameters aren't set!"))); else if(get_type()==ValueBase::TYPE_ANGLE) diff --git a/synfig-core/trunk/src/synfig/valuenode_segcalctangent.cpp b/synfig-core/trunk/src/synfig/valuenode_segcalctangent.cpp index a4b735c..245bf62 100644 --- a/synfig-core/trunk/src/synfig/valuenode_segcalctangent.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_segcalctangent.cpp @@ -79,6 +79,9 @@ ValueNode_SegCalcTangent::~ValueNode_SegCalcTangent() ValueBase ValueNode_SegCalcTangent::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Segment segment((*segment_)(t).get(Segment())); etl::hermite curve(segment.p1,segment.p2,segment.t1,segment.t2); diff --git a/synfig-core/trunk/src/synfig/valuenode_segcalcvertex.cpp b/synfig-core/trunk/src/synfig/valuenode_segcalcvertex.cpp index 974838b..6391f39 100644 --- a/synfig-core/trunk/src/synfig/valuenode_segcalcvertex.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_segcalcvertex.cpp @@ -78,6 +78,9 @@ ValueNode_SegCalcVertex::~ValueNode_SegCalcVertex() ValueBase ValueNode_SegCalcVertex::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Segment segment((*segment_)(t).get(Segment())); etl::hermite curve(segment.p1,segment.p2,segment.t1,segment.t2); diff --git a/synfig-core/trunk/src/synfig/valuenode_sine.cpp b/synfig-core/trunk/src/synfig/valuenode_sine.cpp index 9ebd3ac..6e42dc7 100644 --- a/synfig-core/trunk/src/synfig/valuenode_sine.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_sine.cpp @@ -86,6 +86,9 @@ ValueNode_Sine::~ValueNode_Sine() ValueBase ValueNode_Sine::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return Angle::sin( (*angle_)(t).get(Angle()) diff --git a/synfig-core/trunk/src/synfig/valuenode_step.cpp b/synfig-core/trunk/src/synfig/valuenode_step.cpp index 130d2b2..98d9d80 100644 --- a/synfig-core/trunk/src/synfig/valuenode_step.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_step.cpp @@ -105,6 +105,9 @@ ValueNode_Step::~ValueNode_Step() ValueBase ValueNode_Step::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Time duration ((*duration_ )(t).get(Time())); Time start_time ((*start_time_ )(t).get(Time())); Real intersection((*intersection_)(t).get(Real())); diff --git a/synfig-core/trunk/src/synfig/valuenode_stripes.cpp b/synfig-core/trunk/src/synfig/valuenode_stripes.cpp index 424a73d..ce4b694 100644 --- a/synfig-core/trunk/src/synfig/valuenode_stripes.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_stripes.cpp @@ -93,6 +93,9 @@ synfig::ValueNode_Stripes::~ValueNode_Stripes() synfig::ValueBase synfig::ValueNode_Stripes::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + const int total((*stripes_)(t).get(int())); int i; Gradient ret; diff --git a/synfig-core/trunk/src/synfig/valuenode_subtract.cpp b/synfig-core/trunk/src/synfig/valuenode_subtract.cpp index 3214d30..3ba475e 100644 --- a/synfig-core/trunk/src/synfig/valuenode_subtract.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_subtract.cpp @@ -125,6 +125,9 @@ synfig::ValueNode_Subtract::~ValueNode_Subtract() synfig::ValueBase synfig::ValueNode_Subtract::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + if(!ref_a || !ref_b) throw runtime_error(strprintf("ValueNode_Subtract: %s",_("One or both of my parameters aren't set!"))); switch(get_type()) diff --git a/synfig-core/trunk/src/synfig/valuenode_switch.cpp b/synfig-core/trunk/src/synfig/valuenode_switch.cpp index 78fc22d..195bd95 100644 --- a/synfig-core/trunk/src/synfig/valuenode_switch.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_switch.cpp @@ -154,6 +154,9 @@ ValueNode_Switch::get_link_index_from_name(const String &name)const ValueBase ValueNode_Switch::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return (*switch_)(t).get(bool()) ? (*link_on_)(t) : (*link_off_)(t); } diff --git a/synfig-core/trunk/src/synfig/valuenode_timedswap.cpp b/synfig-core/trunk/src/synfig/valuenode_timedswap.cpp index 0ad1fc5..378535a 100644 --- a/synfig-core/trunk/src/synfig/valuenode_timedswap.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_timedswap.cpp @@ -112,6 +112,9 @@ synfig::ValueNode_TimedSwap::~ValueNode_TimedSwap() synfig::ValueBase synfig::ValueNode_TimedSwap::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Time swptime=(*swap_time)(t).get(Time()); Time swplength=(*swap_length)(t).get(Time()); diff --git a/synfig-core/trunk/src/synfig/valuenode_timeloop.cpp b/synfig-core/trunk/src/synfig/valuenode_timeloop.cpp index 8bec653..60ba1a0 100644 --- a/synfig-core/trunk/src/synfig/valuenode_timeloop.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_timeloop.cpp @@ -153,6 +153,9 @@ ValueNode_TimeLoop::get_link_index_from_name(const String &name)const ValueBase ValueNode_TimeLoop::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Time link_time = (*link_time_) (t).get(Time()); Time local_time = (*local_time_)(t).get(Time()); Time duration = (*duration_) (t).get(Time()); diff --git a/synfig-core/trunk/src/synfig/valuenode_timestring.cpp b/synfig-core/trunk/src/synfig/valuenode_timestring.cpp index d5f6435..a0808aa 100644 --- a/synfig-core/trunk/src/synfig/valuenode_timestring.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_timestring.cpp @@ -86,6 +86,9 @@ ValueNode_TimeString::~ValueNode_TimeString() ValueBase ValueNode_TimeString::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + Time time((*time_)(t).get(Time())); switch (get_type()) diff --git a/synfig-core/trunk/src/synfig/valuenode_twotone.cpp b/synfig-core/trunk/src/synfig/valuenode_twotone.cpp index 7148502..3c18ce0 100644 --- a/synfig-core/trunk/src/synfig/valuenode_twotone.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_twotone.cpp @@ -88,6 +88,9 @@ synfig::ValueNode_TwoTone::~ValueNode_TwoTone() synfig::ValueBase synfig::ValueNode_TwoTone::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return Gradient((*ref_a)(t).get(Color()),(*ref_b)(t).get(Color())); } diff --git a/synfig-core/trunk/src/synfig/valuenode_vectorangle.cpp b/synfig-core/trunk/src/synfig/valuenode_vectorangle.cpp index 8d8d7e7..c339d2f 100644 --- a/synfig-core/trunk/src/synfig/valuenode_vectorangle.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_vectorangle.cpp @@ -86,6 +86,9 @@ ValueNode_VectorAngle::~ValueNode_VectorAngle() ValueBase ValueNode_VectorAngle::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return (*vector_)(t).get(Vector()).angle(); } diff --git a/synfig-core/trunk/src/synfig/valuenode_vectorlength.cpp b/synfig-core/trunk/src/synfig/valuenode_vectorlength.cpp index 7eac3dd..5d85f98 100644 --- a/synfig-core/trunk/src/synfig/valuenode_vectorlength.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_vectorlength.cpp @@ -85,6 +85,9 @@ ValueNode_VectorLength::~ValueNode_VectorLength() ValueBase ValueNode_VectorLength::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return (*vector_)(t).get(Vector()).mag(); } diff --git a/synfig-core/trunk/src/synfig/valuenode_vectorx.cpp b/synfig-core/trunk/src/synfig/valuenode_vectorx.cpp index 6d60ba8..48f9180 100644 --- a/synfig-core/trunk/src/synfig/valuenode_vectorx.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_vectorx.cpp @@ -85,6 +85,9 @@ ValueNode_VectorX::~ValueNode_VectorX() ValueBase ValueNode_VectorX::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return (*vector_)(t).get(Vector())[0]; } diff --git a/synfig-core/trunk/src/synfig/valuenode_vectory.cpp b/synfig-core/trunk/src/synfig/valuenode_vectory.cpp index fe32229..4063eae 100644 --- a/synfig-core/trunk/src/synfig/valuenode_vectory.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_vectory.cpp @@ -85,6 +85,9 @@ ValueNode_VectorY::~ValueNode_VectorY() ValueBase ValueNode_VectorY::operator()(Time t)const { + if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS")) + printf("%s:%d operator()\n", __FILE__, __LINE__); + return (*vector_)(t).get(Vector())[1]; }