X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Flayer.cpp;h=3106d8c46755e0dccadd1a656b2184deb08b181c;hb=e6b894ac0b503008a3e42049aed30d116db28630;hp=9d1adf38980c1ae816f94f7a7e3e4d002feaa6f3;hpb=ac1cb398b817d4c0cb0c36fe4d12ca24859ddb93;p=synfig.git diff --git a/synfig-core/src/synfig/layer.cpp b/synfig-core/src/synfig/layer.cpp index 9d1adf3..3106d8c 100644 --- a/synfig-core/src/synfig/layer.cpp +++ b/synfig-core/src/synfig/layer.cpp @@ -295,11 +295,35 @@ Layer::set_param(const String ¶m, const ValueBase &value) if(param=="z_depth" && value.same_type_as(z_depth_)) { z_depth_=value.get(z_depth_); + z_depth_static=value.get_static(); return true; } return false; } +bool +Layer::set_param_static(const String ¶m, const bool x) +{ + if(param=="z_depth" && z_depth_static!=x) + { + z_depth_static=x; + return true; + } + + return false; +} + + +bool +Layer::get_param_static(const String ¶m) const +{ + if(param=="z_depth") + return z_depth_static; + + return false; +} + + etl::handle Layer::get_transform()const { @@ -449,8 +473,11 @@ ValueBase Layer::get_param(const String & param)const { if(param=="z_depth") - return get_z_depth(); - + { + synfig::ValueBase ret(get_z_depth()); + ret.set_static(z_depth_static); + return ret; + } return ValueBase(); }