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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-12 18:57:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-12 18:57:19 +0400
commit32254596d4de9558b7af81bfe69db5d160a97769 (patch)
tree022629de72b05ce7bf7165ed43a123435de7b9ab /source/blender/editors/object/object_select.c
parent82688e61fc330022bd8685a5a137fca024a60b8a (diff)
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()
Diffstat (limited to 'source/blender/editors/object/object_select.c')
-rw-r--r--source/blender/editors/object/object_select.c11
1 files changed, 6 insertions, 5 deletions
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)