projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename z_depth_static to z_depth__static to make proper use of the macros.
[synfig.git]
/
synfig-core
/
src
/
synfig
/
layer.h
diff --git
a/synfig-core/src/synfig/layer.h
b/synfig-core/src/synfig/layer.h
index
80e50f1
..
87e91a1
100644
(file)
--- a/
synfig-core/src/synfig/layer.h
+++ b/
synfig-core/src/synfig/layer.h
@@
-81,6
+81,7
@@
if (param==#x && value.same_type_as(x)) \
{ \
value.put(&x); \
if (param==#x && value.same_type_as(x)) \
{ \
value.put(&x); \
+ set_param_static(#x,value.get_static()); \
{ \
y; \
} \
{ \
y; \
} \
@@
-92,6
+93,7
@@
if (param==y && value.same_type_as(x)) \
{ \
value.put(&x); \
if (param==y && value.same_type_as(x)) \
{ \
value.put(&x); \
+ set_param_static(#x,value.get_static()); \
return true; \
}
return true; \
}
@@
-102,7
+104,11
@@
//! Exports a parameter 'x' if param is same type as given 'y'
#define EXPORT_AS(x,y) \
if (param==y) \
//! 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) \
//! Exports a parameter if it is the same type as value
#define EXPORT(x) \
@@
-124,6
+130,19
@@
//! It prevents these layers showing up in the menu.
#define CATEGORY_DO_NOT_USE "Do Not Use"
//! 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 ======================================= */
/* === T Y P E D E F S ===================================================== */
/* === C L A S S E S & S T R U C T S ======================================= */
@@
-253,6
+272,9
@@
private:
//! The depth parameter of the layer in the layer stack
float z_depth_;
//! 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_;
//! \writeme
mutable Time dirty_time_;
@@
-446,6
+468,9
@@
public:
*/
virtual bool set_param(const String ¶m, const ValueBase &value);
*/
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 &);
//! Sets a list of parameters
virtual bool set_param_list(const ParamList &);
@@
-459,7
+484,7
@@
public:
//! Get a list of all of the parameters and their values
virtual ParamList get_param_list()const;
//! Get a list of all of the parameters and their values
virtual ParamList get_param_list()const;
- //! Sets the \a time for the
selected
Layer and those under it
+ //! Sets the \a time for the Layer and those under it
/*! \param context Context iterator referring to next Layer.
** \param time writeme
** \see Context::set_time()
/*! \param context Context iterator referring to next Layer.
** \param time writeme
** \see Context::set_time()
@@
-474,7
+499,7
@@
public:
** \todo \a point should be of the type <tt>const Point \&</tt> */
virtual void set_time(Context context, Time time, const Point &point)const;
** \todo \a point should be of the type <tt>const Point \&</tt> */
virtual void set_time(Context context, Time time, const Point &point)const;
- //! Gets the
color of the Canvas
at \a pos
+ //! Gets the
blend color of the Layer in the context
at \a pos
/*! \param context Context iterator referring to next Layer.
** \param pos Point which indicates where the Color should come from
** \see Context::get_color()
/*! \param context Context iterator referring to next Layer.
** \param pos Point which indicates where the Color should come from
** \see Context::get_color()