CurvesGeometry: Add initial vertex group support #106944
|
@ -50,6 +50,10 @@ void BKE_object_defgroup_active_index_set(struct Object *ob, int new_index);
|
|||
const struct ListBase *BKE_id_defgroup_list_get(const struct ID *id);
|
||||
struct ListBase *BKE_id_defgroup_list_get_mutable(struct ID *id);
|
||||
int BKE_id_defgroup_name_index(const struct ID *id, const char *name);
|
||||
bool BKE_defgroup_listbase_name_find(const ListBase *defbase,
|
||||
const char *name,
|
||||
int *r_index,
|
||||
struct bDeformGroup **r_group);
|
||||
bool BKE_id_defgroup_name_find(const struct ID *id,
|
||||
const char *name,
|
||||
int *r_index,
|
||||
|
|
|
@ -516,15 +516,14 @@ int BKE_id_defgroup_name_index(const ID *id, const char *name)
|
|||
return index;
|
||||
}
|
||||
|
||||
bool BKE_id_defgroup_name_find(const ID *id,
|
||||
const char *name,
|
||||
int *r_index,
|
||||
bDeformGroup **r_group)
|
||||
bool BKE_defgroup_listbase_name_find(const ListBase *defbase,
|
||||
const char *name,
|
||||
int *r_index,
|
||||
bDeformGroup **r_group)
|
||||
{
|
||||
if (name == nullptr || name[0] == '\0') {
|
||||
return false;
|
||||
}
|
||||
const ListBase *defbase = BKE_id_defgroup_list_get(id);
|
||||
int index;
|
||||
LISTBASE_FOREACH_INDEX (bDeformGroup *, group, defbase, index) {
|
||||
if (STREQ(name, group->name)) {
|
||||
|
@ -540,6 +539,14 @@ bool BKE_id_defgroup_name_find(const ID *id,
|
|||
return false;
|
||||
}
|
||||
|
||||
bool BKE_id_defgroup_name_find(const ID *id,
|
||||
const char *name,
|
||||
int *r_index,
|
||||
bDeformGroup **r_group)
|
||||
{
|
||||
return BKE_defgroup_listbase_name_find(BKE_id_defgroup_list_get(id), name, r_index, r_group);
|
||||
}
|
||||
|
||||
const ListBase *BKE_object_defgroup_list(const Object *ob)
|
||||
{
|
||||
BLI_assert(BKE_object_supports_vertex_groups(ob));
|
||||
|
|
Loading…
Reference in New Issue