X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_radialcomposite.cpp;h=a889c78c2c509a3b906e7677db437ffad5053e21;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=6ab24e483c0af3804e8041769d8f9667700a67eb;hpb=c6b0c050710376d3cf99b7c083a7c47f1a0516c9;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp b/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp index 6ab24e4..a889c78 100644 --- a/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp @@ -6,7 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore +** Copyright (c) 2007, 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -35,6 +35,7 @@ #include #include "general.h" #include "color.h" +#include "savecanvas.h" #endif /* === U S I N G =========================================================== */ @@ -71,7 +72,7 @@ synfig::ValueNode_RadialComposite::ValueNode_RadialComposite(const ValueBase &va break; default: assert(0); - throw Exception::BadType(ValueBase::type_name(get_type())); + throw Exception::BadType(ValueBase::type_local_name(get_type())); } } @@ -95,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: @@ -213,7 +217,11 @@ ValueNode_RadialComposite::link_local_name(int i)const break; } - return etl::strprintf(_("C%d"),i+1); + assert(0); + // notice that Composite counts from 1 and Radial Composite counts + // from 0! we need to keep it like that to correctly load old + // animations, but let's not save "c%d" format link names in future + return etl::strprintf(_("C%d"),i); } @@ -222,6 +230,35 @@ ValueNode_RadialComposite::link_name(int i)const { assert(i>=0 && i= 0 && name[1]-'0' < link_count()) return name[1]-'0'; switch(get_type())