X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_gradientrotate.cpp;h=642856dcf2ed2b80533a9ef9b0f55d0ca812f2da;hb=1ba01d62f55407997aca33ed89d171ea7e5979d1;hp=fa43922345bff0e68a99fc0b4430029b6c92c6bc;hpb=b37086823c5bfee9c76f6b265584a414100963ef;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp index fa43922..642856d 100644 --- a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.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 @@ -73,7 +73,7 @@ ValueNode_GradientRotate::create(const ValueBase& x) if(id!=ValueBase::TYPE_GRADIENT) { assert(0); - throw runtime_error("synfig::ValueNode_GradientRotate:Bad type "+ValueBase::type_name(id)); + throw runtime_error(String(_("Gradient Rotate"))+_(":Bad type ")+ValueBase::type_local_name(id)); } ValueNode_GradientRotate* value_node=new ValueNode_GradientRotate(x.get(Gradient())); @@ -88,26 +88,6 @@ synfig::ValueNode_GradientRotate::~ValueNode_GradientRotate() unlink_all(); } -bool -synfig::ValueNode_GradientRotate::set_gradient(ValueNode::Handle a) -{ - if(a->get_type()!=ValueBase::TYPE_GRADIENT&& !PlaceholderValueNode::Handle::cast_dynamic(a)) - return false; - - ref_gradient=a; - - return true; -} - -bool -synfig::ValueNode_GradientRotate::set_offset(ValueNode::Handle b) -{ - if(b->get_type()!=ValueBase::TYPE_REAL&& !PlaceholderValueNode::Handle::cast_dynamic(b)) - return false; - ref_offset=b; - return true; -} - synfig::ValueBase synfig::ValueNode_GradientRotate::operator()(Time t)const { @@ -122,26 +102,23 @@ synfig::ValueNode_GradientRotate::operator()(Time t)const } bool -ValueNode_GradientRotate::set_link_vfunc(int i,ValueNode::Handle x) +ValueNode_GradientRotate::set_link_vfunc(int i,ValueNode::Handle value) { - assert(i>=0 && i<3); + assert(i>=0 && i=0 && i<3); + assert(i>=0 && i=0 && i<2); + assert(i>=0 && i=0 && i<2); + assert(i>=0 && i