[Bf-blender-cvs] [fd110291a5f] blender-v2.91-release: Fix T81794: ColorRampElement step regression

Richard Antalik noreply at git.blender.org
Wed Nov 4 18:13:23 CET 2020


Commit: fd110291a5f133042511dee3648c354fca141a43
Author: Richard Antalik
Date:   Wed Nov 4 18:09:21 2020 +0100
Branches: blender-v2.91-release
https://developer.blender.org/rBfd110291a5f133042511dee3648c354fca141a43

Fix T81794: ColorRampElement step regression

Set step in RNA property definition.

There was a hardcoded setting of a1 for this specific button, which
used to be the variable to store the step size of number buttons until
rBe6f0b60c2e91. hardcoded value is removed in rBe29206f86a5f.

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D9277

===================================================================

M	source/blender/makesrna/intern/rna_color.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 79f2ab70651..b4f053a0d2b 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -941,6 +941,7 @@ static void rna_def_color_ramp_element(BlenderRNA *brna)
   prop = RNA_def_property(srna, "position", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "pos");
   RNA_def_property_range(prop, 0, 1);
+  RNA_def_property_ui_range(prop, 0, 1, 1, 3);
   RNA_def_property_ui_text(prop, "Position", "Set position of selected color stop");
   RNA_def_property_update(prop, 0, "rna_ColorRamp_update");
 }



More information about the Bf-blender-cvs mailing list