[Bf-blender-cvs] [b6bcfd2a6e7] master: GPencil: Remove is_annotation parameter
Antonio Vazquez
noreply at git.blender.org
Tue Jan 7 11:45:06 CET 2020
Commit: b6bcfd2a6e73f25f9d60df8ea41e30cb9c57a1a2
Author: Antonio Vazquez
Date: Tue Jan 7 11:44:51 2020 +0100
Branches: master
https://developer.blender.org/rBb6bcfd2a6e73f25f9d60df8ea41e30cb9c57a1a2
GPencil: Remove is_annotation parameter
Now, the name of the operator is used.
===================================================================
M source/blender/editors/gpencil/gpencil_edit.c
===================================================================
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 ****************** */
More information about the Bf-blender-cvs
mailing list