new_font(family,style,weight);
invert=false;
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
Layer_Freetype::~Layer_Freetype()
calc_offset();
use_luma=false;
solid=false;
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
void
ceiling(1.0f),
floor(0.0f)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
inline Color
bline[1].set_width(1.0f);
sync();
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
inline Point
Import::Import()
{
time_offset=0;
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
Import::~Import()
IMPORT(time_offset);
if(param=="filename" && value.same_type_as(filename))
{
+ set_param_static(param, value.get_static());
if(!get_canvas())
{
filename=value.get(filename);
{
if(param=="filename")
{
+ ValueBase ret(ValueBase::TYPE_STRING);
+ ret.set_static(get_param_static(param));
string curpath(cleanup_path(absolute_path(get_canvas()->get_file_path())));
- return relative_path(curpath,abs_filename);
+ ret=relative_path(curpath,abs_filename);
+ return ret;
}
}
else
InsideOut::InsideOut():
origin(0,0)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
bailout=4;
lp=log(log(bailout));
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
IMPORT(smooth_outside);
IMPORT(broken);
+// TODO: Use IMPORT_PLUS
if(param=="iterations" && value.same_type_as(iterations))
{
iterations=value.get(iterations);
iterations=0;
if(iterations>500000)
iterations=500000;
+ set_param_static(param, value.get_static());
return true;
}
if(param=="bailout" && value.same_type_as(bailout))
bailout=value.get(bailout);
bailout*=bailout;
lp=log(log(bailout));
+ set_param_static(param, value.get_static());
return true;
}
EXPORT(broken);
if(param=="bailout")
- return sqrt(bailout);
+ {
+ ValueBase ret(sqrt(bailout));
+ ret.set_static(get_param_static(param));
+ return ret;
+ }
EXPORT_NAME();
EXPORT_VERSION();
bailout=4;
lp=log(log(bailout));
+
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
IMPORT(gradient_inside);
IMPORT(gradient_outside);
+// TODO: Use IMPORT_PLUS
if(param=="iterations" && value.same_type_as(iterations))
{
iterations=value.get(iterations);
iterations=0;
if(iterations>500000)
iterations=500000;
+ set_param_static(param, value.get_static());
return true;
}
if(param=="bailout" && value.same_type_as(bailout))
bailout=value.get(bailout);
bailout*=bailout;
lp=log(log(bailout));
+ set_param_static(param, value.get_static());
return true;
}
EXPORT(gradient_outside);
if(param=="bailout")
- return sqrt(bailout);
+ {
+ ValueBase ret(sqrt(bailout));
+ ret.set_static(get_param_static(param));
+ return ret;
+ }
EXPORT_NAME();
EXPORT_VERSION();
sin_val (0),
cos_val (1)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
Rotate::~Rotate()
amount=value.get(amount);
sin_val=Angle::sin(amount).get();
cos_val=Angle::cos(amount).get();
+ set_param_static(param, value.get_static());
return true;
}
origin(0.2,-0.2),
invert(false)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
type(TYPE_NORMAL),
clip(false)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
amount(1,1),
center(0,0)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
{
scanline=false;
alpha_aware=true;
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
link_time=0;
local_time=0;
duration=1;
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
Layer_TimeLoop::~Layer_TimeLoop()
Translate::Translate():origin(0,0)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
Translate::~Translate()
distort_inside(true),
distort_outside(false)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
{
sync();
horizon=4;
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
Warp::~Warp()
origin(0.125,0.125),
size(0.25,0.25)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
center(0,0),
amount(0)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
bevel(0),
bevCircle(0)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
centers.push_back(Point( 0, -1.5)); radii.push_back(2.5); weights.push_back(1);
centers.push_back(Point(-2, 1)); radii.push_back(2.5); weights.push_back(1);
centers.push_back(Point( 2, 1)); radii.push_back(2.5); weights.push_back(1);
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
center(0,0),
radius(0.5)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
size(0.1,0.1),
type(Blur::FASTGAUSSIAN)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
+ set_param_static("blend_method", true);
}
bool
contrast(1.0),
exposure(0.0)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
inline Color
if(param=="gamma" && value.get_type()==ValueBase::TYPE_REAL)
{
gamma.set_gamma(1.0/value.get(Real()));
+ set_param_static(param, value.get_static());
return true;
}
return false;
EXPORT(exposure);
if(param=="gamma")
- return 1.0/gamma.get_gamma();
+ {
+ ValueBase ret(1.0/gamma.get_gamma());
+ ret.set_static(get_param_static(param));
+ return ret;
+ }
EXPORT_NAME();
EXPORT_VERSION();
halftone.type=TYPE_SYMMETRIC;
set_blend_method(Color::BLEND_STRAIGHT);
+
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
inline Color
inverse_matrix[i][j]=(j==i)?1.0f:0.0f;
sync();
+
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
void
Layer_Composite (1.0,Color::BLEND_STRAIGHT)
{
set_blend_method(Color::BLEND_STRAIGHT);
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
size (0.2),
fade_out(false)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
+ set_param_static("blend_method",true);
}
RadialBlur::~RadialBlur()
color (Color::black()),
origin (Point(0.125,0.125)),
size (Point(0.25,0.25))
-{}
+{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
+}
inline bool
CheckerBoard::point_test(const synfig::Point& getpos)const
falloff (FALLOFF_INTERPOLATION_LINEAR)
{
constructcache();
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
bline=bline_point_list;
needs_sync=true;
+
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
expand(0),
invert(false)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
regular_polygon(false)
{
sync();
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
void
{
value.put(&radius1);
sync();
+ set_param_static(param, value.get_static());
return true;
}
{
value.put(&radius2);
sync();
+ set_param_static(param, value.get_static());
return true;
}
value.put(&points);
if(points<2)points=2;
sync();
+ set_param_static(param, value.get_static());
return true;
}
{
value.put(&angle);
sync();
+ set_param_static(param, value.get_static());
return true;
}
{
value.put(®ular_polygon);
sync();
+ set_param_static(param, value.get_static());
return true;
}
angle(Angle::zero()),
symmetric(false)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
bline_loop=true;
sync();
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
inline Color
zigzag(false)
{
sync();
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
inline Color
if(param=="p1" && value.same_type_as(p1))
{
p1=value.get(p1);
+ set_param_static(param, value.get_static());
sync();
return true;
}
if(param=="p2" && value.same_type_as(p2))
{
p2=value.get(p2);
+ set_param_static(param, value.get_static());
sync();
return true;
}
loop(false),
zigzag(false)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
angle(Angle::zero()),
clockwise(false)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
random.set_seed(time(NULL));
turbulent=false;
displacement=Vector(0.25,0.25);
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
inline Color
if(param=="seed" && value.same_type_as(int()))
{
random.set_seed(value.get(int()));
+ set_param_static(param, value.get_static());
return true;
}
IMPORT(size);
NoiseDistort::get_param(const String & param)const
{
if(param=="seed")
- return random.get_seed();
+ {
+ ValueBase ret(random.get_seed());
+ ret.set_static(get_param_static(param));
+ return ret;
+ }
EXPORT(size);
EXPORT(speed);
EXPORT(smooth);
displacement=Vector(1,1);
do_displacement=false;
super_sample=false;
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
if(param=="seed" && value.same_type_as(int()))
{
random.set_seed(value.get(int()));
+ set_param_static(param, value.get_static());
return true;
}
IMPORT(size);
Noise::get_param(const String & param)const
{
if(param=="seed")
- return random.get_seed();
+ {
+ ValueBase ret(random.get_seed());
+ ret.set_static(get_param_static(param));
+ return ret;
+ }
EXPORT(size);
EXPORT(speed);
EXPORT(smooth);
sync();
size_as_alpha=false;
reverse=true;
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
void
bline=value;
bline_loop=value.get_loop();
needs_sync_=true;
-
+ set_param_static(param, value.get_static());
return true;
}
if(param=="seed" && value.same_type_as(int()))
{
random.set_seed(value.get(int()));
needs_sync_=true;
+ set_param_static(param, value.get_static());
return true;
}
IMPORT(origin);
Plant::get_param(const String& param)const
{
if(param=="seed")
- return random.get_seed();
+ {
+ ValueBase ret(random.get_seed());
+ ret.set_static(get_param_static(param));
+ return ret;
+ }
EXPORT(bline);
EXPORT(origin);
EXPORT(split_angle);
Layer::Layer():
active_(true),
- z_depth_(0.0f),
- dirty_time_(Time::end())
+ z_depth(0.0f),
+ dirty_time_(Time::end())//,
+ //z_depth_static(false)
{
_LayerCounter::counter++;
+ Vocab vocab=get_param_vocab();
+ fill_static(vocab);
}
Layer::LooseHandle
bool
Layer::set_param(const String ¶m, const ValueBase &value)
{
- if(param=="z_depth" && value.same_type_as(z_depth_))
+ IMPORT(z_depth)
+ return false;
+}
+
+bool
+Layer::set_param_static(const String ¶m, const bool x)
+{
+ Sparams::iterator iter=static_params.find(param);
+ if(iter!=static_params.end())
{
- z_depth_=value.get(z_depth_);
+ iter->second=x;
return true;
}
return false;
}
+
+void Layer::fill_static(Vocab vocab)
+{
+ Vocab::const_iterator viter;
+ for(viter=vocab.begin();viter!=vocab.end();viter++)
+ {
+ if(static_params.find(viter->get_name())==static_params.end())
+ static_params.insert(make_pair(viter->get_name(),false));
+ }
+}
+
+
+bool
+Layer::get_param_static(const String ¶m) const
+{
+
+ Sparams::const_iterator iter=static_params.find(param);
+ if(iter!=static_params.end())
+ return iter->second;
+ return false;
+}
+
+
etl::handle<Transform>
Layer::get_transform()const
{
Layer::get_z_depth(const synfig::Time& t)const
{
if(!dynamic_param_list().count("z_depth"))
- return z_depth_;
+ return z_depth;
return (*dynamic_param_list().find("z_depth")->second)(t).get(Real());
}
Layer::get_param(const String & param)const
{
if(param=="z_depth")
- return get_z_depth();
-
+ {
+ synfig::ValueBase ret(get_z_depth());
+ ret.set_static(get_param_static(param));
+ return ret;
+ }
return ValueBase();
}
{
Layer::Vocab ret;
- ret.push_back(ParamDesc(z_depth_,"z_depth")
+ ret.push_back(ParamDesc(z_depth,"z_depth")
.set_local_name(_("Z Depth"))
.set_animation_only(true)
);
if (param==#x && value.same_type_as(x)) \
{ \
value.put(&x); \
+ set_param_static(#x,value.get_static()); \
{ \
y; \
} \
if (param==y && value.same_type_as(x)) \
{ \
value.put(&x); \
+ set_param_static(y,value.get_static()); \
return true; \
}
//! Exports a parameter 'x' if param is same type as given 'y'
#define EXPORT_AS(x,y) \
if (param==y) \
- return ValueBase(x);
+ { \
+ synfig::ValueBase ret(x); \
+ ret.set_static(get_param_static(y)); \
+ return ret; \
+ }
//! Exports a parameter if it is the same type as value
#define EXPORT(x) \
//! This is used as the category for layer book entries which represent aliases of layers.
//! It prevents these layers showing up in the menu.
#define CATEGORY_DO_NOT_USE "Do Not Use"
+/*
+//! x=variable name, y=static bool value
+#define SET_STATIC(x,y) \
+ if(param==#x && x ## _static != y) \
+ { \
+ x ## _static = y; \
+ return true; \
+ }
+
+#define GET_STATIC(x) \
+ if(param==#x) \
+ return x ## _static; \
+*/
/* === T Y P E D E F S ===================================================== */
String description_;
//! The depth parameter of the layer in the layer stack
- float z_depth_;
+ float z_depth;
+
+ //! True if zdepth is not affected when in animation mode
+ typedef std::map<String, bool> Sparams;
+ Sparams static_params;
//! \writeme
mutable Time dirty_time_;
int get_depth()const;
//! Gets the non animated z depth of the layer
- float get_z_depth()const { return z_depth_; }
+ float get_z_depth()const { return z_depth; }
//! Gets the z depth of the layer at a time t
float get_z_depth(const synfig::Time& t)const;
//! Sets the z depth of the layer (non animated)
- void set_z_depth(float x) { z_depth_=x; }
+ void set_z_depth(float x) { z_depth=x; }
//! Sets the Canvas that this Layer is a part of
void set_canvas(etl::loose_handle<Canvas> canvas);
*/
virtual bool set_param(const String ¶m, const ValueBase &value);
+ virtual bool set_param_static(const String ¶m, const bool x);
+ virtual bool get_param_static(const String ¶m) const;
+ virtual void fill_static(Vocab vocab);
+
//! Sets a list of parameters
virtual bool set_param_list(const ParamList &);
trimmed (false),
gamma_adjust (1.0)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
+ set_param_static("c", true);
}
bool
IMPORT(c);
if(param=="gamma_adjust"&& value.get_type()==ValueBase::TYPE_REAL)
{
+ set_param_static(param, value.get_static());
gamma_adjust=1.0/value.get(Real());
//gamma_adjust.set_gamma(1.0/value.get(Real()));
return true;
EXPORT(br);
EXPORT(c);
if(param=="gamma_adjust")
- return 1.0/gamma_adjust;
+ {
+ ValueBase ret(1.0/gamma_adjust);
+ ret.set_static(get_param_static(param));
+ return ret;
+ }
if(param=="_width")
{
- if (trimmed) return int(width);
- return surface.get_w();
+ ValueBase ret1(ValueBase::TYPE_INTEGER);
+ ret1=int(width);
+ ValueBase ret2(surface.get_w());
+ ret1.set_static(get_param_static(param));
+ ret2.set_static(get_param_static(param));
+ if (trimmed) return ret1;
+ return ret2;
}
if(param=="_height")
{
- if (trimmed) return int(height);
- return surface.get_h();
+ ValueBase ret1(ValueBase::TYPE_INTEGER);
+ ret1=int(height);
+ ValueBase ret2(surface.get_h());
+ ret1.set_static(get_param_static(param));
+ ret2.set_static(get_param_static(param));
+ if (trimmed) return ret1;
+ return ret2;
}
return Layer_Composite::get_param(param);
/* === P R O C E D U R E S ================================================= */
/* === M E T H O D S ======================================================= */
+Layer_Composite::Layer_Composite(float a, Color::BlendMethod bm):
+ amount (a),
+ blend_method (bm),
+ converted_blend_ (false),
+ transparent_color_ (false)
+ {
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
+ }
bool
Layer_Composite::accelerated_render(Context context,Surface *surface,int quality, const RendDesc &renddesc_, ProgressCallback *cb) const
{
RendDesc renddesc(renddesc_);
- if(!amount_)
+ if(!amount)
return context.accelerated_render(surface,quality,renddesc,cb);
CanvasBase image;
//! First fills the returning vocabulary with the ancestor class
Layer::Vocab ret(Layer::get_param_vocab());
//! Now inserts the two parameters that this layer knows.
- ret.push_back(ParamDesc(amount_,"amount")
+ ret.push_back(ParamDesc(amount,"amount")
.set_local_name(_("Amount"))
);
- ret.push_back(ParamDesc(blend_method_,"blend_method")
+ ret.push_back(ParamDesc(blend_method,"blend_method")
.set_local_name(_("Blend Method"))
);
bool
Layer_Composite::set_param(const String & param, const ValueBase &value)
{
- if(param=="amount" && value.same_type_as(amount_))
- amount_=value.get(amount_);
+ if(param=="amount" && value.same_type_as(amount))
+ {
+ amount=value.get(amount);
+ set_param_static(param,value.get_static());
+ }
else
if(param=="blend_method" && value.same_type_as(int()))
{
- blend_method_ = static_cast<Color::BlendMethod>(value.get(int()));
+ blend_method = static_cast<Color::BlendMethod>(value.get(int()));
+ set_param_static(param,value.get_static());
- if (blend_method_ < 0 || blend_method_ >= Color::BLEND_END)
+ if (blend_method < 0 || blend_method >= Color::BLEND_END)
{
- warning("illegal value (%d) for blend_method - using Composite instead", blend_method_);
- blend_method_ = Color::BLEND_COMPOSITE;
+ warning("illegal value (%d) for blend_method - using Composite instead", blend_method);
+ blend_method = Color::BLEND_COMPOSITE;
return false;
}
- if (blend_method_ == Color::BLEND_STRAIGHT && !reads_context())
+ if (blend_method == Color::BLEND_STRAIGHT && !reads_context())
{
Canvas::Handle canvas(get_canvas());
if (canvas)
version.c_str(), get_non_empty_description().c_str());
else
{
- blend_method_ = Color::BLEND_COMPOSITE;
+ blend_method = Color::BLEND_COMPOSITE;
converted_blend_ = true;
// if this layer has a transparent color, go back and set the color again
ValueBase
Layer_Composite::get_param(const String & param)const
{
+
//! First check if the parameter's string is known.
if(param=="amount")
- return get_amount();
+ {
+ synfig::ValueBase ret(get_amount());
+ ret.set_static(get_param_static(param));
+ return ret;
+ }
if(param=="blend_method")
- return static_cast<int>(get_blend_method());
+ {
+ synfig::ValueBase ret(static_cast<int>(get_blend_method()));
+ ret.set_static(get_param_static(param));
+ return ret;
+ }
//! If it is unknown then call the ancestor's get param member
//! to see if it can handle that parameter's string.
return Layer::get_param(param);
{
private:
//! The amount of composite
- float amount_;
+ float amount;
//! The blend method for the composition
- Color::BlendMethod blend_method_;
+ Color::BlendMethod blend_method;
protected:
//! Default constructor. Not used directly.
- Layer_Composite(
- float amount=1.0,
- Color::BlendMethod blend_method=Color::BLEND_COMPOSITE
- ):
- amount_ (amount),
- blend_method_ (blend_method),
- converted_blend_ (false),
- transparent_color_ (false)
- { }
+ Layer_Composite(float amount=1.0, Color::BlendMethod blend_method=Color::BLEND_COMPOSITE);
+
//! Converted blend is used to check if an old version of canvas
//! is used in the composition. Old Straight was used as new Composite
//! \todo verify this
public:
//! Gets the amount of the layer
- float get_amount()const { return amount_; }
+ float get_amount()const { return amount; }
//! Sets the amount of the layer and returns this layer
- Layer_Composite& set_amount(float x) { amount_=x; return *this; }
+ Layer_Composite& set_amount(float x) { amount=x; return *this; }
//! Gets the blend method of the layer
- Color::BlendMethod get_blend_method()const { return blend_method_; }
+ Color::BlendMethod get_blend_method()const { return blend_method; }
//! Sets the blend method of the layer and returns this layer
- Layer_Composite& set_blend_method(Color::BlendMethod x) { blend_method_=x; return *this; }
+ Layer_Composite& set_blend_method(Color::BlendMethod x) { blend_method=x; return *this; }
//! Returns true is amount is 1 and blend method is straight
- virtual bool is_solid_color()const { return amount_==1.0f && blend_method_==Color::BLEND_STRAIGHT; }
+ virtual bool is_solid_color()const { return amount==1.0f && blend_method==Color::BLEND_STRAIGHT; }
//! Returns true if the amount is zero.
- bool is_disabled()const { return amount_==0.0f; }
+ bool is_disabled()const { return amount==0.0f; }
//! Gets the parameter vocabulary. To be overrided by the derived.
virtual Vocab get_param_vocab()const;
//! Sets the value for the given parameter.
subsample_start (0.0),
subsample_end (1.0)
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
children_lock=false;
muck_with_time_=true;
curr_time=Time::begin();
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
+ set_param_static("children_lock", true);
}
Layer_PasteCanvas::~Layer_PasteCanvas()
if(param=="canvas" && value.same_type_as(Canvas::Handle()))
{
set_sub_canvas(value.get(Canvas::Handle()));
+ set_param_static(param, value.get_static());
return true;
}
-
//! \todo this introduces bug 1844764 if enabled; it was introduced in r954.
// http://synfig.org/images/3/3d/Moving-waypoints.sifz is an
// example of an animation that has its waypoints displayed
Layer::get_times_vfunc(set);
}
+
+
+bool
+Layer_PasteCanvas::set_param_static(const String ¶m, const bool x)
+{
+ return Layer_Composite::set_param_static(param, x);
+}
+
+
+bool
+Layer_PasteCanvas::get_param_static(const String ¶m) const
+{
+ return Layer_Composite::get_param_static(param);
+}
virtual bool set_param(const String & param, const synfig::ValueBase &value);
//! Get the value of the specified parameter. \see Layer::get_param
virtual ValueBase get_param(const String & param)const;
+ virtual bool set_param_static(const String ¶m, const bool x);
+ virtual bool get_param_static(const String ¶m) const;
//! Gets the blend color of the Layer in the context at \a pos
virtual Color get_color(Context context, const Point &pos)const;
//! Sets the time of the Paste Canvas Layer and those under it
vector_list.push_back(Point(-0.333333,0));
vector_list.push_back(Point(0.333333,0));
sync();
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
Layer_Polygon::~Layer_Polygon()
Layer_Composite(1.0,Color::BLEND_COMPOSITE),
color(Color::black())
{
+ Layer::Vocab voc(get_param_vocab());
+ Layer::fill_static(voc);
}
bool
return Angle::deg(atof(val.c_str()));
}
+bool
+CanvasParser::parse_static(xmlpp::Element *element)
+{
+ if(!element->get_attribute("static"))
+ return false;
+
+ string val=element->get_attribute("static")->get_value();
+
+ if(val=="true" || val=="1")
+ return true;
+ if(val=="false" || val=="0")
+ return false;
+
+ error(element,strprintf(_("Bad value \"%s\" in <%s>"),val.c_str(),"bool"));
+
+ return false;
+}
+
+
ValueBase
CanvasParser::parse_value(xmlpp::Element *element,Canvas::Handle canvas)
{
if(element->get_name()=="real")
- return parse_real(element);
+ {
+ ValueBase ret;
+ ret.set(parse_real(element));
+ ret.set_static(parse_static(element));
+ return ret;
+ }
else
if(element->get_name()=="time")
- return parse_time(element,canvas);
+ {
+ ValueBase ret;
+ ret.set(parse_time(element,canvas));
+ ret.set_static(parse_static(element));
+ return ret;
+ }
else
if(element->get_name()=="integer")
- return parse_integer(element);
+ {
+ ValueBase ret;
+ ret.set(parse_integer(element));
+ ret.set_static(parse_static(element));
+ return ret;
+ }
else
if(element->get_name()=="string")
- return parse_string(element);
+ {
+ ValueBase ret;
+ ret.set(parse_string(element));
+ ret.set_static(parse_static(element));
+ return ret;
+ }
else
if(element->get_name()=="vector")
- return parse_vector(element);
+ {
+ ValueBase ret;
+ ret.set(parse_vector(element));
+ ret.set_static(parse_static(element));
+ return ret;
+ }
else
if(element->get_name()=="color")
- return parse_color(element);
+ {
+ ValueBase ret;
+ ret.set(parse_color(element));
+ ret.set_static(parse_static(element));
+ return ret;
+ }
else
if(element->get_name()=="segment")
- return parse_segment(element);
+ {
+ ValueBase ret;
+ ret.set(parse_segment(element));
+ ret.set_static(parse_static(element));
+ return ret;
+ }
else
if(element->get_name()=="list")
return parse_list(element,canvas);
else
if(element->get_name()=="gradient")
- return parse_gradient(element);
+ {
+ ValueBase ret;
+ ret.set(parse_gradient(element));
+ ret.set_static(parse_static(element));
+ return ret;
+ }
else
if(element->get_name()=="bool")
- return parse_bool(element);
+ {
+ ValueBase ret;
+ ret.set(parse_bool(element));
+ ret.set_static(parse_static(element));
+ return ret;
+ }
else
- //if(element->get_name()=="canvas")
- // return parse_canvas(element,canvas,true); // inline canvas
- //else
if(element->get_name()=="angle" || element->get_name()=="degrees" || element->get_name()=="radians" || element->get_name()=="rotations")
- return parse_angle(element);
- else
+ {
+ ValueBase ret;
+ ret.set(parse_angle(element));
+ ret.set_static(parse_static(element));
+ return ret;
+ } else
if(element->get_name()=="bline_point")
return parse_bline_point(element);
else
if(element->get_name()=="canvas")
- return ValueBase(parse_canvas(element,canvas,true));
+ {
+ ValueBase ret;
+ ret.set(parse_canvas(element,canvas,true));
+ ret.set_static(parse_static(element));
+ return ret;
+ }
else
{
error_unexpected_element(element,element->get_name());
if(!c) error((*iter),strprintf(_("Failed to load subcanvas '%s'"), str.c_str()));
if(!layer->set_param(param_name,c))
error((*iter),_("Layer rejected canvas link"));
+ //Parse the static option and sets it to the canvas ValueBase
+ layer->set_param_static(param_name, parse_static(child));
}
else
try
//! Dynamic List Parsnig Function
etl::handle<ValueNode_DynamicList> parse_dynamic_list(xmlpp::Element *node,Canvas::Handle canvas);
+ //! Static option for ValueBase parsing fucntion
+ bool parse_static(xmlpp::Element *node);
+
}; // END of CanvasParser
/* === E X T E R N S ======================================================= */
return root;
}
+xmlpp::Element* encode_static(xmlpp::Element* root,bool s)
+{
+ if(s)
+ root->set_attribute("static", s?"true":"false");
+ return root;
+}
-xmlpp::Element* encode_real(xmlpp::Element* root,Real v)
+
+xmlpp::Element* encode_real(xmlpp::Element* root,Real v,bool s=false)
{
root->set_name("real");
- root->set_attribute("value",strprintf(VECTOR_VALUE_TYPE_FORMAT,v));
+ root->set_attribute("value",strprintf(VECTOR_VALUE_TYPE_FORMAT,v));
+ encode_static(root, s);
return root;
}
-xmlpp::Element* encode_time(xmlpp::Element* root,Time t)
+xmlpp::Element* encode_time(xmlpp::Element* root,Time t,bool s=false)
{
root->set_name("time");
- root->set_attribute("value",t.get_string());
+ root->set_attribute("value",t.get_string());
+ encode_static(root, s);
return root;
}
-xmlpp::Element* encode_integer(xmlpp::Element* root,int i)
+xmlpp::Element* encode_integer(xmlpp::Element* root,int i,bool s=false)
{
root->set_name("integer");
root->set_attribute("value",strprintf("%i",i));
+ encode_static(root, s);
return root;
}
-xmlpp::Element* encode_bool(xmlpp::Element* root,bool b)
+xmlpp::Element* encode_bool(xmlpp::Element* root, bool b,bool s=false)
{
root->set_name("bool");
root->set_attribute("value",b?"true":"false");
+ encode_static(root, s);
return root;
}
-xmlpp::Element* encode_string(xmlpp::Element* root,const String &str)
+xmlpp::Element* encode_string(xmlpp::Element* root,const String &str,bool s=false)
{
root->set_name("string");
root->set_child_text(str);
+ encode_static(root, s);
return root;
}
-xmlpp::Element* encode_vector(xmlpp::Element* root,Vector vect)
+xmlpp::Element* encode_vector(xmlpp::Element* root,Vector vect,bool s=false)
{
root->set_name("vector");
root->add_child("x")->set_child_text(strprintf(VECTOR_VALUE_TYPE_FORMAT,(float)vect[0]));
root->add_child("y")->set_child_text(strprintf(VECTOR_VALUE_TYPE_FORMAT,(float)vect[1]));
+ encode_static(root, s);
return root;
}
-xmlpp::Element* encode_color(xmlpp::Element* root,Color color)
+xmlpp::Element* encode_color(xmlpp::Element* root,Color color,bool s=false)
{
root->set_name("color");
root->add_child("r")->set_child_text(strprintf(COLOR_VALUE_TYPE_FORMAT,(float)color.get_r()));
root->add_child("g")->set_child_text(strprintf(COLOR_VALUE_TYPE_FORMAT,(float)color.get_g()));
root->add_child("b")->set_child_text(strprintf(COLOR_VALUE_TYPE_FORMAT,(float)color.get_b()));
root->add_child("a")->set_child_text(strprintf(COLOR_VALUE_TYPE_FORMAT,(float)color.get_a()));
+ encode_static(root, s);
return root;
}
-xmlpp::Element* encode_angle(xmlpp::Element* root,Angle theta)
+xmlpp::Element* encode_angle(xmlpp::Element* root,Angle theta,bool s=false)
{
root->set_name("angle");
root->set_attribute("value",strprintf("%f",(float)Angle::deg(theta).get()));
+ encode_static(root, s);
return root;
}
-xmlpp::Element* encode_segment(xmlpp::Element* root,Segment seg)
+xmlpp::Element* encode_segment(xmlpp::Element* root,Segment seg,bool s=false)
{
root->set_name("segment");
encode_vector(root->add_child("p1")->add_child("vector"),seg.p1);
encode_vector(root->add_child("t1")->add_child("vector"),seg.t1);
encode_vector(root->add_child("p2")->add_child("vector"),seg.p2);
encode_vector(root->add_child("t2")->add_child("vector"),seg.t2);
+ encode_static(root, s);
return root;
}
return root;
}
-xmlpp::Element* encode_gradient(xmlpp::Element* root,Gradient x)
+xmlpp::Element* encode_gradient(xmlpp::Element* root,Gradient x,bool s=false)
{
root->set_name("gradient");
-
+ encode_static(root, s);
Gradient::const_iterator iter;
x.sort();
for(iter=x.begin();iter!=x.end();iter++)
switch(data.get_type())
{
case ValueBase::TYPE_REAL:
- return encode_real(root,data.get(Real()));
+ return encode_real(root,data.get(Real()), data.get_static());
case ValueBase::TYPE_TIME:
- return encode_time(root,data.get(Time()));
+ return encode_time(root,data.get(Time()), data.get_static());
case ValueBase::TYPE_INTEGER:
- return encode_integer(root,data.get(int()));
+ return encode_integer(root,data.get(int()), data.get_static());
case ValueBase::TYPE_COLOR:
- return encode_color(root,data.get(Color()));
+ return encode_color(root,data.get(Color()), data.get_static());
case ValueBase::TYPE_VECTOR:
- return encode_vector(root,data.get(Vector()));
+ return encode_vector(root,data.get(Vector()), data.get_static());
case ValueBase::TYPE_ANGLE:
- return encode_angle(root,data.get(Angle()));
+ return encode_angle(root,data.get(Angle()), data.get_static());
case ValueBase::TYPE_BOOL:
- return encode_bool(root,data.get(bool()));
+ return encode_bool(root,data.get(bool()), data.get_static());
case ValueBase::TYPE_STRING:
- return encode_string(root,data.get(String()));
+ return encode_string(root,data.get(String()), data.get_static());
case ValueBase::TYPE_SEGMENT:
- return encode_segment(root,data.get(Segment()));
+ return encode_segment(root,data.get(Segment()), data.get_static());
case ValueBase::TYPE_BLINEPOINT:
return encode_bline_point(root,data.get(BLinePoint()));
case ValueBase::TYPE_GRADIENT:
- return encode_gradient(root,data.get(Gradient()));
+ return encode_gradient(root,data.get(Gradient()), data.get_static());
case ValueBase::TYPE_LIST:
return encode_list(root,data,canvas);
case ValueBase::TYPE_CANVAS:
xmlpp::Element *node=root->add_child("param");
node->set_attribute("name",iter->get_name());
node->set_attribute("use",child->get_relative_id(layer->get_canvas()));
+ if(value.get_static())
+ node->set_attribute("static", value.get_static()?"true":"false");
continue;
}
}
/* === M E T H O D S ======================================================= */
-ValueBase::ValueBase():type(TYPE_NIL),data(0),ref_count(0),loop_(0)
+ValueBase::ValueBase():type(TYPE_NIL),data(0),ref_count(0),loop_(0),static_(0)
{
}
ValueBase::ValueBase(Type x):
type(x),
data(0),
- loop_(0)
+ loop_(0),
+ static_(0)
{
switch(type)
{
ref_count=x.ref_count;
}
loop_=x.loop_;
+ static_=x.static_;
return *this;
}
etl::reference_counter ref_count;
//! For Values with loop option like TYPE_LIST
bool loop_;
+ //! For Values of Constant Value Nodes
+ bool static_;
/*
-- ** -- C O N S T R U C T O R S -----------------------------------
//! Template constructor for any type
template <typename T>
- ValueBase(const T &x, bool loop_=false):
- type(TYPE_NIL),data(0),ref_count(0),loop_(loop_)
+ ValueBase(const T &x, bool loop_=false, bool static_=false):
+ type(TYPE_NIL),data(0),ref_count(0),loop_(loop_), static_(static_)
{ set(x); }
//! Copy constructor. The data is not copied, just the type.
//! Sets the loop option.
void set_loop(bool x) { loop_=x; }
+ //! Gets the static option.
+ bool get_static()const { return static_; }
+
+ //! Sets the static option.
+ void set_static(bool x) { static_=x; }
+
//! True if the Value is not valid or is type LIST and is empty
bool empty()const;
String
ValueNode_Const::get_name()const
{
- return "constant";
+ return get_static()?"static":"constant";
}
String
ValueNode_Const::get_local_name()const
{
- return _("Constant");
+ return get_static()?_("Static"):_("Constant");
}
void ValueNode_Const::get_times_vfunc(Node::time_set &/*set*/) const
ValueBase &get_value();
void set_value(const ValueBase &data);
-
+ bool get_static()const {return get_value().get_static();}
+ void set_static(bool x) { get_value().set_static(x); }
virtual String get_name()const;
virtual String get_local_name()const;
if(column==model.type.index())
{
synfigapp::ValueDesc value_desc((*iter)[model.value_desc]);
+ String stype, lname;
Glib::Value<Glib::ustring> x;
g_value_init(x.gobj(),x.value_type());
}
else
{
- if(!value_desc.is_value_node() || value_desc.get_value_node()->get_name()=="constant")
+ stype=ValueBase::type_local_name(value_desc.get_value_type());
+ if(value_desc.get_value_node())
{
- x.set(ValueBase::type_local_name(value_desc.get_value_type()));
+ lname=value_desc.get_value_node()->get_name();
+ if (lname=="animated" || lname=="static")
+ stype+=" (" + value_desc.get_value_node()->get_local_name() + ")";
}
- else
+ else if(value_desc.parent_is_layer_param())
{
- x.set(value_desc.get_value_node()->get_local_name());
+ if(value_desc.get_value().get_static())
+ stype+=_(" (Static)");
}
}
-
+ x.set(stype.c_str());
g_value_init(value.gobj(),x.value_type());
g_value_copy(x.gobj(),value.gobj());
}
actions/layerparamconnect.h \
actions/layerparamdisconnect.h \
actions/layerparamset.h \
+ actions/layerparamsetstatic.h\
+ actions/layerparamunsetstatic.h\
actions/layerraise.h \
actions/layerremove.h \
actions/layersetdesc.h
actions/layerparamconnect.cpp \
actions/layerparamdisconnect.cpp \
actions/layerparamset.cpp \
+ actions/layerparamsetstatic.cpp\
+ actions/layerparamunsetstatic.cpp\
actions/layerraise.cpp \
actions/layerremove.cpp \
actions/layersetdesc.cpp
VALUENODE_ACTION_HH = \
actions/valuenodeadd.h \
actions/valuenodeconstset.h \
+ actions/valuenodeconstsetstatic.h\
+ actions/valuenodeconstunsetstatic.h\
actions/valuenodedynamiclistinsert.h \
actions/valuenodedynamiclistinsertsmart.h \
actions/valuenodedynamiclistloop.h \
VALUENODE_ACTION_CC = \
actions/valuenodeadd.cpp \
actions/valuenodeconstset.cpp \
+ actions/valuenodeconstsetstatic.cpp\
+ actions/valuenodeconstunsetstatic.cpp\
actions/valuenodedynamiclistinsert.cpp \
actions/valuenodedynamiclistinsertsmart.cpp \
actions/valuenodedynamiclistloop.cpp \
#include "actions/layeradd.h"
#include "actions/layeractivate.h"
#include "actions/layerparamset.h"
+#include "actions/layerparamsetstatic.h"
+#include "actions/layerparamunsetstatic.h"
#include "actions/layerparamconnect.h"
#include "actions/layerparamdisconnect.h"
#include "actions/layerencapsulate.h"
#include "actions/layersetdesc.h"
#include "actions/valuenodeconstset.h"
+#include "actions/valuenodeconstsetstatic.h"
+#include "actions/valuenodeconstunsetstatic.h"
#include "actions/valuenodeadd.h"
#include "actions/valuenodereplace.h"
#include "actions/valuenodelinkconnect.h"
ADD_ACTION(Action::LayerAdd);
ADD_ACTION(Action::LayerActivate);
ADD_ACTION(Action::LayerParamSet);
+ ADD_ACTION(Action::LayerParamSetStatic);
+ ADD_ACTION(Action::LayerParamUnSetStatic);
ADD_ACTION(Action::LayerParamConnect);
ADD_ACTION(Action::LayerParamDisconnect);
ADD_ACTION(Action::LayerEncapsulate);
ADD_ACTION(Action::LayerSetDesc);
ADD_ACTION(Action::ValueNodeConstSet);
+ ADD_ACTION(Action::ValueNodeConstSetStatic);
+ ADD_ACTION(Action::ValueNodeConstUnSetStatic);
ADD_ACTION(Action::ValueNodeAdd);
ADD_ACTION(Action::ValueNodeReplace);
ADD_ACTION(Action::ValueNodeLinkConnect);
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file layerparamsetstatic.cpp
+** \brief Template File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2010 Carlos López
+**
+** 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.
+**
+** 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.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#ifdef USING_PCH
+# include "pch.h"
+#else
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "layerparamsetstatic.h"
+#include <synfigapp/canvasinterface.h>
+
+#include <synfigapp/general.h>
+
+#endif
+
+using namespace std;
+using namespace etl;
+using namespace synfig;
+using namespace synfigapp;
+using namespace Action;
+
+/* === M A C R O S ========================================================= */
+
+ACTION_INIT(Action::LayerParamSetStatic);
+ACTION_SET_NAME(Action::LayerParamSetStatic,"LayerParamSetStatic");
+ACTION_SET_LOCAL_NAME(Action::LayerParamSetStatic,N_("Set Static"));
+ACTION_SET_TASK(Action::LayerParamSetStatic,"setstatic");
+ACTION_SET_CATEGORY(Action::LayerParamSetStatic,Action::CATEGORY_VALUEDESC);
+ACTION_SET_PRIORITY(Action::LayerParamSetStatic,0);
+ACTION_SET_VERSION(Action::LayerParamSetStatic,"0.0");
+ACTION_SET_CVS_ID(Action::LayerParamSetStatic,"$Id$");
+
+/* === G L O B A L S ======================================================= */
+
+/* === P R O C E D U R E S ================================================= */
+
+/* === M E T H O D S ======================================================= */
+
+Action::LayerParamSetStatic::LayerParamSetStatic()
+{
+}
+
+Action::ParamVocab
+Action::LayerParamSetStatic::get_param_vocab()
+{
+ ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
+
+ ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
+ .set_local_name(_("Value Desc"))
+ );
+
+ return ret;
+}
+
+bool
+Action::LayerParamSetStatic::is_candidate(const ParamList &x)
+{
+ if(!candidate_check(get_param_vocab(),x))
+ return false;
+
+ ValueDesc value_desc(x.find("value_desc")->second.get_value_desc());
+
+ if(!value_desc.parent_is_layer_param())
+ return false;
+
+ synfig::ValueBase parameter;
+ synfig::Layer::Handle _layer;
+ synfig::String _param_name;
+ _layer = value_desc.get_layer();
+ _param_name = value_desc.get_param_name();
+
+ if(!_layer || _param_name.empty())
+ return false;
+
+ //!Check that the parameter is not Value Node (Const, Animated or Linkable)
+ if(_layer->dynamic_param_list().count(_param_name))
+ return false;
+ //! Retrieves the current parameter
+ parameter = _layer->get_param(_param_name);
+ //! Check that the parameter is not a inline canvas
+ if(parameter.get_type()==ValueBase::TYPE_CANVAS && parameter.get(Canvas::Handle()))
+ if(parameter.get(Canvas::Handle())->is_inline())
+ return false;
+ //! Check if it is already static
+ if(parameter.get_static())
+ return false;
+
+ return true;
+
+}
+
+bool
+Action::LayerParamSetStatic::set_param(const synfig::String& name, const Action::Param ¶m)
+{
+
+ if(!layer && name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
+ {
+ ValueDesc value_desc(param.get_value_desc());
+ if(!value_desc.parent_is_layer_param())
+ return false;
+
+ layer=Layer::Handle::cast_dynamic(value_desc.get_layer());
+
+ if(!layer)
+ return false;
+ }
+
+
+ if(param_name.empty() && name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
+ {
+ ValueDesc value_desc(param.get_value_desc());
+ if(!value_desc.parent_is_layer_param())
+ return false;
+
+ param_name=value_desc.get_param_name();
+
+ if(param_name.empty())
+ return false;
+ }
+
+ return Action::CanvasSpecific::set_param(name,param);
+}
+
+bool
+Action::LayerParamSetStatic::is_ready()const
+{
+ if(!layer || param_name.empty())
+ return false;
+
+ return Action::CanvasSpecific::is_ready();
+}
+
+void
+Action::LayerParamSetStatic::perform()
+{
+ //! See if the parameter is dynamic
+ if(layer->dynamic_param_list().count(param_name))
+ throw Error(_("This action is not for Value Nodes!"));
+
+ old_static_value=layer->get_param_static(param_name);
+
+ if(!layer->set_param_static(param_name,true))
+ throw Error(_("Layer did not accept static value."));
+
+ //! Signal layer changed
+ layer->changed();
+ //! Signal that a layer parameter changed
+ if(get_canvas_interface())
+ get_canvas_interface()->signal_layer_param_changed()(layer,param_name);
+}
+
+void
+Action::LayerParamSetStatic::undo()
+{
+ if(!layer->set_param_static(param_name,old_static_value))
+ throw Error(_("Layer did not accept static value."));
+ //! Signal layer changed
+ layer->changed();
+ //! Signal that a layer parameter changed
+ if(get_canvas_interface())
+ get_canvas_interface()->signal_layer_param_changed()(layer,param_name);
+}
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file layerparamsetstatic.h
+** \brief Template File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2010 Carlos López
+**
+** 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.
+**
+** 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.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG_APP_ACTION_LAYERPARAMSETSTATIC_H
+#define __SYNFIG_APP_ACTION_LAYERPARAMSETSTATIC_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <synfig/layer.h>
+#include <synfigapp/action.h>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+namespace synfigapp {
+
+class Instance;
+
+namespace Action {
+
+class LayerParamSetStatic :
+ public Undoable,
+ public CanvasSpecific
+{
+private:
+
+ synfig::Layer::Handle layer;
+ synfig::String param_name;
+ bool old_static_value;
+
+
+public:
+
+ LayerParamSetStatic();
+
+ static ParamVocab get_param_vocab();
+ static bool is_candidate(const ParamList &x);
+
+ virtual bool set_param(const synfig::String& name, const Param &);
+ virtual bool is_ready()const;
+
+ virtual void perform();
+ virtual void undo();
+
+ ACTION_MODULE_EXT
+};
+
+}; // END of namespace action
+}; // END of namespace studio
+
+/* === E N D =============================================================== */
+
+#endif
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file layerparamunsetstatic.cpp
+** \brief Template File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2010 Carlos López
+**
+** 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.
+**
+** 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.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#ifdef USING_PCH
+# include "pch.h"
+#else
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "layerparamunsetstatic.h"
+#include <synfigapp/canvasinterface.h>
+
+#include <synfigapp/general.h>
+
+#endif
+
+using namespace std;
+using namespace etl;
+using namespace synfig;
+using namespace synfigapp;
+using namespace Action;
+
+/* === M A C R O S ========================================================= */
+
+ACTION_INIT(Action::LayerParamUnSetStatic);
+ACTION_SET_NAME(Action::LayerParamUnSetStatic,"LayerParamUnSetStatic");
+ACTION_SET_LOCAL_NAME(Action::LayerParamUnSetStatic,N_("UnSet Static"));
+ACTION_SET_TASK(Action::LayerParamUnSetStatic,"unsetstatic");
+ACTION_SET_CATEGORY(Action::LayerParamUnSetStatic,Action::CATEGORY_VALUEDESC);
+ACTION_SET_PRIORITY(Action::LayerParamUnSetStatic,0);
+ACTION_SET_VERSION(Action::LayerParamUnSetStatic,"0.0");
+ACTION_SET_CVS_ID(Action::LayerParamUnSetStatic,"$Id$");
+
+/* === G L O B A L S ======================================================= */
+
+/* === P R O C E D U R E S ================================================= */
+
+/* === M E T H O D S ======================================================= */
+
+Action::LayerParamUnSetStatic::LayerParamUnSetStatic()
+{
+}
+
+Action::ParamVocab
+Action::LayerParamUnSetStatic::get_param_vocab()
+{
+ ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
+
+ ret.push_back(ParamDesc("value_desc",Param::TYPE_VALUEDESC)
+ .set_local_name(_("Value Desc"))
+ );
+
+ return ret;
+}
+
+bool
+Action::LayerParamUnSetStatic::is_candidate(const ParamList &x)
+{
+ if(!candidate_check(get_param_vocab(),x))
+ return false;
+
+ ValueDesc value_desc(x.find("value_desc")->second.get_value_desc());
+
+ if(!value_desc.parent_is_layer_param())
+ return false;
+
+ synfig::ValueBase parameter;
+ synfig::Layer::Handle _layer;
+ synfig::String _param_name;
+ _layer = value_desc.get_layer();
+ _param_name = value_desc.get_param_name();
+
+ if(!_layer || _param_name.empty())
+ return false;
+
+ //!Check that the parameter is not Value Node (Const, Animated or Linkable)
+ if(_layer->dynamic_param_list().count(_param_name))
+ return false;
+
+ //! Retrieves the current parameter
+ parameter = _layer->get_param(_param_name);
+ //! Check that the parameter is not a inline canvas
+ if(parameter.get_type()==ValueBase::TYPE_CANVAS)
+ if(parameter.get(Canvas::Handle())->is_inline() && parameter.get(Canvas::Handle()))
+ return false;
+ //! Check if it is not static
+ if(!parameter.get_static())
+ return false;
+
+ return true;
+
+}
+
+bool
+Action::LayerParamUnSetStatic::set_param(const synfig::String& name, const Action::Param ¶m)
+{
+
+ if(!layer && name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
+ {
+ ValueDesc value_desc(param.get_value_desc());
+ if(!value_desc.parent_is_layer_param())
+ return false;
+
+ layer=Layer::Handle::cast_dynamic(value_desc.get_layer());
+
+ if(!layer)
+ return false;
+ }
+
+
+ if(param_name.empty() && name=="value_desc" && param.get_type()==Param::TYPE_VALUEDESC)
+ {
+ ValueDesc value_desc(param.get_value_desc());
+
+ if(!value_desc.parent_is_layer_param())
+ return false;
+
+ param_name=value_desc.get_param_name();
+
+ if(param_name.empty())
+ return false;
+
+ }
+
+ return Action::CanvasSpecific::set_param(name,param);
+}
+
+bool
+Action::LayerParamUnSetStatic::is_ready()const
+{
+ if(!layer || param_name.empty())
+ return false;
+
+ return Action::CanvasSpecific::is_ready();
+}
+
+void
+Action::LayerParamUnSetStatic::perform()
+{
+ //! See if the parameter is dynamic
+ if(layer->dynamic_param_list().count(param_name))
+ throw Error(_("This action is not for Value Nodes!"));
+
+ old_static_value=layer->get_param_static(param_name);
+
+ if(!layer->set_param_static(param_name,false))
+ throw Error(_("Layer did not accept static value."));
+
+ //! Signal layer changed
+ layer->changed();
+ //! Signal that a layer parameter changed
+ if(get_canvas_interface())
+ get_canvas_interface()->signal_layer_param_changed()(layer,param_name);
+}
+
+void
+Action::LayerParamUnSetStatic::undo()
+{
+ if(!layer->set_param(param_name,old_static_value))
+ throw Error(_("Layer did not accept parameter."));
+ //! Signal layer changed
+ layer->changed();
+ //! Signal that a layer parameter changed
+ if(get_canvas_interface())
+ get_canvas_interface()->signal_layer_param_changed()(layer,param_name);
+}
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file layerparamunsetstatic.h
+** \brief Template File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2010 Carlos López
+**
+** 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.
+**
+** 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.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG_APP_ACTION_LAYERPARAMUNSETSTATIC_H
+#define __SYNFIG_APP_ACTION_LAYERPARAMUNSETSTATIC_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <synfig/layer.h>
+#include <synfigapp/action.h>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+namespace synfigapp {
+
+class Instance;
+
+namespace Action {
+
+class LayerParamUnSetStatic :
+ public Undoable,
+ public CanvasSpecific
+{
+private:
+
+ synfig::Layer::Handle layer;
+ synfig::String param_name;
+ bool old_static_value;
+
+public:
+
+ LayerParamUnSetStatic();
+
+ static ParamVocab get_param_vocab();
+ static bool is_candidate(const ParamList &x);
+
+ virtual bool set_param(const synfig::String& name, const Param &);
+ virtual bool is_ready()const;
+
+ virtual void perform();
+ virtual void undo();
+
+ ACTION_MODULE_EXT
+};
+
+}; // END of namespace action
+}; // END of namespace studio
+
+/* === E N D =============================================================== */
+
+#endif
}
*/
-
+ ValueBase local_value;
+ local_value.set_static(false);
+ if(!value_desc.is_value_node() || ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node()))
+ {
+ if(value_desc.is_value_node())
+ local_value=ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node())->get_value();
+ else
+ local_value=value_desc.get_value();
+ }
// If we are in animate editing mode
- if(get_edit_mode()&MODE_ANIMATE)
+ if(get_edit_mode()&MODE_ANIMATE && !local_value.get_static())
{
ValueNode_Animated::Handle& value_node(value_node_animated);
if(ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node()))
{
Action::Handle action(ValueNodeConstSet::create());
-
+ synfig::ValueNode_Const::Handle localvaluenode(ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node()));
+ value.set_static(localvaluenode->get_static());
action->set_param("canvas",get_canvas());
action->set_param("canvas_interface",get_canvas_interface());
action->set_param("value_node",value_desc.get_value_node());
if(value_desc.parent_is_layer_param() && !value_desc.is_value_node())
{
Action::Handle layer_param_set(LayerParamSet::create());
-
+ synfig::ValueBase localvalue(value_desc.get_value());
+ value.set_static(local_value.get_static());
layer_param_set->set_param("canvas",get_canvas());
layer_param_set->set_param("canvas_interface",get_canvas_interface());
layer_param_set->set_param("layer",value_desc.get_layer());
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file valuenodeconstsetstatic.cpp
+** \brief Template File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2010 Carlos López
+**
+** 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.
+**
+** 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.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#ifdef USING_PCH
+# include "pch.h"
+#else
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "valuenodeconstsetstatic.h"
+#include <synfigapp/canvasinterface.h>
+
+#include <synfigapp/general.h>
+
+#endif
+
+using namespace std;
+using namespace etl;
+using namespace synfig;
+using namespace synfigapp;
+using namespace Action;
+
+/* === M A C R O S ========================================================= */
+
+ACTION_INIT(Action::ValueNodeConstSetStatic);
+ACTION_SET_NAME(Action::ValueNodeConstSetStatic,"ValueNodeConstSetStatic");
+ACTION_SET_LOCAL_NAME(Action::ValueNodeConstSetStatic,N_("Set Static"));
+ACTION_SET_TASK(Action::ValueNodeConstSetStatic,"setstatic");
+ACTION_SET_CATEGORY(Action::ValueNodeConstSetStatic,Action::CATEGORY_VALUEDESC|Action::CATEGORY_VALUENODE);
+ACTION_SET_PRIORITY(Action::ValueNodeConstSetStatic,0);
+ACTION_SET_VERSION(Action::ValueNodeConstSetStatic,"0.0");
+ACTION_SET_CVS_ID(Action::ValueNodeConstSetStatic,"$Id$");
+
+/* === G L O B A L S ======================================================= */
+
+/* === P R O C E D U R E S ================================================= */
+
+/* === M E T H O D S ======================================================= */
+
+Action::ValueNodeConstSetStatic::ValueNodeConstSetStatic()
+{
+}
+
+Action::ParamVocab
+Action::ValueNodeConstSetStatic::get_param_vocab()
+{
+ ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
+
+ ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
+ .set_local_name(_("ValueNode"))
+ );
+
+ return ret;
+}
+
+bool
+Action::ValueNodeConstSetStatic::is_candidate(const ParamList &x)
+{
+ if (!candidate_check(get_param_vocab(),x))
+ return false;
+
+ ValueNode::Handle value_node;
+ ValueDesc value_desc(x.find("value_desc")->second.get_value_desc());
+
+ if(value_desc.parent_is_value_node_const() || value_desc.parent_is_linkable_value_node())
+ value_node = value_desc.get_value_node();
+ else
+ value_node = x.find("value_node")->second.get_value_node();
+
+ // We need a constant value node or a constant layer param.
+ return (
+ (ValueNode_Const::Handle::cast_dynamic(value_node) &&
+ // We need the constant value node to be not static.
+ !ValueNode_Const::Handle::cast_dynamic(value_node)->get_static())
+ );
+}
+
+bool
+Action::ValueNodeConstSetStatic::set_param(const synfig::String& name, const Action::Param ¶m)
+{
+ if(!value_node && 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_Const::Handle::cast_dynamic(value_desc.get_value_node());
+
+ if(!value_node)
+ return false;
+
+ return true;
+ }
+
+ if(!value_node && name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
+ {
+ value_node=ValueNode_Const::Handle::cast_dynamic(param.get_value_node());
+
+ if(!value_node)
+ return false;
+
+ return true;
+ }
+
+ return Action::CanvasSpecific::set_param(name,param);
+}
+
+bool
+Action::ValueNodeConstSetStatic::is_ready()const
+{
+ if(!value_node)
+ return false;
+ return Action::CanvasSpecific::is_ready();
+}
+
+void
+Action::ValueNodeConstSetStatic::perform()
+{
+ old_static_value=value_node->get_static();
+
+ if(old_static_value==true)
+ {
+ set_dirty(false);
+ return;
+ }
+ set_dirty(true);
+ value_node->set_static(true);
+
+ value_node->changed();
+}
+
+void
+Action::ValueNodeConstSetStatic::undo()
+{
+ if(old_static_value==value_node->get_static())
+ {
+ set_dirty(false);
+ return;
+ }
+
+ set_dirty(true);
+ value_node->set_static(old_static_value);
+
+ value_node->changed();
+
+}
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file valuenodeconstsetstatic.h
+** \brief Template File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2010 Carlos López
+**
+** 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.
+**
+** 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.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG_APP_ACTION_VALUENODECONSTSETSTATIC_H
+#define __SYNFIG_APP_ACTION_VALUENODECONSTSETSTATIC_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <synfigapp/action.h>
+#include <synfig/valuenode_const.h>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+namespace synfigapp {
+
+class Instance;
+
+namespace Action {
+
+class ValueNodeConstSetStatic :
+ public Undoable,
+ public CanvasSpecific
+{
+private:
+
+ synfig::ValueNode_Const::Handle value_node;
+ bool old_static_value;
+
+
+public:
+
+ ValueNodeConstSetStatic();
+
+ static ParamVocab get_param_vocab();
+ static bool is_candidate(const ParamList &x);
+
+ virtual bool set_param(const synfig::String& name, const Param &);
+ virtual bool is_ready()const;
+
+ virtual void perform();
+ virtual void undo();
+
+ ACTION_MODULE_EXT
+};
+
+}; // END of namespace action
+}; // END of namespace studio
+
+/* === E N D =============================================================== */
+
+#endif
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file valuenodeconstunsetstatic.cpp
+** \brief Template File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2010 Carlos López
+**
+** 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.
+**
+** 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.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === H E A D E R S ======================================================= */
+
+#ifdef USING_PCH
+# include "pch.h"
+#else
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "valuenodeconstunsetstatic.h"
+#include <synfigapp/canvasinterface.h>
+
+#include <synfigapp/general.h>
+
+#endif
+
+using namespace std;
+using namespace etl;
+using namespace synfig;
+using namespace synfigapp;
+using namespace Action;
+
+/* === M A C R O S ========================================================= */
+
+ACTION_INIT(Action::ValueNodeConstUnSetStatic);
+ACTION_SET_NAME(Action::ValueNodeConstUnSetStatic,"ValueNodeConstUnSetStatic");
+ACTION_SET_LOCAL_NAME(Action::ValueNodeConstUnSetStatic,N_("UnSet Static"));
+ACTION_SET_TASK(Action::ValueNodeConstUnSetStatic,"unsetstatic");
+ACTION_SET_CATEGORY(Action::ValueNodeConstUnSetStatic,Action::CATEGORY_VALUEDESC|Action::CATEGORY_VALUENODE);
+ACTION_SET_PRIORITY(Action::ValueNodeConstUnSetStatic,0);
+ACTION_SET_VERSION(Action::ValueNodeConstUnSetStatic,"0.0");
+ACTION_SET_CVS_ID(Action::ValueNodeConstUnSetStatic,"$Id$");
+
+/* === G L O B A L S ======================================================= */
+
+/* === P R O C E D U R E S ================================================= */
+
+/* === M E T H O D S ======================================================= */
+
+Action::ValueNodeConstUnSetStatic::ValueNodeConstUnSetStatic()
+{
+}
+
+Action::ParamVocab
+Action::ValueNodeConstUnSetStatic::get_param_vocab()
+{
+ ParamVocab ret(Action::CanvasSpecific::get_param_vocab());
+
+ ret.push_back(ParamDesc("value_node",Param::TYPE_VALUENODE)
+ .set_local_name(_("ValueNode"))
+ );
+
+ return ret;
+}
+
+bool
+Action::ValueNodeConstUnSetStatic::is_candidate(const ParamList &x)
+{
+ if (!candidate_check(get_param_vocab(),x))
+ return false;
+
+ ValueNode::Handle value_node;
+ ValueDesc value_desc(x.find("value_desc")->second.get_value_desc());
+
+ if(value_desc.parent_is_value_node_const() || value_desc.parent_is_linkable_value_node())
+ value_node = value_desc.get_value_node();
+ else
+ value_node = x.find("value_node")->second.get_value_node();
+
+ // We need a constant value node or a constant layer param.
+ return (
+ (ValueNode_Const::Handle::cast_dynamic(value_node) &&
+ // We need the constant value node to be static.
+ ValueNode_Const::Handle::cast_dynamic(value_node)->get_static())
+ );
+}
+
+bool
+Action::ValueNodeConstUnSetStatic::set_param(const synfig::String& name, const Action::Param ¶m)
+{
+ if(!value_node && 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_Const::Handle::cast_dynamic(value_desc.get_value_node());
+
+ if(!value_node)
+ return false;
+
+ return true;
+ }
+
+ if(!value_node && name=="value_node" && param.get_type()==Param::TYPE_VALUENODE)
+ {
+ value_node=ValueNode_Const::Handle::cast_dynamic(param.get_value_node());
+
+ if(!value_node)
+ return false;
+
+ return true;
+ }
+
+ return Action::CanvasSpecific::set_param(name,param);
+}
+
+bool
+Action::ValueNodeConstUnSetStatic::is_ready()const
+{
+ if(!value_node)
+ return false;
+ return Action::CanvasSpecific::is_ready();
+}
+
+void
+Action::ValueNodeConstUnSetStatic::perform()
+{
+ old_static_value=value_node->get_static();
+
+ if(old_static_value==false)
+ {
+ set_dirty(false);
+ return;
+ }
+ set_dirty(true);
+ value_node->set_static(false);
+
+ value_node->changed();
+}
+
+void
+Action::ValueNodeConstUnSetStatic::undo()
+{
+ if(old_static_value==value_node->get_static())
+ {
+ set_dirty(false);
+ return;
+ }
+
+ set_dirty(true);
+ value_node->set_static(old_static_value);
+
+ value_node->changed();
+
+}
--- /dev/null
+/* === S Y N F I G ========================================================= */
+/*! \file valuenodeconstunsetstatic.h
+** \brief Template File
+**
+** $Id$
+**
+** \legal
+** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2010 Carlos López
+**
+** 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.
+**
+** 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.
+** \endlegal
+*/
+/* ========================================================================= */
+
+/* === S T A R T =========================================================== */
+
+#ifndef __SYNFIG_APP_ACTION_VALUENODECONSTUNSETSTATIC_H
+#define __SYNFIG_APP_ACTION_VALUENODECONSTUNSETSTATIC_H
+
+/* === H E A D E R S ======================================================= */
+
+#include <synfigapp/action.h>
+#include <synfig/valuenode_const.h>
+
+/* === M A C R O S ========================================================= */
+
+/* === T Y P E D E F S ===================================================== */
+
+/* === C L A S S E S & S T R U C T S ======================================= */
+
+namespace synfigapp {
+
+class Instance;
+
+namespace Action {
+
+class ValueNodeConstUnSetStatic :
+ public Undoable,
+ public CanvasSpecific
+{
+private:
+
+ synfig::ValueNode_Const::Handle value_node;
+ bool old_static_value;
+
+
+public:
+
+ ValueNodeConstUnSetStatic();
+
+ static ParamVocab get_param_vocab();
+ static bool is_candidate(const ParamList &x);
+
+ virtual bool set_param(const synfig::String& name, const Param &);
+ virtual bool is_ready()const;
+
+ virtual void perform();
+ virtual void undo();
+
+ ACTION_MODULE_EXT
+};
+
+}; // END of namespace action
+}; // END of namespace studio
+
+/* === E N D =============================================================== */
+
+#endif