diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-05-14 13:23:31 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-05-14 13:28:17 +0300 |
commit | b4909632b05a5f84b23427f3aa170c76fec6e9d9 (patch) | |
tree | 06ef07ba477484560ae9912c69b52004e6b2c35b /source/blender/makesrna/intern/rna_object_api.c | |
parent | b50cf33d917b3e0fe7152cff96996e5a850c68d4 (diff) |
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).
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |