diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 8eb25290b18..f0f782fede2 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -691,14 +691,13 @@ static void rna_ParticleDupliWeight_active_index_set(struct PointerRNA *ptr, int } } +static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str); + static int rna_ParticleDupliWeight_name_length(PointerRNA *ptr) { - ParticleDupliWeight *dw= ptr->data; - - if(dw->ob) - return strlen(dw->ob->id.name+2) + 7; - else - return 9 + 7; + char tstr[32]; + rna_ParticleDupliWeight_name_get(ptr, tstr); + return strlen(tstr); } static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str) |