From b6bcfd2a6e73f25f9d60df8ea41e30cb9c57a1a2 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Tue, 7 Jan 2020 11:44:51 +0100 Subject: GPencil: Remove is_annotation parameter Now, the name of the operator is used. --- source/blender/editors/gpencil/gpencil_edit.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'source/blender/editors/gpencil') diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index d47db0a3ce8..8d0fe73572f 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -1662,7 +1662,7 @@ static bool gp_annotation_actframe_delete_poll(bContext *C) /* delete active frame - wrapper around API calls */ static int gp_actframe_delete_exec(bContext *C, wmOperator *op) { - const int is_annotation = RNA_boolean_get(op->ptr, "is_annotation"); + const bool is_annotation = STREQ(op->idname, "GPENCIL_OT_annotation_active_frame_delete"); bGPdata *gpd = (!is_annotation) ? ED_gpencil_data_get_active(C) : ED_annotation_data_get_active(C); @@ -1695,8 +1695,6 @@ static int gp_actframe_delete_exec(bContext *C, wmOperator *op) void GPENCIL_OT_active_frame_delete(wmOperatorType *ot) { - PropertyRNA *prop; - /* identifiers */ ot->name = "Delete Active Frame"; ot->idname = "GPENCIL_OT_active_frame_delete"; @@ -1707,15 +1705,10 @@ void GPENCIL_OT_active_frame_delete(wmOperatorType *ot) /* callbacks */ ot->exec = gp_actframe_delete_exec; ot->poll = gp_actframe_delete_poll; - - prop = RNA_def_boolean(ot->srna, "is_annotation", false, "Annotation", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); } void GPENCIL_OT_annotation_active_frame_delete(wmOperatorType *ot) { - PropertyRNA *prop; - /* identifiers */ ot->name = "Delete Active Frame"; ot->idname = "GPENCIL_OT_annotation_active_frame_delete"; @@ -1726,9 +1719,6 @@ void GPENCIL_OT_annotation_active_frame_delete(wmOperatorType *ot) /* callbacks */ ot->exec = gp_actframe_delete_exec; ot->poll = gp_annotation_actframe_delete_poll; - - prop = RNA_def_boolean(ot->srna, "is_annotation", true, "Annotation", ""); - RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); } /* **************** Delete All Active Frames ****************** */ -- cgit v1.2.3