X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fmodules%2Fmod_particle%2Fplant.cpp;h=60652a46219a086de4f19d9e90b3a6d94b60a97f;hb=28ce5c8b2bdc4a81c74d87ce2052ed3db4829f35;hp=cdaa592762045472aef12321beb07e3646323692;hpb=4a982de650f64a6d2a94b137d65fc1233d5c9098;p=synfig.git diff --git a/synfig-core/trunk/src/modules/mod_particle/plant.cpp b/synfig-core/trunk/src/modules/mod_particle/plant.cpp index cdaa592..60652a4 100644 --- a/synfig-core/trunk/src/modules/mod_particle/plant.cpp +++ b/synfig-core/trunk/src/modules/mod_particle/plant.cpp @@ -6,7 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** Copyright (c) 2007 Chris Moore +** Copyright (c) 2007, 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -241,6 +241,9 @@ Plant::sync()const if((((i+1)*sprouts + steps/2) / steps) > branch_count) { Vector branch_velocity(deriv(f).norm()*velocity + deriv(f).perp().norm()*perp_velocity); + if (isnan(branch_velocity[0]) || isnan(branch_velocity[1])) + continue; + branch_velocity[0] += random_factor * random(Random::SMOOTH_COSINE, 1, f*splits, 0.0f, 0.0f); branch_velocity[1] += random_factor * random(Random::SMOOTH_COSINE, 2, f*splits, 0.0f, 0.0f); @@ -377,7 +380,7 @@ Plant::get_param_vocab()const .set_local_name(_("Vertices")) .set_description(_("A list of BLine Points")) .set_origin("offset") - //.set_scalar("width") + .set_hint("width") ); ret.push_back(ParamDesc("offset")