[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22307] branches/blender2.5/blender: Improved layout of voronoi texture.
William Reynish
william at reynish.com
Sat Aug 8 16:17:56 CEST 2009
Revision: 22307
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22307
Author: billrey
Date: 2009-08-08 16:17:55 +0200 (Sat, 08 Aug 2009)
Log Message:
-----------
Improved layout of voronoi texture. There was some strange empty space.
Modified Paths:
--------------
branches/blender2.5/blender/release/ui/buttons_texture.py
branches/blender2.5/blender/source/blender/makesdna/DNA_texture_types.h
branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c
Modified: branches/blender2.5/blender/release/ui/buttons_texture.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_texture.py 2009-08-08 11:44:56 UTC (rev 22306)
+++ branches/blender2.5/blender/release/ui/buttons_texture.py 2009-08-08 14:17:55 UTC (rev 22307)
@@ -565,20 +565,26 @@
def draw(self, context):
layout = self.layout
tex = context.texture
-
- layout.itemR(tex, "distance_metric")
- layout.itemR(tex, "coloring")
split = layout.split()
sub = split.column()
-
+ sub.itemL(text="Distance Metric:")
+ sub.itemR(tex, "distance_metric", text="")
+ subsub = sub.column()
+ subsub.active = tex.distance_metric == 'MINKOVSKY'
+ subsub.itemR(tex, "minkovsky_exponent", text="Exponent")
+ sub.itemL(text="Coloring:")
+ sub.itemR(tex, "coloring", text="")
sub.itemR(tex, "noise_intensity", text="Intensity")
- if tex.distance_metric == 'MINKOVSKY':
- sub.itemR(tex, "minkovsky_exponent", text="Exponent")
- sub = split.column()
- sub.itemR(tex, "feature_weights", slider=True)
+ sub = split.column(align=True)
+ sub.itemL(text="Feature Weights:")
+ sub.itemR(tex, "weight_1", text="1", slider=True)
+ sub.itemR(tex, "weight_2", text="2", slider=True)
+ sub.itemR(tex, "weight_3", text="3", slider=True)
+ sub.itemR(tex, "weight_4", text="4", slider=True)
+
layout.itemL(text="Noise:")
row = layout.row()
Modified: branches/blender2.5/blender/source/blender/makesdna/DNA_texture_types.h
===================================================================
--- branches/blender2.5/blender/source/blender/makesdna/DNA_texture_types.h 2009-08-08 11:44:56 UTC (rev 22306)
+++ branches/blender2.5/blender/source/blender/makesdna/DNA_texture_types.h 2009-08-08 14:17:55 UTC (rev 22307)
@@ -143,7 +143,11 @@
float dist_amount, ns_outscale;
/* newnoise: voronoi nearest neighbour weights, minkovsky exponent, distance metric & color type */
- float vn_w1, vn_w2, vn_w3, vn_w4, vn_mexp;
+ float vn_w1;
+ float vn_w2;
+ float vn_w3;
+ float vn_w4;
+ float vn_mexp;
short vn_distm, vn_coltype;
short noisedepth, noisetype;
Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c 2009-08-08 11:44:56 UTC (rev 22306)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c 2009-08-08 14:17:55 UTC (rev 22307)
@@ -1085,17 +1085,34 @@
RNA_def_struct_ui_text(srna, "Voronoi", "Procedural voronoi texture.");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "feature_weights", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "weight_1", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_w1");
- RNA_def_property_array(prop, 4);
RNA_def_property_range(prop, -2, 2);
- RNA_def_property_ui_text(prop, "Feature Weights", "");
+ RNA_def_property_ui_text(prop, "Weight 1", "Voronoi feature weight 1");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
+
+ prop= RNA_def_property(srna, "weight_2", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "vn_w2");
+ RNA_def_property_range(prop, -2, 2);
+ RNA_def_property_ui_text(prop, "Weight 2", "Voronoi feature weight 2");
+ RNA_def_property_update(prop, NC_TEXTURE, NULL);
+
+ prop= RNA_def_property(srna, "weight_3", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "vn_w3");
+ RNA_def_property_range(prop, -2, 2);
+ RNA_def_property_ui_text(prop, "Weight 3", "Voronoi feature weight 3");
+ RNA_def_property_update(prop, NC_TEXTURE, NULL);
+
+ prop= RNA_def_property(srna, "weight_4", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "vn_w4");
+ RNA_def_property_range(prop, -2, 2);
+ RNA_def_property_ui_text(prop, "Weight 4", "Voronoi feature weight 4");
+ RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "minkovsky_exponent", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_mexp");
RNA_def_property_range(prop, 0.01, 10);
- RNA_def_property_ui_text(prop, "Minkovsky Exponent", "");
+ RNA_def_property_ui_text(prop, "Minkovsky Exponent", "Minkovsky exponent");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "distance_metric", PROP_ENUM, PROP_NONE);
More information about the Bf-blender-cvs
mailing list