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"))
);
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);