X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fmodules%2Fmod_noise%2Fdistort.cpp;h=e12eae7b3753cd90fe1b852206bf6f275ce4aef0;hb=42e8f249832b9ca81691bbf76a6668aa4612117f;hp=1660c7dba474eadb702e8e718e08566dc314a660;hpb=a095981e18cc37a8ecc7cd237cc22b9c10329264;p=synfig.git diff --git a/synfig-core/src/modules/mod_noise/distort.cpp b/synfig-core/src/modules/mod_noise/distort.cpp index 1660c7d..e12eae7 100644 --- a/synfig-core/src/modules/mod_noise/distort.cpp +++ b/synfig-core/src/modules/mod_noise/distort.cpp @@ -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); @@ -195,13 +202,16 @@ NoiseDistort::get_param_vocab()const ret.push_back(ParamDesc("displacement") .set_local_name(_("Displacement")) + .set_description(_("How big the distortion displaces the context")) ); ret.push_back(ParamDesc("size") .set_local_name(_("Size")) + .set_description(_("The distance between distortions")) ); ret.push_back(ParamDesc("seed") .set_local_name(_("RandomNoise Seed")) + .set_description(_("Change to modify the random seed of the noise")) ); ret.push_back(ParamDesc("smooth") .set_local_name(_("Interpolation")) @@ -215,12 +225,15 @@ NoiseDistort::get_param_vocab()const ); ret.push_back(ParamDesc("detail") .set_local_name(_("Detail")) + .set_description(_("Increase to obtain fine details of the noise")) ); ret.push_back(ParamDesc("speed") .set_local_name(_("Animation Speed")) + .set_description(_("In cycles per second")) ); ret.push_back(ParamDesc("turbulent") .set_local_name(_("Turbulent")) + .set_description(_("When checked produces turbulent noise")) ); return ret;