[Bf-blender-cvs] [caaaac1365a] master: Improve some textures UI properties click-drag precision

Erik Abrahamsson noreply at git.blender.org
Thu Sep 5 18:00:07 CEST 2019


Commit: caaaac1365ae2dd5956697e222122c76e3afc5e6
Author: Erik Abrahamsson
Date:   Thu Sep 5 16:29:35 2019 +0200
Branches: master
https://developer.blender.org/rBcaaaac1365ae2dd5956697e222122c76e3afc5e6

Improve some textures UI properties click-drag precision

When click-dragging to change values in textures (for example Musgrave-
>Size to give an example) the step size is too big.

Reviewers: brecht, lichtwerk

Reviewed By: brecht, lichtwerk

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

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

M	release/scripts/addons
M	release/scripts/addons_contrib
M	source/blender/makesrna/intern/rna_texture.c

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

diff --git a/release/scripts/addons b/release/scripts/addons
index 8d11c9e8289..46b1ada7f5f 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 8d11c9e82893e231b2abc093d815deb79866e03b
+Subproject commit 46b1ada7f5f2d396f712e9a1376922ca89475486
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 2769f4b5f5f..b5e801446c8 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 2769f4b5f5f4769cf9115fa7cdd1287540a795bf
+Subproject commit b5e801446c820e7f5725e2e09f8c2a12a4449f45
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 2fc0e2bdf2d..356ecd5b4db 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -569,16 +569,19 @@ static void rna_def_colormapping(BlenderRNA *brna)
   prop = RNA_def_property(srna, "brightness", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "bright");
   RNA_def_property_range(prop, 0, 2);
+  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
   RNA_def_property_ui_text(prop, "Brightness", "Adjust the brightness of the texture");
   RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
 
   prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
   RNA_def_property_range(prop, 0.0, 5);
+  RNA_def_property_ui_range(prop, 0, 5, 1, 3);
   RNA_def_property_ui_text(prop, "Contrast", "Adjust the contrast of the texture");
   RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
 
   prop = RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
   RNA_def_property_range(prop, 0, 2);
+  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
   RNA_def_property_ui_text(prop, "Saturation", "Adjust the saturation of colors in the texture");
   RNA_def_property_update(prop, 0, "rna_Color_mapping_update");
 
@@ -816,7 +819,7 @@ static void rna_def_texture_clouds(BlenderRNA *brna)
   prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "noisesize");
   RNA_def_property_range(prop, 0.0001, FLT_MAX);
-  RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
+  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
   RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
@@ -880,7 +883,7 @@ static void rna_def_texture_wood(BlenderRNA *brna)
   prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "noisesize");
   RNA_def_property_range(prop, 0.0001, FLT_MAX);
-  RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
+  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
   RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
@@ -948,7 +951,7 @@ static void rna_def_texture_marble(BlenderRNA *brna)
   prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "noisesize");
   RNA_def_property_range(prop, 0.0001, FLT_MAX);
-  RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
+  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
   RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
@@ -1096,7 +1099,7 @@ static void rna_def_texture_stucci(BlenderRNA *brna)
   prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "noisesize");
   RNA_def_property_range(prop, 0.0001, FLT_MAX);
-  RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
+  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
   RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
@@ -1320,43 +1323,49 @@ static void rna_def_texture_musgrave(BlenderRNA *brna)
   prop = RNA_def_property(srna, "dimension_max", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "mg_H");
   RNA_def_property_range(prop, 0.0001, 2);
+  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
   RNA_def_property_ui_text(prop, "Highest Dimension", "Highest fractal dimension");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
   prop = RNA_def_property(srna, "lacunarity", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "mg_lacunarity");
   RNA_def_property_range(prop, 0, 6);
+  RNA_def_property_ui_range(prop, 0, 6, 1, 2);
   RNA_def_property_ui_text(prop, "Lacunarity", "Gap between successive frequencies");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
   prop = RNA_def_property(srna, "octaves", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "mg_octaves");
   RNA_def_property_range(prop, 0, 8);
+  RNA_def_property_ui_range(prop, 0, 8, 1, 2);
   RNA_def_property_ui_text(prop, "Octaves", "Number of frequencies used");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
   prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "mg_offset");
   RNA_def_property_range(prop, 0, 6);
+  RNA_def_property_ui_range(prop, 0, 6, 1, 2);
   RNA_def_property_ui_text(prop, "Offset", "The fractal offset");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
   prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "mg_gain");
   RNA_def_property_range(prop, 0, 6);
+  RNA_def_property_ui_range(prop, 0, 6, 1, 2);
   RNA_def_property_ui_text(prop, "Gain", "The gain multiplier");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
   prop = RNA_def_property(srna, "noise_intensity", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "ns_outscale");
   RNA_def_property_range(prop, 0, 10);
+  RNA_def_property_ui_range(prop, 0, 10, 1, 2);
   RNA_def_property_ui_text(prop, "Noise Intensity", "Intensity of the noise");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
   prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "noisesize");
   RNA_def_property_range(prop, 0.0001, FLT_MAX);
-  RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
+  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
   RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
@@ -1473,7 +1482,7 @@ static void rna_def_texture_voronoi(BlenderRNA *brna)
   prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "noisesize");
   RNA_def_property_range(prop, 0.0001, FLT_MAX);
-  RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
+  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
   RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
@@ -1502,7 +1511,7 @@ static void rna_def_texture_distorted_noise(BlenderRNA *brna)
   prop = RNA_def_property(srna, "noise_scale", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "noisesize");
   RNA_def_property_range(prop, 0.0001, FLT_MAX);
-  RNA_def_property_ui_range(prop, 0.0001, 2, 10, 2);
+  RNA_def_property_ui_range(prop, 0.0001, 2, 1, 2);
   RNA_def_property_ui_text(prop, "Noise Size", "Scaling for noise input");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
@@ -1568,16 +1577,19 @@ static void rna_def_texture(BlenderRNA *brna)
   prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "bright");
   RNA_def_property_range(prop, 0, 2);
+  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
   RNA_def_property_ui_text(prop, "Brightness", "Adjust the brightness of the texture");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
   prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_NONE);
   RNA_def_property_range(prop, 0.0, 5);
+  RNA_def_property_ui_range(prop, 0, 5, 1, 3);
   RNA_def_property_ui_text(prop, "Contrast", "Adjust the contrast of the texture");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
   prop = RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
   RNA_def_property_range(prop, 0, 2);
+  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
   RNA_def_property_ui_text(prop, "Saturation", "Adjust the saturation of colors in the texture");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
@@ -1585,18 +1597,21 @@ static void rna_def_texture(BlenderRNA *brna)
   prop = RNA_def_property(srna, "factor_red", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "rfac");
   RNA_def_property_range(prop, 0, 2);
+  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
   RNA_def_property_ui_text(prop, "Factor Red", "");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
   prop = RNA_def_property(srna, "factor_green", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "gfac");
   RNA_def_property_range(prop, 0, 2);
+  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
   RNA_def_property_ui_text(prop, "Factor Green", "");
   RNA_def_property_update(prop, 0, "rna_Texture_update");
 
   prop = RNA_def_property(srna, "factor_blue", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "bfac");
   RNA_def_property_range(prop, 0, 2);
+  RNA_def_property_ui_range(prop, 0, 2, 1, 3);
   RNA_def_property_ui_text(prop, "Factor Blue", "");
   RNA_def_property_update(prop, 0, "rna_Texture_update");



More information about the Bf-blender-cvs mailing list