diff options
author | Erik Abrahamsson <erik85> | 2019-09-05 17:29:35 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2019-09-05 18:55:37 +0300 |
commit | caaaac1365ae2dd5956697e222122c76e3afc5e6 (patch) | |
tree | 36cbfad3638bedc67dc62670eba0b23cfc69fdaa | |
parent | 1bafa3139c361a5ea9df44a260b3f9f492d61812 (diff) |
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 | 0 | ||||
m--------- | release/scripts/addons_contrib | 0 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_texture.c | 29 |
3 files changed, 22 insertions, 7 deletions
diff --git a/release/scripts/addons b/release/scripts/addons -Subproject 8d11c9e82893e231b2abc093d815deb79866e03 +Subproject 46b1ada7f5f2d396f712e9a1376922ca8947548 diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib -Subproject 2769f4b5f5f4769cf9115fa7cdd1287540a795b +Subproject b5e801446c820e7f5725e2e09f8c2a12a4449f4 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"); |