X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftags%2Fstable%2Fsrc%2Fsynfigapp%2Fvalue_desc.h;h=1bf94b28de077d0c0483f0d8c824c921b067bdf0;hb=47fce282611fbba1044921d22ca887f9b53ad91a;hp=7853335999091c24d8feb37527a772217dcc9093;hpb=f6184c2a9c2245aae802c31c8f3300e1b744359c;p=synfig.git diff --git a/synfig-studio/tags/stable/src/synfigapp/value_desc.h b/synfig-studio/tags/stable/src/synfigapp/value_desc.h index 7853335..1bf94b2 100644 --- a/synfig-studio/tags/stable/src/synfigapp/value_desc.h +++ b/synfig-studio/tags/stable/src/synfigapp/value_desc.h @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 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 @@ -143,7 +144,7 @@ public: if(parent_is_layer_param() && layer->dynamic_param_list().count(name)) return layer->dynamic_param_list().find(name)->second; if(parent_is_linkable_value_node()) - return synfig::LinkableValueNode::Handle::cast_reinterpret(parent_value_node)->get_link(index); + return (synfig::LinkableValueNode::Handle::cast_reinterpret(parent_value_node))->get_link(index); // return reinterpret_cast(parent_value_node.get())->get_link(index); return 0; } @@ -151,7 +152,8 @@ public: synfig::ValueBase get_value(synfig::Time time=0)const { - if(parent_is_value_node_const() && parent_value_node) + // if the value is constant, return that constant value (at *any* time, it doesn't matter which) + if(parent_is_value_node_const()) return (*parent_value_node)(0); if(is_value_node() && get_value_node()) return (*get_value_node())(time); @@ -174,6 +176,9 @@ public: { return is_value_node() && get_value_node()->is_exported(); } + + synfig::String + get_description(bool show_exported_name = true)const; }; // END of class ValueDesc }; // END of namespace synfigapp_instance