X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Flayer.h;h=51bf6811df859e43e534a38f79f9d89c34c4a1f7;hb=e6b894ac0b503008a3e42049aed30d116db28630;hp=c00233099a400306a588164bbd0d495d76585c30;hpb=ac1cb398b817d4c0cb0c36fe4d12ca24859ddb93;p=synfig.git diff --git a/synfig-core/src/synfig/layer.h b/synfig-core/src/synfig/layer.h index c002330..51bf681 100644 --- 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); \ + set_param_static(#x,value.get_static()); \ { \ y; \ } \ @@ -92,6 +93,7 @@ if (param==y && value.same_type_as(x)) \ { \ value.put(&x); \ + set_param_static(#x,value.get_static()); \ 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) \ - 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) \ @@ -253,6 +259,9 @@ private: //! 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_; @@ -446,6 +455,9 @@ public: */ 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 &);