bool Action::ActivepointSimpleAdd::set_param(const synfig::String& name, const Action::Param ¶m) { if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC) { ValueDesc value_desc(param.get_value_desc()); if(!value_desc.parent_is_value_node()) return false; value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node()); if(!value_node) return false; index=value_desc.get_index(); return true; } if(name=="activepoint" && param.get_type()==Param::TYPE_ACTIVEPOINT) { activepoint = param.get_activepoint(); return true; } return Action::CanvasSpecific::set_param(name,param); }
bool Action::ActivepointSetSmart::set_param(const synfig::String& name, const Action::Param ¶m) { if(name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC) { value_desc=param.get_value_desc(); if(!value_desc.parent_is_value_node()) return false; value_node=ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node()); if(!value_node) return false; index=value_desc.get_index(); if(time_set) calc_activepoint(); return true; } if(name=="activepoint" && param.get_type()==Param::TYPE_ACTIVEPOINT && !time_set) { activepoint=param.get_activepoint(); return true; } if(name=="time" && param.get_type()==Param::TYPE_TIME && activepoint.get_time()==Time::begin()-1) { activepoint.set_time(param.get_time()); time_set=true; if(value_node) calc_activepoint(); return true; } return Action::CanvasSpecific::set_param(name,param); return Action::CanvasSpecific::set_param(name,param); }