From 32254596d4de9558b7af81bfe69db5d160a97769 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 12 Aug 2012 14:57:19 +0000 Subject: replace ELEM8(gs, ID_ME, ID_CU, ID_MB, ID_LT, ID_LA, ID_CA, ID_TXT, ID_SPK) with macro: OB_DATA_SUPPORT_ID() --- source/blender/editors/object/object_select.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/object/object_select.c') diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index ac3210348de..ff7728d4f68 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -388,21 +388,22 @@ static int object_select_all_by_library_obdata(bContext *C, Library *lib) void ED_object_select_linked_by_id(bContext *C, ID *id) { - int gs = GS(id->name); + int idtype = GS(id->name); int changed = FALSE; - if (ELEM8(gs, ID_ME, ID_CU, ID_MB, ID_LT, ID_LA, ID_CA, ID_TXT, ID_SPK)) { + if (OB_DATA_SUPPORT_ID(idtype)) { changed = object_select_all_by_obdata(C, id); } - else if (gs == ID_MA) { + else if (idtype == ID_MA) { changed = object_select_all_by_material_texture(C, FALSE, (Material *)id, NULL); } - else if (gs == ID_LI) { + else if (idtype == ID_LI) { changed = object_select_all_by_library(C, (Library *) id); } - if (changed) + if (changed) { WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, CTX_data_scene(C)); + } } static int object_select_linked_exec(bContext *C, wmOperator *op) -- cgit v1.2.3