From: Carlos Lopez Date: Sat, 21 Aug 2010 11:34:42 +0000 (+0200) Subject: Allow motion blur layer to have static parameters X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1e3dd9d41839d8c7907bdde006b4c337e25efa38;p=synfig.git Allow motion blur layer to have static parameters --- diff --git a/synfig-core/src/synfig/layer_motionblur.cpp b/synfig-core/src/synfig/layer_motionblur.cpp index 855112c..c0e27ea 100644 --- a/synfig-core/src/synfig/layer_motionblur.cpp +++ b/synfig-core/src/synfig/layer_motionblur.cpp @@ -66,7 +66,12 @@ Layer_MotionBlur::Layer_MotionBlur(): subsamples_factor (1.0), subsampling_type (SUBSAMPLING_HYPERBOLIC), subsample_start (0.0), - subsample_end (1.0) + subsample_end (1.0), + aperture_static (false), + subsamples_factor_static (false), + subsampling_type_static (true), + subsample_start_static (false), + subsample_end_static (false) { } @@ -264,3 +269,30 @@ Layer_MotionBlur::accelerated_render(Context context,Surface *surface,int qualit return true; } + + +bool +Layer_MotionBlur::set_param_static(const String ¶m, const bool x) +{ + SET_STATIC(aperture, x) + SET_STATIC(subsamples_factor, x) + SET_STATIC(subsampling_type, x) + SET_STATIC(subsample_start, x) + SET_STATIC(subsample_end, x) + + return Layer_Composite::set_param_static(param, x); +} + + +bool +Layer_MotionBlur::get_param_static(const String ¶m) const +{ + + GET_STATIC(aperture) + GET_STATIC(subsamples_factor) + GET_STATIC(subsampling_type) + GET_STATIC(subsample_start) + GET_STATIC(subsample_end) + + return Layer_Composite::get_param_static(param); +} diff --git a/synfig-core/src/synfig/layer_motionblur.h b/synfig-core/src/synfig/layer_motionblur.h index 9b4391c..43d946b 100644 --- a/synfig-core/src/synfig/layer_motionblur.h +++ b/synfig-core/src/synfig/layer_motionblur.h @@ -56,10 +56,18 @@ private: Real subsample_end; mutable Time time_cur; + bool aperture_static; + bool subsamples_factor_static; + bool subsampling_type_static; + bool subsample_start_static; + bool subsample_end_static; + public: Layer_MotionBlur(); virtual bool set_param(const String & param, const synfig::ValueBase &value); virtual ValueBase get_param(const String & param)const; + virtual bool set_param_static(const String ¶m, const bool x); + virtual bool get_param_static(const String ¶m) const; virtual Color get_color(Context context, const Point &pos)const; virtual void set_time(Context context, Time time)const; virtual void set_time(Context context, Time time, const Point &point)const;