projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't show the option of connecting to an existing Index parameter of the Duplicate...
[synfig.git]
/
synfig-studio
/
trunk
/
src
/
synfigapp
/
actions
/
valuedescset.cpp
diff --git
a/synfig-studio/trunk/src/synfigapp/actions/valuedescset.cpp
b/synfig-studio/trunk/src/synfigapp/actions/valuedescset.cpp
index
3bad053
..
ccbd1ae
100644
(file)
--- a/
synfig-studio/trunk/src/synfigapp/actions/valuedescset.cpp
+++ b/
synfig-studio/trunk/src/synfigapp/actions/valuedescset.cpp
@@
-6,6
+6,7
@@
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2007 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
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-41,6
+42,8
@@
#include <synfig/valuenode_reference.h>
#include <synfigapp/main.h>
#include <synfig/valuenode_reference.h>
#include <synfigapp/main.h>
+#include <synfigapp/general.h>
+
#endif
using namespace std;
#endif
using namespace std;
@@
-56,7
+59,7
@@
using namespace Action;
ACTION_INIT2(Action::ValueDescSet);
ACTION_SET_NAME(Action::ValueDescSet,"value_desc_set");
ACTION_INIT2(Action::ValueDescSet);
ACTION_SET_NAME(Action::ValueDescSet,"value_desc_set");
-ACTION_SET_LOCAL_NAME(Action::ValueDescSet,
"Set ValueDesc"
);
+ACTION_SET_LOCAL_NAME(Action::ValueDescSet,
N_("Set ValueDesc")
);
ACTION_SET_TASK(Action::ValueDescSet,"set");
ACTION_SET_CATEGORY(Action::ValueDescSet,Action::CATEGORY_VALUEDESC);
ACTION_SET_PRIORITY(Action::ValueDescSet,0);
ACTION_SET_TASK(Action::ValueDescSet,"set");
ACTION_SET_CATEGORY(Action::ValueDescSet,Action::CATEGORY_VALUEDESC);
ACTION_SET_PRIORITY(Action::ValueDescSet,0);
@@
-331,9
+334,14
@@
Action::ValueDescSet::prepare()
{
case ValueBase::TYPE_VECTOR:
{
{
case ValueBase::TYPE_VECTOR:
{
+ Angle old_angle = (*(ValueNode_RadialComposite::Handle::cast_dynamic(
+ value_desc.get_value_node())->get_link_vfunc(1)))(time).get(Angle());
Vector vect(value.get(Vector()));
components[0]=vect.mag();
Vector vect(value.get(Vector()));
components[0]=vect.mag();
- components[1]=Angle(Angle::tan(vect[1],vect[0]));
+ Angle change = Angle(Angle::tan(vect[1],vect[0])) - old_angle;
+ while (change < Angle::deg(-180)) change += Angle::deg(360);
+ while (change > Angle::deg(180)) change -= Angle::deg(360);
+ components[1]=old_angle + change;
n_components=2;
}
break;
n_components=2;
}
break;
@@
-345,7
+353,7
@@
Action::ValueDescSet::prepare()
n_components=4;
break;
default:
n_components=4;
break;
default:
- throw Error(
"Bad type for radial composite (%s)"
,ValueBase::type_name(value.get_type()).c_str());
+ throw Error(
_("Bad type for radial composite (%s)")
,ValueBase::type_name(value.get_type()).c_str());
break;
}
for(int i=0;i<n_components;i++)
break;
}
for(int i=0;i<n_components;i++)