diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-01-07 13:44:51 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-01-07 13:44:51 +0300 |
commit | b6bcfd2a6e73f25f9d60df8ea41e30cb9c57a1a2 (patch) | |
tree | 7a00b926ae31850eaef9fb1f074f781f3a80df80 /source/blender/editors/gpencil | |
parent | fa3a0697b846bd0ed3766fcabd1bf6f260aa425a (diff) |
GPencil: Remove is_annotation parameter
Now, the name of the operator is used.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 12 |
1 files changed, 1 insertions, 11 deletions
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 ****************** */ |