Fix T47969: Select Random always uses same seed
Increment the seed on each use, otherwise calling again selects the same order, unless you manually adjust the seed.
This commit is contained in:
@@ -1635,7 +1635,7 @@ static int select_random_exec(bContext *C, wmOperator *op)
|
||||
int k;
|
||||
|
||||
const float randfac = RNA_float_get (op->ptr, "percent") / 100.0f;
|
||||
const int seed = RNA_int_get(op->ptr, "seed");
|
||||
const int seed = WM_operator_properties_select_random_seed_increment_get(op);
|
||||
const bool select = (RNA_enum_get(op->ptr, "action") == SEL_SELECT);
|
||||
RNG *rng;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user