diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-03 21:29:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-03 21:29:43 +0400 |
commit | 3b996ac1b3fcc93b121a9d4ef6024d5638df780f (patch) | |
tree | cccdc4f8ea12efa3d23657d6a2a3e82b11cda828 /source/blender/editors/object/object_relations.c | |
parent | 75621eeff97d5765ecd3cdea1873d5c40baad0d6 (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.c | 6 |
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: |