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(#x,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) \
//! 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 ===================================================== */
/* === C L A S S E S & S T R U C T S ======================================= */
//! The depth parameter of the layer in the layer stack
float z_depth_;
+ //! True if zdepth is not affected when in animation mode
+ bool z_depth_static;
+
//! \writeme
mutable Time dirty_time_;
*/
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;
+
//! Sets a list of parameters
virtual bool set_param_list(const ParamList &);