[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30978] branches/soc-2010-jwilkins: * Fix: made 'Feather' option per brush instead of global
Jason Wilkins
Jason.A.Wilkins at gmail.com
Mon Aug 2 15:09:50 CEST 2010
Revision: 30978
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30978
Author: jwilkins
Date: 2010-08-02 15:09:50 +0200 (Mon, 02 Aug 2010)
Log Message:
-----------
* Fix: made 'Feather' option per brush instead of global
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/makesdna/DNA_scene_types.h
branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c
branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_sculpt_paint.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-08-02 12:38:08 UTC (rev 30977)
+++ branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py 2010-08-02 13:09:50 UTC (rev 30978)
@@ -1020,8 +1020,8 @@
row.prop(sculpt, "lock_y", text="Y", toggle=True)
row.prop(sculpt, "lock_z", text="Z", toggle=True)
-
-
+
+
class VIEW3D_PT_sculpt_symmetry(PaintPanel):
bl_label = "Symmetry"
bl_default_closed = True
@@ -1058,7 +1058,7 @@
col.separator()
- col.prop(sculpt, "use_symmetry_feather", text="Feather")
+ col.prop(brush, "use_symmetry_feather", text="Feather")
class VIEW3D_PT_tools_brush_appearance(PaintPanel):
bl_label = "Appearance"
Modified: branches/soc-2010-jwilkins/source/blender/blenkernel/intern/brush.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/blenkernel/intern/brush.c 2010-08-02 12:38:08 UTC (rev 30977)
+++ branches/soc-2010-jwilkins/source/blender/blenkernel/intern/brush.c 2010-08-02 13:09:50 UTC (rev 30978)
@@ -96,7 +96,7 @@
brush->jitter= 0.0f;
- brush->adaptive_space_factor = 1;
+ brush->adaptive_space_factor= 1;
/* BRUSH TEXTURE SETTINGS */
default_mtex(&brush->mtex);
Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c 2010-08-02 12:38:08 UTC (rev 30977)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c 2010-08-02 13:09:50 UTC (rev 30978)
@@ -610,7 +610,9 @@
static float calc_symmetry_feather(Sculpt *sd, StrokeCache* cache)
{
- if (sd->flags & SCULPT_SYMMETRY_FEATHER) {
+ Brush *brush= paint_brush(&(sd->paint));
+
+ if (brush->flag & BRUSH_SYMMETRY_FEATHER) {
float overlap;
int symm = cache->symmetry;
int i;
Modified: branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h 2010-08-02 12:38:08 UTC (rev 30977)
+++ branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h 2010-08-02 13:09:50 UTC (rev 30978)
@@ -129,6 +129,7 @@
#define BRUSH_PLANE_TRIM (1<<26)
#define BRUSH_FRONTFACE (1<<27)
#define BRUSH_CUSTOM_ICON (1<<28)
+#define BRUSH_SYMMETRY_FEATHER (1<<29)
/* Brush.sculpt_tool */
#define SCULPT_TOOL_DRAW 1
Modified: branches/soc-2010-jwilkins/source/blender/makesdna/DNA_scene_types.h
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesdna/DNA_scene_types.h 2010-08-02 12:38:08 UTC (rev 30977)
+++ branches/soc-2010-jwilkins/source/blender/makesdna/DNA_scene_types.h 2010-08-02 13:09:50 UTC (rev 30978)
@@ -1143,7 +1143,7 @@
SCULPT_LOCK_X = (1<<3),
SCULPT_LOCK_Y = (1<<4),
SCULPT_LOCK_Z = (1<<5),
- SCULPT_SYMMETRY_FEATHER = (1<<6),
+// SCULPT_SYMMETRY_FEATHER = (1<<6),
SCULPT_USE_OPENMP = (1<<7),
} SculptFlags;
Modified: branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c 2010-08-02 12:38:08 UTC (rev 30977)
+++ branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c 2010-08-02 13:09:50 UTC (rev 30978)
@@ -686,6 +686,11 @@
RNA_def_property_ui_text(prop, "Use Front-Face", "Brush only affects vertexes that face the viewer");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop= RNA_def_property(srna, "use_symmetry_feather", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SYMMETRY_FEATHER);
+ RNA_def_property_ui_text(prop, "Symmetry Feathering", "Reduce the strength of the brush where it overlaps symmetrical daubs");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop= RNA_def_property(srna, "use_anchor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ANCHORED);
RNA_def_property_ui_text(prop, "Anchored", "Keep the brush anchored to the initial location");
Modified: branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_sculpt_paint.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_sculpt_paint.c 2010-08-02 12:38:08 UTC (rev 30977)
+++ branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_sculpt_paint.c 2010-08-02 13:09:50 UTC (rev 30978)
@@ -337,10 +337,6 @@
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_LOCK_Z);
RNA_def_property_ui_text(prop, "Lock Z", "Disallow changes to the Z axis of vertices");
- prop= RNA_def_property(srna, "use_symmetry_feather", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMMETRY_FEATHER);
- RNA_def_property_ui_text(prop, "Symmetry Feathering", "Reduce the strength of the brush where it overlaps symmetrical daubs");
-
prop= RNA_def_property(srna, "use_openmp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_USE_OPENMP);
RNA_def_property_ui_text(prop, "Use OpenMP", "Take advantage of multiple CPU cores to improve sculpting performance");
More information about the Bf-blender-cvs
mailing list