X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_radialcomposite.cpp;h=fc6996df93bd289665e316a6dac2b2e916798d48;hb=6390167d6b2b1fdd04505017b8ec43b18ac167b8;hp=1cdf107b2ed8ade397e27771941efe3ba94060af;hpb=f5d927d1938b9ed5d896dba06ef0d8f232683eaf;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp b/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp index 1cdf107..fc6996d 100644 --- a/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_radialcomposite.cpp @@ -1,11 +1,12 @@ /* === S Y N F I G ========================================================= */ /*! \file valuenode_radialcomposite.cpp -** \brief Template File +** \brief Implementation of the "Radial Composite" valuenode conversion. ** ** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 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 @@ -70,7 +71,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())); } } @@ -140,8 +141,7 @@ ValueNode_RadialComposite::link_count()const bool ValueNode_RadialComposite::set_link_vfunc(int i,ValueNode::Handle x) { - assert(i>=0); - assert(i<6); + assert(i>=0 && iget_type()!=ValueBase::TYPE_REAL) return false; if(i==1 && x->get_type()!=ValueBase::TYPE_ANGLE) @@ -162,7 +161,6 @@ ValueNode_RadialComposite::set_link_vfunc(int i,ValueNode::Handle x) break; case ValueBase::TYPE_COLOR: - assert(i<4); if((i==0 || i==1 || i==3) && x->get_type()!=ValueBase::TYPE_REAL) return false; if((i==2) && x->get_type()!=ValueBase::TYPE_ANGLE) @@ -181,14 +179,16 @@ ValueNode_RadialComposite::set_link_vfunc(int i,ValueNode::Handle x) ValueNode::LooseHandle ValueNode_RadialComposite::get_link_vfunc(int i)const { - assert(i>=0 && i<6); + assert(i>=0 && i=0 && i<6); + assert(i>=0 && i=0 && i<5); + assert(i>=0 && i