[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57614] branches/soc-2013-paint: Expose drag dot mode UI for texpaint (still not functional)
Antony Riakiotakis
kalast at gmail.com
Thu Jun 20 17:30:19 CEST 2013
Revision: 57614
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57614
Author: psy-fi
Date: 2013-06-20 15:30:18 +0000 (Thu, 20 Jun 2013)
Log Message:
-----------
Expose drag dot mode UI for texpaint (still not functional)
Modified Paths:
--------------
branches/soc-2013-paint/release/scripts/startup/bl_ui/space_image.py
branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d.py
branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_ops.c
branches/soc-2013-paint/source/blender/makesrna/intern/rna_brush.c
Modified: branches/soc-2013-paint/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- branches/soc-2013-paint/release/scripts/startup/bl_ui/space_image.py 2013-06-20 15:30:11 UTC (rev 57613)
+++ branches/soc-2013-paint/release/scripts/startup/bl_ui/space_image.py 2013-06-20 15:30:18 UTC (rev 57614)
@@ -821,7 +821,7 @@
col.label(text="Stroke Method:")
- col.prop(brush, "stroke_method", text="")
+ col.prop(brush, "texpaint_stroke_method", text="")
if brush.use_anchor:
col.separator()
Modified: branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d.py 2013-06-20 15:30:11 UTC (rev 57613)
+++ branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d.py 2013-06-20 15:30:18 UTC (rev 57614)
@@ -1240,7 +1240,7 @@
layout.separator()
if sculpt_tool != 'GRAB':
- layout.prop_menu_enum(brush, "stroke_method")
+ layout.prop_menu_enum(brush, "sculpt_stroke_method")
if sculpt_tool in {'DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'}:
layout.prop_menu_enum(brush, "direction")
Modified: branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2013-06-20 15:30:11 UTC (rev 57613)
+++ branches/soc-2013-paint/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2013-06-20 15:30:18 UTC (rev 57614)
@@ -888,6 +888,8 @@
if context.sculpt_object:
col.prop(brush, "sculpt_stroke_method", text="")
+ elif context.image_paint_object:
+ col.prop(brush, "texpaint_stroke_method", text="")
else:
col.prop(brush, "stroke_method", text="")
Modified: branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_ops.c
===================================================================
--- branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_ops.c 2013-06-20 15:30:11 UTC (rev 57613)
+++ branches/soc-2013-paint/source/blender/editors/sculpt_paint/paint_ops.c 2013-06-20 15:30:18 UTC (rev 57614)
@@ -1279,7 +1279,7 @@
RNA_string_set(kmi->ptr, "data_path", "tool_settings.image_paint.brush.texture_angle_source_random");
kmi = WM_keymap_add_item(keymap, "WM_OT_context_menu_enum", AKEY, KM_PRESS, 0, 0);
- RNA_string_set(kmi->ptr, "data_path", "tool_settings.image_paint.brush.stroke_method");
+ RNA_string_set(kmi->ptr, "data_path", "tool_settings.image_paint.brush.texpaint_stroke_method");
/* face-mask mode */
keymap = WM_keymap_find(keyconf, "Face Mask", 0, 0);
Modified: branches/soc-2013-paint/source/blender/makesrna/intern/rna_brush.c
===================================================================
--- branches/soc-2013-paint/source/blender/makesrna/intern/rna_brush.c 2013-06-20 15:30:11 UTC (rev 57613)
+++ branches/soc-2013-paint/source/blender/makesrna/intern/rna_brush.c 2013-06-20 15:30:18 UTC (rev 57614)
@@ -621,6 +621,14 @@
{0, NULL, 0, NULL, NULL}
};
+ static EnumPropertyItem texpaint_stroke_method_items[] = {
+ {0, "DOTS", 0, "Dots", "Apply paint on each mouse move step"},
+ {BRUSH_RESTORE_MESH, "DRAG_DOT", 0, "Drag Dot", "Allows a single dot to be carefully positioned"},
+ {BRUSH_SPACE, "SPACE", 0, "Space", "Limit brush application to the distance specified by spacing"},
+ {BRUSH_AIRBRUSH, "AIRBRUSH", 0, "Airbrush", "Keep applying paint effect while holding mouse (spray)"},
+ {0, NULL, 0, NULL, NULL}
+ };
+
static EnumPropertyItem texture_angle_source_items[] = {
{0, "USER", 0, "User", "Rotate the brush texture by given angle"},
{BRUSH_RAKE, "RAKE", 0, "Rake", "Rotate the brush texture to match the stroke direction"},
@@ -689,6 +697,12 @@
RNA_def_property_ui_text(prop, "Stroke Method", "");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "texpaint_stroke_method", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, texpaint_stroke_method_items);
+ RNA_def_property_ui_text(prop, "Stroke Method", "");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "sculpt_stroke_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, sculpt_stroke_method_items);
More information about the Bf-blender-cvs
mailing list