diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-01 10:45:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-01 10:45:36 +0400 |
commit | bcdcbb65c159cc16b222fc5381e806a6b4f03fb0 (patch) | |
tree | 55d0e97ef22204d56815906773715c719f7ef5c6 /source/blender/editors/object/object_vgroup.c | |
parent | e3f03d72b6e0a24a2c87e94c68c5f6452ad91e94 (diff) |
macro to check if an object type supports vgroups
Diffstat (limited to 'source/blender/editors/object/object_vgroup.c')
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index d4ee68f8b72..ce6730ab1ed 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -99,8 +99,7 @@ int ED_vgroup_object_is_edit_mode(Object *ob) bDeformGroup *ED_vgroup_add_name(Object *ob, const char *name) { bDeformGroup *defgroup; - - if(!ob || !ELEM(ob->type, OB_MESH, OB_LATTICE)) + if(!ob || !OB_TYPE_SUPPORT_VGROUP(ob->type)) return NULL; defgroup = MEM_callocN(sizeof(bDeformGroup), "add deformGroup"); @@ -2013,7 +2012,7 @@ static int vertex_group_poll(bContext *C) { Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; ID *data= (ob)? ob->data: NULL; - return (ob && !ob->id.lib && ELEM(ob->type, OB_MESH, OB_LATTICE) && data && !data->lib); + return (ob && !ob->id.lib && OB_TYPE_SUPPORT_VGROUP(ob->type) && data && !data->lib); } static int vertex_group_poll_edit(bContext *C) |