Commit: b4909632b05a5f84b23427f3aa170c76fec6e9d9
Author: Bastien Montagne
Date:   Tue May 14 12:23:31 2019 +0200
Branches: master
https://developer.blender.org/rBb4909632b05a5f84b23427f3aa170c76fec6e9d9

Fix T63542: Imported FBX doesn't show keyframes in Shape Key editor.

While shapekeys RNA path handling does support keyblocks (ShapeKeys)
with an `id_data` wrongly set to the geometry instead of the shapkey,
this is really not something to promote. ideally it should be removed at
some point. At least, let's not generate such RNA pointer if we can
avoid it.

Here it was breaking proper showing of animated shapekeys in the UI,
since this expects animated datablocks to have their own animation data
(and 'rooting' keyblocks to their mesh instead of their shapekey ended
up defining their animation in the mesh, not in the shapekey).

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

M       source/blender/makesrna/intern/rna_object_api.c

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

diff --git a/source/blender/makesrna/intern/rna_object_api.c 
b/source/blender/makesrna/intern/rna_object_api.c
index 5f41bf68572..c997a82f02d 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -398,7 +398,7 @@ static PointerRNA rna_Object_shape_key_add(
   if ((kb = BKE_object_shapekey_insert(bmain, ob, name, from_mix))) {
     PointerRNA keyptr;
 
-    RNA_pointer_create((ID *)ob->data, &RNA_ShapeKey, kb, &keyptr);
+    RNA_pointer_create((ID *)BKE_key_from_object(ob), &RNA_ShapeKey, kb, 
&keyptr);
     WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
 
     return keyptr;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to