diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/object/object_add.c | 27 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 1 |
2 files changed, 1 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); } /** \} */ diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index b04fea11a4d..b53318cfbfe 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -160,6 +160,7 @@ const EnumPropertyItem rna_enum_object_gpencil_type_items[] = { {GP_EMPTY, "EMPTY", ICON_EMPTY_AXIS, "Blank", "Create an empty grease pencil object"}, {GP_STROKE, "STROKE", ICON_STROKE, "Stroke", "Create a simple stroke with basic colors"}, {GP_MONKEY, "MONKEY", ICON_MONKEY, "Monkey", "Construct a Suzanne grease pencil object"}, + {0, "", 0, NULL, NULL}, {GP_LRT_SCENE, "LRT_SCENE", ICON_SCENE_DATA, |