projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Small text change.
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
synfigapp
/
actions
/
valuedescconvert.cpp
diff --git
a/synfig-studio/trunk/src/synfigapp/actions/valuedescconvert.cpp
b/synfig-studio/trunk/src/synfigapp/actions/valuedescconvert.cpp
index
3911d7d
..
2d894a3
100644
(file)
--- a/
synfig-studio/trunk/src/synfigapp/actions/valuedescconvert.cpp
+++ b/
synfig-studio/trunk/src/synfigapp/actions/valuedescconvert.cpp
@@
-71,6
+71,7
@@
ACTION_SET_CVS_ID(Action::ValueDescConvert,"$Id$");
Action::ValueDescConvert::ValueDescConvert()
{
Action::ValueDescConvert::ValueDescConvert()
{
+ time=(Time::begin()-1);
}
Action::ParamVocab
}
Action::ParamVocab
@@
-87,6
+88,10
@@
Action::ValueDescConvert::get_param_vocab()
.set_desc(_("The type of ValueNode that you want to be converted to"))
);
.set_desc(_("The type of ValueNode that you want to be converted to"))
);
+ ret.push_back(ParamDesc("time",Param::TYPE_TIME)
+ .set_local_name(_("Time"))
+ );
+
return ret;
}
return ret;
}
@@
-113,6
+118,13
@@
Action::ValueDescConvert::set_param(const synfig::String& name, const Action::Pa
return true;
}
return true;
}
+ if(name=="time" && param.get_type()==Param::TYPE_TIME)
+ {
+ time=param.get_time();
+
+ return true;
+ }
+
return Action::CanvasSpecific::set_param(name,param);
}
return Action::CanvasSpecific::set_param(name,param);
}
@@
-121,6
+133,11
@@
Action::ValueDescConvert::is_ready()const
{
if(!value_desc || type.empty())
return false;
{
if(!value_desc || type.empty())
return false;
+ if(time==(Time::begin()-1))
+ {
+ synfig::error("Missing time");
+ return false;
+ }
return Action::CanvasSpecific::is_ready();
}
return Action::CanvasSpecific::is_ready();
}
@@
-134,7
+151,7
@@
Action::ValueDescConvert::prepare()
if(value_desc.is_const())
value=value_desc.get_value();
else if(value_desc.is_value_node())
if(value_desc.is_const())
value=value_desc.get_value();
else if(value_desc.is_value_node())
- value=(*value_desc.get_value_node())(
0
);
+ value=(*value_desc.get_value_node())(
time
);
else
throw Error(_("Unable to decipher ValueDesc (Bug?)"));
else
throw Error(_("Unable to decipher ValueDesc (Bug?)"));