Use map of static values indexed by parameter name instead of the macros and the...
[synfig.git] / synfig-core / src / synfig / layer.h
index 51a47a0..87ec5bb 100644 (file)
 //! 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)                                                                                                      \
 #define GET_STATIC(x)                                                                                                                                  \
        if(param==#x)                                                                                                                                           \
                return x ## _static;                                                                                                                    \
-
+*/
 
 /* === T Y P E D E F S ===================================================== */
 
@@ -273,7 +273,8 @@ private:
        float z_depth;
 
        //! True if zdepth is not affected when in animation mode
-       bool z_depth_static;
+       typedef std::map<String, bool> Sparams;
+       Sparams static_params;
 
        //! \writeme
        mutable Time dirty_time_;
@@ -470,6 +471,7 @@ public:
 
        virtual bool set_param_static(const String &param, const bool x);
        virtual bool get_param_static(const String &param) const;
+       virtual void fill_static(Vocab vocab);
 
        //!     Sets a list of parameters
        virtual bool set_param_list(const ParamList &);