From: dooglus Date: Thu, 7 Feb 2008 22:17:43 +0000 (+0000) Subject: Delete the 'encode_composite' function. Composite valuenodes are just a special... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fc6d3aabad27fd3b4cf95b4d9fafd96a91e9f640;p=synfig.git Delete the 'encode_composite' function. Composite valuenodes are just a special kind of Linkable valuenode and don't need special code to save them. git-svn-id: http://svn.voria.com/code@1620 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/savecanvas.cpp b/synfig-core/trunk/src/synfig/savecanvas.cpp index 299472b..d381c78 100644 --- a/synfig-core/trunk/src/synfig/savecanvas.cpp +++ b/synfig-core/trunk/src/synfig/savecanvas.cpp @@ -342,27 +342,6 @@ xmlpp::Element* encode_animated(xmlpp::Element* root,ValueNode_Animated::ConstHa return root; } -xmlpp::Element* encode_composite(xmlpp::Element* root,ValueNode_Composite::ConstHandle value_node,Canvas::ConstHandle canvas=0) -{ - assert(value_node); - root->set_name("composite"); - - root->set_attribute("type",ValueBase::type_name(value_node->get_type())); - - int i; - for(i=0;ilink_count();i++) - { - string name(value_node->link_name(i)); - assert(value_node->get_link(i)); - if(value_node->get_link(i)->is_exported()) - root->set_attribute(name,value_node->get_link(i)->get_relative_id(canvas)); - else - encode_value_node(root->add_child(name)->add_child("value_node"),value_node->get_link(i).constant(),canvas); - } - - return root; -} - xmlpp::Element* encode_subtract(xmlpp::Element* root,ValueNode_Subtract::ConstHandle value_node,Canvas::ConstHandle canvas=0) { assert(value_node); @@ -517,9 +496,6 @@ xmlpp::Element* encode_value_node(xmlpp::Element* root,ValueNode::ConstHandle va if(ValueNode_Animated::ConstHandle::cast_dynamic(value_node)) encode_animated(root,ValueNode_Animated::ConstHandle::cast_dynamic(value_node),canvas); else - if(ValueNode_Composite::ConstHandle::cast_dynamic(value_node)) - encode_composite(root,ValueNode_Composite::ConstHandle::cast_dynamic(value_node),canvas); - else if(ValueNode_Subtract::ConstHandle::cast_dynamic(value_node)) encode_subtract(root,ValueNode_Subtract::ConstHandle::cast_dynamic(value_node),canvas); else