-** This software and associated documentation
-** are CONFIDENTIAL and PROPRIETARY property of
-** the above-mentioned copyright holder.
+** This package is free software; you can redistribute it and/or
+** modify it under the terms of the GNU General Public License as
+** published by the Free Software Foundation; either version 2 of
+** the License, or (at your option) any later version.
-** You may not copy, print, publish, or in any
-** other way distribute this software without
-** a prior written agreement with
-** the copyright holder.
+** This package is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+** General Public License for more details.
ACTION_SET_CATEGORY(Action::ActivepointSetSmart,Action::CATEGORY_ACTIVEPOINT);
ACTION_SET_PRIORITY(Action::ActivepointSetSmart,0);
ACTION_SET_VERSION(Action::ActivepointSetSmart,"0.0");
ACTION_SET_CATEGORY(Action::ActivepointSetSmart,Action::CATEGORY_ACTIVEPOINT);
ACTION_SET_PRIORITY(Action::ActivepointSetSmart,0);
ACTION_SET_VERSION(Action::ActivepointSetSmart,"0.0");
Action::ActivepointSetSmart::get_param_vocab()
{
ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
Action::ActivepointSetSmart::get_param_vocab()
{
ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
.set_local_name(_("ValueDesc"))
);
ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
.set_local_name(_("ValueDesc"))
);
{
ValueDesc value_desc(x.find("value_desc")->second.get_value_desc());
if(!value_desc.parent_is_value_node() || !ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node()))
{
ValueDesc value_desc(x.find("value_desc")->second.get_value_desc());
if(!value_desc.parent_is_value_node() || !ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node()))
return true;
}
if(name=="activepoint" && param.get_type()==Param::TYPE_ACTIVEPOINT && !time_set)
{
activepoint=param.get_activepoint();
return true;
}
if(name=="activepoint" && param.get_type()==Param::TYPE_ACTIVEPOINT && !time_set)
{
activepoint=param.get_activepoint();
if(!value_node || activepoint.get_time()==(Time::begin()-1))
return false;
return Action::CanvasSpecific::is_ready();
}
if(!value_node || activepoint.get_time()==(Time::begin()-1))
return false;
return Action::CanvasSpecific::is_ready();
}
// a activepoint. In this case, we need to calculate the value
// of the activepoint
void
Action::ActivepointSetSmart::calc_activepoint()
// a activepoint. In this case, we need to calculate the value
// of the activepoint
void
Action::ActivepointSetSmart::calc_activepoint()
/*
const Time time(activepoint.get_time());
activepoint.set_state(value_node->list[index].status_at_time(time));
/*
const Time time(activepoint.get_time());
activepoint.set_state(value_node->list[index].status_at_time(time));
try { value_node->list[index].find(keyframe.get_time()); }
catch(synfig::Exception::NotFound)
{
Action::Handle action(ActivepointAdd::create());
try { value_node->list[index].find(keyframe.get_time()); }
catch(synfig::Exception::NotFound)
{
Action::Handle action(ActivepointAdd::create());
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("value_desc",value_desc);
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("value_desc",value_desc);
tmp.set_state(true);
tmp.set_time(keyframe.get_time());
action->set_param("activepoint",tmp);
tmp.set_state(true);
tmp.set_time(keyframe.get_time());
action->set_param("activepoint",tmp);
try { value_node->list[index].find(keyframe.get_time()); }
catch(synfig::Exception::NotFound)
{
Action::Handle action(ActivepointAdd::create());
try { value_node->list[index].find(keyframe.get_time()); }
catch(synfig::Exception::NotFound)
{
Action::Handle action(ActivepointAdd::create());
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("value_desc",value_desc);
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("value_desc",value_desc);
tmp.set_state(true);
tmp.set_time(keyframe.get_time());
action->set_param("activepoint",tmp);
tmp.set_state(true);
tmp.set_time(keyframe.get_time());
action->set_param("activepoint",tmp);
// First, we need to to add any activepoints necessary to
// maintain the integrity of the keyframes.
enclose_activepoint(activepoint);
// First, we need to to add any activepoints necessary to
// maintain the integrity of the keyframes.
enclose_activepoint(activepoint);
// Then, lets try to replace the old activepoint, if it exists
enclose_activepoint(*value_node->list[index].find(activepoint));
Action::Handle action(ActivepointSet::create());
// Then, lets try to replace the old activepoint, if it exists
enclose_activepoint(*value_node->list[index].find(activepoint));
Action::Handle action(ActivepointSet::create());
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("value_desc",value_desc);
action->set_param("activepoint",activepoint);
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("value_desc",value_desc);
action->set_param("activepoint",activepoint);
activepoint.mimic(*value_node->list[index].find(activepoint.get_time()));
enclose_activepoint(*value_node->list[index].find(activepoint.get_time()));
activepoint.mimic(*value_node->list[index].find(activepoint.get_time()));
enclose_activepoint(*value_node->list[index].find(activepoint.get_time()));
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("value_desc",value_desc);
action->set_param("activepoint",activepoint);
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("value_desc",value_desc);
action->set_param("activepoint",activepoint);
try
{
// At this point we know that the old activepoint doesn't exist,
// so we need to create it.
Action::Handle action(ActivepointAdd::create());
try
{
// At this point we know that the old activepoint doesn't exist,
// so we need to create it.
Action::Handle action(ActivepointAdd::create());
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("value_desc",value_desc);
action->set_param("activepoint",activepoint);
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("value_desc",value_desc);
action->set_param("activepoint",activepoint);