diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 27 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 3 |
2 files changed, 11 insertions, 19 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index efb68f69dac..6993efefe21 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -5796,19 +5796,12 @@ static EnumPropertyItem merge_type_items[]= { static EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *ptr, int *free) { + Object *obedit; EnumPropertyItem *item= NULL; int totitem= 0; - Object *obedit; - - if(C==NULL) { - /* needed for doc generation */ - RNA_enum_items_add(&item, &totitem, merge_type_items); - RNA_enum_item_end(&item, &totitem); - - *free= 1; - return item; - } + if(!C) /* needed for docs */ + return merge_type_items; obedit= CTX_data_edit_object(C); if(obedit && obedit->type == OB_MESH) { @@ -5817,18 +5810,18 @@ static EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *ptr, int *fre if(em->selectmode & SCE_SELECT_VERTEX) { if(em->selected.first && em->selected.last && ((EditSelection*)em->selected.first)->type == EDITVERT && ((EditSelection*)em->selected.last)->type == EDITVERT) { - RNA_enum_item_add(&item, &totitem, &merge_type_items[0]); - RNA_enum_item_add(&item, &totitem, &merge_type_items[1]); + RNA_enum_items_add_value(&item, &totitem, merge_type_items, 6); + RNA_enum_items_add_value(&item, &totitem, merge_type_items, 1); } else if(em->selected.first && ((EditSelection*)em->selected.first)->type == EDITVERT) - RNA_enum_item_add(&item, &totitem, &merge_type_items[1]); + RNA_enum_items_add_value(&item, &totitem, merge_type_items, 1); else if(em->selected.last && ((EditSelection*)em->selected.last)->type == EDITVERT) - RNA_enum_item_add(&item, &totitem, &merge_type_items[0]); + RNA_enum_items_add_value(&item, &totitem, merge_type_items, 6); } - RNA_enum_item_add(&item, &totitem, &merge_type_items[2]); - RNA_enum_item_add(&item, &totitem, &merge_type_items[3]); - RNA_enum_item_add(&item, &totitem, &merge_type_items[4]); + RNA_enum_items_add_value(&item, &totitem, merge_type_items, 3); + RNA_enum_items_add_value(&item, &totitem, merge_type_items, 4); + RNA_enum_items_add_value(&item, &totitem, merge_type_items, 5); RNA_enum_item_end(&item, &totitem); *free= 1; diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 6d60c7602f4..605eb6996a5 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -366,7 +366,6 @@ EnumPropertyItem *BIF_enumTransformOrientation(bContext *C) EnumPropertyItem normal = {V3D_MANIP_NORMAL, "NORMAL", 0, "Normal", ""}; EnumPropertyItem local = {V3D_MANIP_LOCAL, "LOCAL", 0, "Local", ""}; EnumPropertyItem view = {V3D_MANIP_VIEW, "VIEW", 0, "View", ""}; - EnumPropertyItem sepr = {0, "", 0, NULL, NULL}; EnumPropertyItem tmp = {0, "", 0, "", ""}; EnumPropertyItem *item= NULL; int i = V3D_MANIP_CUSTOM, totitem= 0; @@ -386,7 +385,7 @@ EnumPropertyItem *BIF_enumTransformOrientation(bContext *C) } if(ts) - RNA_enum_item_add(&item, &totitem, &sepr); + RNA_enum_item_add_separator(&item, &totitem); for(; ts; ts = ts->next) { tmp.identifier = "CUSTOM"; |