[Bf-blender-cvs] [ba6abd83b03] blender2.8: Cleanup: do not make functions for the pleasure of having functions...
Bastien Montagne
noreply at git.blender.org
Fri May 25 11:39:51 CEST 2018
Commit: ba6abd83b039b20e3022e3179e199a1ae9894066
Author: Bastien Montagne
Date: Fri May 25 11:39:02 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBba6abd83b039b20e3022e3179e199a1ae9894066
Cleanup: do not make functions for the pleasure of having functions...
===================================================================
M source/blender/editors/sculpt_paint/paint_image.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 0479af3c58f..9ecdc44cd10 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -299,7 +299,7 @@ static int image_paint_poll(bContext *C)
return image_paint_poll_ex(C, true);
}
-static int image_paint_poll_ignore_tool(bContext *C)
+static int image_paint_ignore_tool_poll(bContext *C)
{
return image_paint_poll_ex(C, false);
}
@@ -1011,11 +1011,6 @@ static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
-static int sample_color_poll(bContext *C)
-{
- return (image_paint_poll_ignore_tool(C) || image_paint_poll_ignore_tool(C));
-}
-
void PAINT_OT_sample_color(wmOperatorType *ot)
{
/* identifiers */
@@ -1027,7 +1022,7 @@ void PAINT_OT_sample_color(wmOperatorType *ot)
ot->exec = sample_color_exec;
ot->invoke = sample_color_invoke;
ot->modal = sample_color_modal;
- ot->poll = sample_color_poll;
+ ot->poll = image_paint_ignore_tool_poll;
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
More information about the Bf-blender-cvs
mailing list