rna_ParticleDupliWeight_name_length was returning an incorrect value. Zealous debug...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 6 Oct 2011 23:16:12 +0000 (23:16 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 6 Oct 2011 23:16:12 +0000 (23:16 +0000)
source/blender/makesrna/intern/rna_particle.c

index 8eb25290b18d8829157082c70e99cb22c7b96208..f0f782fede2cbb61ecb9924b459c45a0cf38d304 100644 (file)
@@ -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)