[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29157] branches/soc-2010-jwilkins: * re-enabled the angle control for texture maps ( this is actually in previous update)
Jason Wilkins
Jason.A.Wilkins at gmail.com
Wed Jun 2 14:50:37 CEST 2010
Revision: 29157
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29157
Author: jwilkins
Date: 2010-06-02 14:50:37 +0200 (Wed, 02 Jun 2010)
Log Message:
-----------
* re-enabled the angle control for texture maps (this is actually in previous update)
* changed spacing slider to say "Spacing" instead of "Distance". Can't get the slider to restrict user to increments of 5
* Made spacing slider a percentage type slider
Modified Paths:
--------------
branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py
branches/soc-2010-jwilkins/source/blender/blenkernel/intern/brush.c
branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h
branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c
Modified: branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py 2010-06-02 12:20:13 UTC (rev 29156)
+++ branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py 2010-06-02 12:50:37 UTC (rev 29157)
@@ -758,7 +758,7 @@
layout.prop(brush, "use_space")
row = layout.row(align=True)
row.active = brush.use_space
- row.prop(brush, "spacing", text="Distance", slider=True)
+ row.prop(brush, "spacing", text="Spacing", slider=True)
if texture_paint:
row.prop(brush, "use_spacing_pressure", toggle=True, text="")
Modified: branches/soc-2010-jwilkins/source/blender/blenkernel/intern/brush.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/blenkernel/intern/brush.c 2010-06-02 12:20:13 UTC (rev 29156)
+++ branches/soc-2010-jwilkins/source/blender/blenkernel/intern/brush.c 2010-06-02 12:50:37 UTC (rev 29157)
@@ -77,7 +77,7 @@
brush->size= 25;
brush->plane_offset= 0.0f;
brush->texture_offset = 0.0f;
- brush->spacing= 15.0f;
+ brush->spacing= 15;
brush->smooth_stroke_radius= 75;
brush->smooth_stroke_factor= 0.9;
brush->rate= 0.1f;
Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c 2010-06-02 12:20:13 UTC (rev 29156)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c 2010-06-02 12:50:37 UTC (rev 29157)
@@ -670,7 +670,7 @@
float pressure = brush->flag & BRUSH_ALPHA_PRESSURE ? cache->pressure : 1;
float flip = cache->flip ? -1 : 1;
//float overlap = (brush->flag & BRUSH_SPACE && !(brush->flag & BRUSH_ANCHORED)) && (brush->spacing < 100.0f) ? 1 - circle_overlap_percent(brush->spacing/50.0f) : 1; // spacing is integer percentage of radius, divide by 50 to get normalized diameter
- float overlap = (brush->flag & BRUSH_SPACE && !(brush->flag & BRUSH_ANCHORED)) && (brush->spacing < 100.0f) ? brush->spacing/100.0f : 1; // spacing is integer percentage of radius, divide by 50 to get normalized diameter
+ float overlap = (brush->flag & BRUSH_SPACE && !(brush->flag & BRUSH_ANCHORED)) && (brush->spacing < 100) ? (float)brush->spacing/100.0f : 1; // spacing is integer percentage of radius, divide by 50 to get normalized diameter
switch(brush->sculpt_tool){
case SCULPT_TOOL_DRAW:
Modified: branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h 2010-06-02 12:20:13 UTC (rev 29156)
+++ branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h 2010-06-02 12:50:37 UTC (rev 29157)
@@ -59,7 +59,7 @@
int flag; /* general purpose flag */
float detail; /* dynamic subdivission detail */
float jitter; /* jitter the position of the brush */
- float spacing; /* spacing of paint operations */
+ int spacing; /* spacing of paint operations */
int smooth_stroke_radius; /* turning radius (in pixels) for smooth stroke */
float smooth_stroke_factor; /* higher values limit fast changes in the stroke direction */
float rate; /* paint operations / second (airbrush) */
Modified: branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c 2010-06-02 12:20:13 UTC (rev 29156)
+++ branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c 2010-06-02 12:50:37 UTC (rev 29157)
@@ -208,10 +208,11 @@
RNA_def_property_ui_text(prop, "Jitter", "Jitter the position of the brush while painting");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "spacing", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "spacing");
- RNA_def_property_range(prop, 1.0f, 500.0f);
- RNA_def_property_ui_text(prop, "Spacing", "Spacing between brush stamps as a percentage of brush diameter");
+ prop= RNA_def_property(srna, "spacing", PROP_INT, PROP_PERCENTAGE);
+ RNA_def_property_int_sdna(prop, NULL, "spacing");
+ RNA_def_property_range(prop, 1, 1000);
+ RNA_def_property_ui_range(prop, 1, 500, 5, 0);
+ RNA_def_property_ui_text(prop, "Spacing", "Spacing between brush daubs as a percentage of brush diameter");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "smooth_stroke_radius", PROP_INT, PROP_NONE);
@@ -237,13 +238,13 @@
RNA_def_property_ui_text(prop, "Color", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "alpha");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Strength", "The amount of pressure on the brush");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- prop= RNA_def_property(srna, "plane_offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "plane_offset", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "plane_offset");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Plane Offset", "Adjusts the plane on which the brush acts");
@@ -252,7 +253,7 @@
prop= RNA_def_property(srna, "texture_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "texture_offset");
RNA_def_property_range(prop, -1.0f, 0.0f);
- RNA_def_property_ui_text(prop, "Texture Offset", "Allows base level of texture to be biased so that samples can have negative values");
+ RNA_def_property_ui_text(prop, "Tex Offset", "Allows base level of texture to be biased so that samples can have negative values");
RNA_def_property_update(prop, 0, "rna_Brush_update");
/* flag */
More information about the Bf-blender-cvs
mailing list