[Bf-blender-cvs] [6e56db8] master: Paint system

Antony Riakiotakis noreply at git.blender.org
Sat Sep 20 23:47:29 CEST 2014


Commit: 6e56db8ce26ce107a4123e21ba222fb897ba340c
Author: Antony Riakiotakis
Date:   Sat Sep 20 23:47:10 2014 +0200
Branches: master
https://developer.blender.org/rB6e56db8ce26ce107a4123e21ba222fb897ba340c

Paint system

* Add unified color settings to brush menus.
* Add notifier on fill tool from drag and drop to refresh icons

===================================================================

M	release/scripts/startup/bl_ui/space_image.py
M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/editors/sculpt_paint/paint_image.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 8fd0ded..c90e4cd 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -154,6 +154,7 @@ class IMAGE_MT_brush(Menu):
         ups = context.tool_settings.unified_paint_settings
         layout.prop(ups, "use_unified_size", text="Unified Size")
         layout.prop(ups, "use_unified_strength", text="Unified Strength")
+        layout.prop(ups, "use_unified_color", text="Unified Color")
         layout.separator()
 
         # brush tool
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 1e2fac1..3d0e767 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1424,6 +1424,8 @@ class VIEW3D_MT_brush(Menu):
         ups = context.tool_settings.unified_paint_settings
         layout.prop(ups, "use_unified_size", text="Unified Size")
         layout.prop(ups, "use_unified_strength", text="Unified Strength")
+        if context.image_paint_object or context.vertex_paint_object:
+            layout.prop(ups, "use_unified_color", text="Unified Color")
         layout.separator()
 
         # brush paint modes
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 7c19528..f83dd3d 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1482,12 +1482,17 @@ void PAINT_OT_brush_colors_flip(wmOperatorType *ot)
 
 void ED_imapaint_bucket_fill(struct bContext *C, float color[3], wmOperator *op)
 {
+	SpaceImage *sima = CTX_wm_space_image(C);
+	Image *ima = sima->image;
+
 	ED_undo_paint_push_begin(UNDO_PAINT_IMAGE, op->type->name,
 	                      ED_image_undo_restore, ED_image_undo_free, NULL);
 
 	paint_2d_bucket_fill(C, color, NULL, NULL, NULL);
 
 	ED_undo_paint_push_end(UNDO_PAINT_IMAGE);
+
+	DAG_id_tag_update(&ima->id, 0);
 }




More information about the Bf-blender-cvs mailing list