[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30016] branches/soc-2010-jwilkins: * added code from trunk for getting proper paint events
Jason Wilkins
Jason.A.Wilkins at gmail.com
Tue Jul 6 09:45:03 CEST 2010
Revision: 30016
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30016
Author: jwilkins
Date: 2010-07-06 09:45:03 +0200 (Tue, 06 Jul 2010)
Log Message:
-----------
* added code from trunk for getting proper paint events
* cleaned up some commented code
Modified Paths:
--------------
branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowWin32.cpp
branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c
branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c
Modified: branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowWin32.cpp 2010-07-06 07:41:50 UTC (rev 30015)
+++ branches/soc-2010-jwilkins/intern/ghost/intern/GHOST_WindowWin32.cpp 2010-07-06 07:45:03 UTC (rev 30016)
@@ -93,7 +93,7 @@
0, /* no accumulation buffer */
0, 0, 0, 0, /* accum bits (ignored) */
32, /* depth buffer */
- 1, /* no stencil buffer */
+ 1, /* stencil buffer */
0, /* no auxiliary buffers */
PFD_MAIN_PLANE, /* main layer */
0, /* reserved */
Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c 2010-07-06 07:41:50 UTC (rev 30015)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/paint_stroke.c 2010-07-06 07:45:03 UTC (rev 30016)
@@ -953,7 +953,7 @@
MEM_freeN(stroke);
return OPERATOR_FINISHED;
}
- else if(first || event->type == MOUSEMOVE || (event->type == TIMER && (event->customdata == stroke->timer))) {
+ else if(first || ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE) || (event->type == TIMER && (event->customdata == stroke->timer))) {
if(stroke->stroke_started) {
if(paint_smooth_stroke(stroke, mouse, event)) {
if(paint_space_stroke_enabled(stroke->brush)) {
Modified: branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c 2010-07-06 07:41:50 UTC (rev 30015)
+++ branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c 2010-07-06 07:45:03 UTC (rev 30016)
@@ -130,15 +130,6 @@
{SCULPT_TOOL_SCRAPE, "SCRAPE", 0, "Scrape", ""},
{0, NULL, 0, NULL, NULL}};
- //static EnumPropertyItem brush_stroke_tool_items[] = {
- // {STROKE_TOOL_DOTS, "DOTS", 0, "Dots", ""},
- // {STROKE_TOOL_SPACE, "SPACE", 0, "Space", ""},
- // {STROKE_TOOL_FREEHAND, "FREEHAND", 0, "Freehand", ""},
- // {STROKE_TOOL_SMOOTH, "SMOOTH", 0, "Smooth", ""},
- // {STROKE_TOOL_AIRBRUSH, "AIRBRUSH", 0, "Airbrush", ""},
- // {STROKE_TOOL_ANCHORED, "ANCHORED", 0, "Anchored", ""},
- // {0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem brush_stroke_method_items[] = {
{0, "DOTS", 0, "Dots", ""},
{BRUSH_RESTORE_MESH, "DRAG_DOT", 0, "Drag Dot", ""},
@@ -228,11 +219,6 @@
RNA_def_property_ui_text(prop, "Sculpt Tool", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
- //prop= RNA_def_property(srna, "stroke_tool", PROP_ENUM, PROP_NONE);
- //RNA_def_property_enum_items(prop, brush_stroke_tool_items);
- //RNA_def_property_ui_text(prop, "Stroke Tool", "");
- //RNA_def_property_update(prop, 0, "rna_Brush_update");
-
prop= RNA_def_property(srna, "vertexpaint_tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, brush_vertexpaint_tool_items);
RNA_def_property_ui_text(prop, "Vertex/Weight Paint Tool", "");
@@ -493,6 +479,7 @@
RNA_def_property_ui_text(prop, "Use Automatic Strength Adjustment", "Automatically adjusts strength to give consistent results for different spacings");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ /* adaptive space is not implemented yet */
prop= RNA_def_property(srna, "use_adaptive_space", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ADAPTIVE_SPACE);
RNA_def_property_ui_text(prop, "Adaptive Spacing", "Space daubs according to surface orientation instead of screen space");
@@ -548,39 +535,6 @@
RNA_def_property_ui_text(prop, "Texture", "");
RNA_def_property_update(prop, NC_TEXTURE, "rna_Brush_update");
- //prop= RNA_def_property(srna, "texture_scale_x", PROP_FLOAT, PROP_FACTOR);
- //RNA_def_property_float_sdna(prop, NULL, "texture_scale_x");
- //RNA_def_property_range(prop, -10, 10);
- //RNA_def_property_ui_range(prop, -2, 2, 1, 0);
- //RNA_def_property_ui_text(prop, "Texture Scale X", "");
- //RNA_def_property_update(prop, 0, "rna_Brush_update");
-
- //prop= RNA_def_property(srna, "texture_scale_y", PROP_FLOAT, PROP_FACTOR);
- //RNA_def_property_float_sdna(prop, NULL, "texture_scale_y");
- //RNA_def_property_range(prop, -10, 10);
- //RNA_def_property_ui_range(prop, -2, 2, 1, 0);
- //RNA_def_property_ui_text(prop, "Texture Scale Y", "");
- //RNA_def_property_update(prop, 0, "rna_Brush_update");
-
- //prop= RNA_def_property(srna, "texture_scale_factor", PROP_FLOAT, PROP_PERCENTAGE);
- //RNA_def_property_float_sdna(prop, NULL, "texture_scale_factor");
- //RNA_def_property_range(prop, 0, 10);
- //RNA_def_property_ui_range(prop, 0, 2, 1, 0);
- //RNA_def_property_ui_text(prop, "Texture Scale Factor", "");
- //RNA_def_property_update(prop, 0, "rna_Brush_update");
-
- //prop= RNA_def_property(srna, "texture_center_x", PROP_FLOAT, PROP_DISTANCE);
- //RNA_def_property_float_sdna(prop, NULL, "texture_center_x");
- //RNA_def_property_range(prop, -0.5, 0.5);
- //RNA_def_property_ui_text(prop, "Texture Center X", "");
- //RNA_def_property_update(prop, 0, "rna_Brush_update");
-
- //prop= RNA_def_property(srna, "texture_center_y", PROP_FLOAT, PROP_DISTANCE);
- //RNA_def_property_float_sdna(prop, NULL, "texture_center_y");
- //RNA_def_property_range(prop, -0.5, 0.5);
- //RNA_def_property_ui_text(prop, "Texture Center Y", "");
- //RNA_def_property_update(prop, 0, "rna_Brush_update");
-
prop= RNA_def_property(srna, "texture_overlay_alpha", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "texture_overlay_alpha");
RNA_def_property_range(prop, 1, 100);
@@ -672,7 +626,7 @@
/* XXX: Tool (this will be for pressing a modifier key for a different brush,
e.g. switching to a Smooth brush in the middle of the stroke */
- // XXX: i don't think blender currently supports the ability to property do a properly remappable modifier in the middle of a stroke
+ // XXX: i don't think blender currently supports the ability to properly do a remappable modifier in the middle of a stroke
}
void RNA_def_brush(BlenderRNA *brna)
More information about the Bf-blender-cvs
mailing list