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
This commit is contained in:
committed by
Philipp Oeser
parent
1bafa3139c
commit
caaaac1365
Submodule release/scripts/addons updated: 8d11c9e828...46b1ada7f5
Submodule release/scripts/addons_contrib updated: 2769f4b5f5...b5e801446c
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user