diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-02-20 08:59:15 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-02-20 08:59:15 +0300 |
commit | c666a790df53756be3b65937d6953e9b999cbf6e (patch) | |
tree | 3f129866ac40dc06cb2c7b16d1e35d6b1ba53062 /source | |
parent | 8145489a7dc2889bc0fa61f0e23c4dc0f7b300be (diff) |
Aha! I've finally found those elusive RNA API functions that prevented the ANIM_OT_keyingset_add_destination() operator from being able to be used.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 1cdebe8f14e..9529eb84011 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -883,7 +883,7 @@ short deletekey (ID *id, const char group[], const char rna_path[], int array_in static int keyingset_add_destination_exec (bContext *C, wmOperator *op) { - //PointerRNA *ptr; + PointerRNA ptr; KeyingSet *ks= NULL; ID *id= NULL; char rna_path[256], group_name[64]; // xxx @@ -891,12 +891,13 @@ static int keyingset_add_destination_exec (bContext *C, wmOperator *op) int array_index=0; /* get settings from operator properties */ -#if 0 // XXX - why can't we have something like this in the RNA-access API? - if ( (ptr = RNA_property_pointer_get(op->ptr, "keyingset")) ) - ks= (KeyingSet *)ptr->data; - if ( (ptr = RNA_property_pointer_get(op->ptr, "id")) ) - id= (ID *)ptr->id; -#endif + ptr = RNA_pointer_get(op->ptr, "keyingset"); + if (ptr.data) + ks= (KeyingSet *)ptr.data; + + ptr = RNA_pointer_get(op->ptr, "id"); + if (ptr.data) + id= (ID *)ptr.data; groupmode= RNA_enum_get(op->ptr, "grouping_method"); RNA_string_get(op->ptr, "group_name", group_name); |