Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_vgroup.c
| Context not available. | |||||
| Object *ob = ED_object_context(C); | Object *ob = ED_object_context(C); | ||||
| ID *data = (ob) ? ob->data : NULL; | ID *data = (ob) ? ob->data : NULL; | ||||
| return (ob && !ID_IS_LINKED_DATABLOCK(ob) && | if ((ob) && (ob->type == OB_GPENCIL)) { | ||||
| data && !ID_IS_LINKED_DATABLOCK(data) && | return (ob && !ID_IS_LINKED_DATABLOCK(ob) && | ||||
| OB_TYPE_SUPPORT_VGROUP(ob->type) && | !ID_IS_LINKED_DATABLOCK(ob->gpd) && | ||||
| ob->defbase.first); | OB_TYPE_SUPPORT_VGROUP(ob->type) && | ||||
| ob->defbase.first); | |||||
| } | |||||
| else { | |||||
| return (ob && !ID_IS_LINKED_DATABLOCK(ob) && | |||||
| data && !ID_IS_LINKED_DATABLOCK(data) && | |||||
| OB_TYPE_SUPPORT_VGROUP(ob->type) && | |||||
| ob->defbase.first); | |||||
| } | |||||
| } | } | ||||
| static int vertex_group_supported_poll(bContext *C) | static int vertex_group_supported_poll(bContext *C) | ||||
| { | { | ||||
| Object *ob = ED_object_context(C); | Object *ob = ED_object_context(C); | ||||
| ID *data = (ob) ? ob->data : NULL; | ID *data = (ob) ? ob->data : NULL; | ||||
| return (ob && !ID_IS_LINKED_DATABLOCK(ob) && OB_TYPE_SUPPORT_VGROUP(ob->type) && | if ((ob) && (ob->type == OB_GPENCIL)) { | ||||
| data && !ID_IS_LINKED_DATABLOCK(data)); | return (ob && !ID_IS_LINKED_DATABLOCK(ob) && OB_TYPE_SUPPORT_VGROUP(ob->type) && | ||||
| !ID_IS_LINKED_DATABLOCK(ob->gpd)); | |||||
| } | |||||
| else { | |||||
| return (ob && !ID_IS_LINKED_DATABLOCK(ob) && OB_TYPE_SUPPORT_VGROUP(ob->type) && | |||||
| data && !ID_IS_LINKED_DATABLOCK(data)); | |||||
| } | |||||
| } | } | ||||
| static int vertex_group_mesh_poll(bContext *C) | static int vertex_group_mesh_poll(bContext *C) | ||||
| Context not available. | |||||