[EMAIL PROTECTED] (2002-11-21 at 1459.36 +0100):
> The gimp_random_seed_new() function currently creates a
> spinbutton for the seed, and a togglebutton for whether a Time
> seed should be used. With the change over to g_rand* () the
> default seeding (which is from /dev/urandom by default, and time
> if that fails) is much better, so Time os probably no longer
> appropriate as a label. But that's superficial. 

Change the label to New Random Seed or something like that. It could

Current Seed: _78928___^v |New Random Seed|

I keep the spin button so people can just use a simple approach, start
with one value (via the button or manual input) and test consecutive
numbers, thus allowing going back to a nicer result you got four
clicks ago, for example.

> The real change would be to do away with the toggle, replace the 
> toggle button with a normal button, and set a random seed in the 
> spin-box when the button is pressed. For this, I've been using 

Yep, nice for experiments. The ascii art above uses plain button, not
toggle, as you recommend.

> the global PRNG (g_random_int) rather than setting up what would be 
> a short-lived GRand * object, but again that would be a trivial 
> change. 
> After that the only thing left to do is "intelligent" default
> seeding. Do we seed with 0 as the default, and use the same seed
> as the last time if "run with last vals" is used for a plug-in?
> Should the gimp_random_seed_new() function set a random seed when
> called?  Or do we seed with a random number to start? Currently 
> the setting of an initial seed is entirely the plug-ins
> responsibility. I propose we leave it that way. The "run with
> last vals" should use, imho, the same seed value. This can, of
> course, be modified from plug-in to plug-in, but I think it's a
> sane behaviour. 

Only things I see as important is being able to reproduce the same
results as many times as needed, thus "last vals" should be a run
again, no changes at all. The other thing, the value for first run or
new seeds, do whatever you want, seed with a random number from a
highly random source or use time, I do not think anybody will have
problems with not so random things in images (anybody so weird to do
crypto with gimp?). If it looks random, it should be enough.
> Also, once the behaviour is decided, we should use the random
> seed widget across more plug-ins. Several plug-ins currently do
> their own thing in this respect, and there's no real need for it.

Yes, you will make some people happy, specially about the rerun part.

Gimp-developer mailing list

Reply via email to