X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fmodules%2Fmod_noise%2Fnoise.cpp;h=b433d1fcb69d070412c52feef7fbf32822ec879e;hb=42e8f249832b9ca81691bbf76a6668aa4612117f;hp=4257a6cf376c36a16a23930ea17486eb4ea22056;hpb=a095981e18cc37a8ecc7cd237cc22b9c10329264;p=synfig.git diff --git a/synfig-core/src/modules/mod_noise/noise.cpp b/synfig-core/src/modules/mod_noise/noise.cpp index 4257a6c..b433d1f 100644 --- a/synfig-core/src/modules/mod_noise/noise.cpp +++ b/synfig-core/src/modules/mod_noise/noise.cpp @@ -63,6 +63,7 @@ SYNFIG_LAYER_SET_CVS_ID(Noise,"$Id$"); /* === M E T H O D S ======================================================= */ Noise::Noise(): + Layer_Composite(1.0,Color::BLEND_COMPOSITE), size(1,1), gradient(Color::black(), Color::white()) { @@ -75,6 +76,8 @@ Noise::Noise(): displacement=Vector(1,1); do_displacement=false; super_sample=false; + Layer::Vocab voc(get_param_vocab()); + Layer::fill_static(voc); } @@ -207,6 +210,7 @@ Noise::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); @@ -225,7 +229,11 @@ ValueBase Noise::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); @@ -248,12 +256,15 @@ Noise::get_param_vocab()const ret.push_back(ParamDesc("gradient") .set_local_name(_("Gradient")) + .set_description(_("Gradient to apply")) ); 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("size") .set_local_name(_("Size")) + .set_description(_("Size of the noise")) ); ret.push_back(ParamDesc("smooth") .set_local_name(_("Interpolation")) @@ -267,18 +278,23 @@ Noise::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")) ); ret.push_back(ParamDesc("do_alpha") .set_local_name(_("Do Alpha")) + .set_description(_("Uses transparency")) ); ret.push_back(ParamDesc("super_sample") .set_local_name(_("Super Sampling")) + .set_description(_("When checked the gradient is supersampled")) ); return ret;