Commit: fe98aed876d47af59eb690e9913636e3ad454d7a Author: Joshua Leung Date: Tue Jul 10 17:25:40 2018 +1200 Branches: greasepencil-object https://developer.blender.org/rBfe98aed876d47af59eb690e9913636e3ad454d7a
Cleanup: Remove GPENCIL_OT_color_choose This isn't used anywhere, and should really even need to be used for any purpose. =================================================================== M source/blender/editors/gpencil/gpencil_data.c M source/blender/editors/gpencil/gpencil_intern.h M source/blender/editors/gpencil/gpencil_ops.c =================================================================== diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index 0459e48792e..a20eabe055d 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -2403,38 +2403,3 @@ void GPENCIL_OT_color_select(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } - -/* ***************** Choose color by index ************************ */ -static int gpencil_color_choose_exec(bContext *C, wmOperator *op) -{ - const int index = RNA_int_get(op->ptr, "index"); - - Object *ob = CTX_data_active_object(C); - if (ob == NULL) - return OPERATOR_CANCELLED; - - ob->actcol = index + 1; - - /* notifiers */ - WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL); - - return OPERATOR_FINISHED; -} - -void GPENCIL_OT_color_choose(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Choose Color"; - ot->idname = "GPENCIL_OT_color_choose"; - ot->description = "Active a gpencil_ color"; - - /* callbacks */ - ot->exec = gpencil_color_choose_exec; - ot->poll = gpencil_active_color_poll; - - /* flags */ - ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - - /* properties */ - RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "Index of Color", 0, INT_MAX); -} diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index b58ca3fb339..924c3a6631f 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -416,7 +416,6 @@ void GPENCIL_OT_color_reveal(struct wmOperatorType *ot); void GPENCIL_OT_color_lock_all(struct wmOperatorType *ot); void GPENCIL_OT_color_unlock_all(struct wmOperatorType *ot); void GPENCIL_OT_color_select(struct wmOperatorType *ot); -void GPENCIL_OT_color_choose(struct wmOperatorType *ot); /* convert old 2.7 files to 2.8 */ void GPENCIL_OT_convert_old_files(struct wmOperatorType *ot); diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c index fd96b10e779..b61a9d3f0b8 100644 --- a/source/blender/editors/gpencil/gpencil_ops.c +++ b/source/blender/editors/gpencil/gpencil_ops.c @@ -765,7 +765,6 @@ void ED_operatortypes_gpencil(void) WM_operatortype_append(GPENCIL_OT_color_lock_all); WM_operatortype_append(GPENCIL_OT_color_unlock_all); WM_operatortype_append(GPENCIL_OT_color_select); - WM_operatortype_append(GPENCIL_OT_color_choose); /* Editing (Time) --------------- */ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs