Rename z_depth_static to z_depth__static to make proper use of the macros.
[synfig.git] / synfig-core / src / synfig / layer.h
index 51bf681..87e91a1 100644 (file)
 //! 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 ======================================= */
@@ -260,7 +273,7 @@ private:
        float z_depth_;
 
        //! True if zdepth is not affected when in animation mode
-       bool z_depth_static;
+       bool z_depth__static;
 
        //! \writeme
        mutable Time dirty_time_;