Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-03-24 19:44:48 +0300
committerHans Goudey <h.goudey@me.com>2021-03-24 19:44:48 +0300
commit9ad3d1d36b64f336fabdd9b3d9f02b13740068b0 (patch)
treecf7c15613e7853f1be70672b885a875312d0b3d1 /source/blender/editors
parenta363d64b93cdebff92f2c84d4382d1227cf4425c (diff)
Cleanup: Remove unecessary enum funcs
The separator can be added directly in the enum items rather than in a callback. Differential Revision: https://developer.blender.org/D10806
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/object/object_add.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index b3fb497aa9a..50dc1af5ca8 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1440,32 +1440,6 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static const EnumPropertyItem *object_gpencil_add_options(bContext *UNUSED(C),
- PointerRNA *UNUSED(ptr),
- PropertyRNA *UNUSED(prop),
- bool *r_free)
-{
- EnumPropertyItem *item = NULL;
- const EnumPropertyItem *item_ref = rna_enum_object_gpencil_type_items;
- int totitem = 0;
- int i = 0;
- int orig_count = RNA_enum_items_count(item_ref);
-
- /* Default types. */
- for (i = 0; i < orig_count; i++) {
- if (item_ref[i].value == GP_LRT_SCENE) {
- /* separator before line art types */
- RNA_enum_item_add_separator(&item, &totitem);
- }
- RNA_enum_item_add(&item, &totitem, &item_ref[i]);
- }
-
- RNA_enum_item_end(&item, &totitem);
- *r_free = true;
-
- return item;
-}
-
void OBJECT_OT_gpencil_add(wmOperatorType *ot)
{
/* identifiers */
@@ -1486,7 +1460,6 @@ void OBJECT_OT_gpencil_add(wmOperatorType *ot)
ED_object_add_generic_props(ot, false);
ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_object_gpencil_type_items, 0, "Type", "");
- RNA_def_enum_funcs(ot->prop, object_gpencil_add_options);
}
/** \} */