From c71a8e837616159735a925bbb82c868646e7d3a1 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 27 Jan 2021 11:19:54 -0600 Subject: UI: Fix incorrect RNA percentage property definitions In two cases the percentage property was actually used incorrectly, as pointed out in T82070. The range was [0, 1], but the properties were still displayed as percentages. There is a preference to control whether to display factors or percentages, so it usually doesn't make sense to manually define properties as percentages. Resolves T82070 Differential Revision: https://developer.blender.org/D9344 --- source/blender/editors/physics/particle_edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/physics') diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 05b523af5f9..3a6201fd418 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -1999,7 +1999,7 @@ static int select_random_exec(bContext *C, wmOperator *op) int p; int k; - const float randfac = RNA_float_get(op->ptr, "percent") / 100.0f; + const float randfac = RNA_float_get(op->ptr, "ratio"); 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; -- cgit v1.2.3