Commit: 8c92b530ddf3cf3329164501d21976364d9d69c4
Author: Lukas Tönne
Date:   Fri Oct 3 09:06:34 2014 +0200
Branches: hair_immediate_fixes
https://developer.blender.org/rB8c92b530ddf3cf3329164501d21976364d9d69c4

Fix for RNA using ptr->id.data instead of ptr->data for ParticleSystem.

===================================================================

M       release/scripts/startup/bl_ui/properties_particle.py
M       source/blender/makesrna/intern/rna_particle.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_particle.py 
b/release/scripts/startup/bl_ui/properties_particle.py
index 375f8db..ccb48dd 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -380,7 +380,7 @@ class PARTICLE_PT_shape_keys(ParticleButtonsPanel, Panel):
         rows = 2
         if kb:
             rows = 4
-        row.template_list("PARTICLE_UL_shape_keys", "", key, "key_blocks", ob, 
"active_shape_key_index", rows=rows)
+        row.template_list("PARTICLE_UL_shape_keys", "", key, "key_blocks", 
psys, "active_shape_key_index", rows=rows)
 
         col = row.column()
 
diff --git a/source/blender/makesrna/intern/rna_particle.c 
b/source/blender/makesrna/intern/rna_particle.c
index bc37f65..b80513a 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -754,7 +754,7 @@ static void rna_particle_settings_set(PointerRNA *ptr, 
PointerRNA value)
 
 static void rna_Particle_active_shape_update(Main *bmain, Scene *scene, 
PointerRNA *ptr)
 {
-       ParticleSystem *psys = ptr->id.data;
+       ParticleSystem *psys = ptr->data;
        
 #if 0 /* XXX equivalent needed for particles? */
        if (scene->obedit == ob) {
@@ -785,7 +785,7 @@ static void rna_Particle_active_shape_update(Main *bmain, 
Scene *scene, PointerR
 static void rna_Particle_active_shape_key_index_range(PointerRNA *ptr, int 
*min, int *max,
                                                       int *UNUSED(softmin), 
int *UNUSED(softmax))
 {
-       ParticleSystem *psys = ptr->id.data;
+       ParticleSystem *psys = ptr->data;
        Key *key = psys->key;
 
        *min = 0;
@@ -800,21 +800,21 @@ static void 
rna_Particle_active_shape_key_index_range(PointerRNA *ptr, int *min,
 
 static int rna_Particle_active_shape_key_index_get(PointerRNA *ptr)
 {
-       ParticleSystem *psys = ptr->id.data;
+       ParticleSystem *psys = ptr->data;
 
        return MAX2(psys->shapenr - 1, 0);
 }
 
 static void rna_Particle_active_shape_key_index_set(PointerRNA *ptr, int value)
 {
-       ParticleSystem *psys = ptr->id.data;
+       ParticleSystem *psys = ptr->data;
 
        psys->shapenr = value + 1;
 }
 
 static PointerRNA rna_Particle_active_shape_key_get(PointerRNA *ptr)
 {
-       ParticleSystem *psys = ptr->id.data;
+       ParticleSystem *psys = ptr->data;
        Key *key = psys->key;
        KeyBlock *kb;
        PointerRNA keyptr;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to