[Bf-blender-cvs] [caaeaf9] blender-v2.72-release: Fix T42311, too many paint slots added.
Antony Riakiotakis
noreply at git.blender.org
Tue Oct 21 12:14:52 CEST 2014
Commit: caaeaf922b341f32a645af0c6bdc9aae10ff2249
Author: Antony Riakiotakis
Date: Mon Oct 20 20:08:22 2014 +0200
Branches: blender-v2.72-release
https://developer.blender.org/rBcaaeaf922b341f32a645af0c6bdc9aae10ff2249
Fix T42311, too many paint slots added.
Don't allow the add paint slot operator to redo. Also guard better against
excessive slot addition
===================================================================
M source/blender/editors/sculpt_paint/paint_image_proj.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 7fe1307..a173887 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -5086,9 +5086,8 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op)
ima = mtex->tex->ima = proj_paint_image_create(op, bmain);
}
- WM_event_add_notifier(C, NC_TEXTURE, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_TEXTURE | NA_ADDED, mtex->tex);
}
- WM_event_add_notifier(C, NC_TEXTURE | NA_ADDED, mtex->tex);
}
if (ima) {
@@ -5160,7 +5159,7 @@ void PAINT_OT_add_texture_paint_slot(wmOperatorType *ot)
ot->poll = ED_operator_region_view3d_active;
/* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
prop = RNA_def_enum(ot->srna, "type", layer_type_items, 0, "Type", "Merge method to use");
More information about the Bf-blender-cvs
mailing list