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>2011-10-03 21:29:43 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-03 21:29:43 +0400
commit3b996ac1b3fcc93b121a9d4ef6024d5638df780f (patch)
treecccdc4f8ea12efa3d23657d6a2a3e82b11cda828 /source/blender/editors/object/object_relations.c
parent75621eeff97d5765ecd3cdea1873d5c40baad0d6 (diff)
add macro OB_TYPE_SUPPORT_MATERIAL, type checks were being done inline, some comparing range, some using ELEM#(), once was missing metaball check.
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r--source/blender/editors/object/object_relations.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index ec5aa19d3c0..389c0941cc2 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1243,9 +1243,11 @@ static int allow_make_links_data(int ev, Object *ob, Object *obt)
return 1;
break;
case MAKE_LINKS_MATERIALS:
- if (ELEM5(ob->type, OB_MESH, OB_CURVE, OB_FONT, OB_SURF, OB_MBALL) &&
- ELEM5(obt->type, OB_MESH, OB_CURVE, OB_FONT, OB_SURF, OB_MBALL))
+ if (OB_TYPE_SUPPORT_MATERIAL(ob->type) &&
+ OB_TYPE_SUPPORT_MATERIAL(obt->type))
+ {
return 1;
+ }
break;
case MAKE_LINKS_ANIMDATA:
case MAKE_LINKS_DUPLIGROUP: