Add parameter static option for various layers
[synfig.git] / synfig-core / src / modules / mod_noise / distort.cpp
index 1660c7d..c946440 100644 (file)
@@ -72,6 +72,8 @@ NoiseDistort::NoiseDistort():
        random.set_seed(time(NULL));
        turbulent=false;
        displacement=Vector(0.25,0.25);
+       Layer::Vocab voc(get_param_vocab());
+       Layer::fill_static(voc);
 }
 
 inline Color
@@ -159,6 +161,7 @@ NoiseDistort::set_param(const String & param, const ValueBase &value)
        if(param=="seed" && value.same_type_as(int()))
        {
                random.set_seed(value.get(int()));
+               set_param_static(param, value.get_static());
                return true;
        }
        IMPORT(size);
@@ -174,7 +177,11 @@ ValueBase
 NoiseDistort::get_param(const String & param)const
 {
        if(param=="seed")
-               return random.get_seed();
+       {
+               ValueBase ret(random.get_seed());
+               ret.set_static(get_param_static(param));
+               return ret;
+       }
        EXPORT(size);
        EXPORT(speed);
        EXPORT(smooth);