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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_particle.c')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 8edb80f68c5..de4cfb2b61a 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -1430,9 +1430,10 @@ static void psys_vg_name_get__internal(PointerRNA *ptr, char *value, int index)
{
Object *ob = (Object *)ptr->owner_id;
ParticleSystem *psys = (ParticleSystem *)ptr->data;
+ const ListBase *defbase = BKE_object_defgroup_list(ob);
if (psys->vgroup[index] > 0) {
- bDeformGroup *defGroup = BLI_findlink(&ob->defbase, psys->vgroup[index] - 1);
+ bDeformGroup *defGroup = BLI_findlink(defbase, psys->vgroup[index] - 1);
if (defGroup) {
strcpy(value, defGroup->name);
@@ -1448,7 +1449,8 @@ static int psys_vg_name_len__internal(PointerRNA *ptr, int index)
ParticleSystem *psys = (ParticleSystem *)ptr->data;
if (psys->vgroup[index] > 0) {
- bDeformGroup *defGroup = BLI_findlink(&ob->defbase, psys->vgroup[index] - 1);
+ const ListBase *defbase = BKE_object_defgroup_list(ob);
+ bDeformGroup *defGroup = BLI_findlink(defbase, psys->vgroup[index] - 1);
if (defGroup) {
return strlen(defGroup->name);