diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-02-13 04:51:33 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-02-13 04:51:33 +0300 |
commit | cec4a299771ec0302db6f733ca28e80cbbf3cff4 (patch) | |
tree | 2e5b6fef47ee466c6cf71f9d67aae73642398604 /source/blender/editors/space_outliner | |
parent | ed7e211c2d5be8a9e7e87a41fc6fecc02bb346c5 (diff) |
Keying Sets: Wrapped KeyingSets in RNA
* The settings of KeyingSets can now be viewed/modified through RNA.
* Shuffled RNA wrapping for AnimData over to its own file
* Moved insert-key flags to DNA_anim_types.h, as they're now used for KeyingSets.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 3e2d5edd4ed..21fd37e1687 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -3151,7 +3151,8 @@ static void ks_editop_add_cb(SpaceOops *soops, KeyingSet *ks, TreeElement *te, T ID *id = NULL; char *path=NULL, *newpath=NULL; int array_index= 0; - int flag= KSP_FLAG_GROUP_KSNAME; + short flag = 0; + short groupmode= KSP_GROUP_KSNAME; /* optimise tricks: * - Don't do anything if the selected item is a 'struct', but arrays are allowed @@ -3159,7 +3160,7 @@ static void ks_editop_add_cb(SpaceOops *soops, KeyingSet *ks, TreeElement *te, T if (tselem->type == TSE_RNA_STRUCT) return; - //printf("ks_editop_add_cb() \n"); + printf("ks_editop_add_cb() \n"); /* Overview of Algorithm: * 1. Go up the chain of parents until we find the 'root', taking note of the @@ -3188,11 +3189,20 @@ static void ks_editop_add_cb(SpaceOops *soops, KeyingSet *ks, TreeElement *te, T /* check if we're looking for first ID, or appending to path */ if (id) { + if (tse->type == TSE_RNA_STRUCT) + printf("\t tem = RNA Struct '%s' \n", tem->name); + else if (tse->type == TSE_RNA_ARRAY_ELEM) + printf("\t tem = RNA Array Elem '%s' \n", tem->name); + else if (tse->type == TSE_RNA_PROPERTY) + printf("\t tem = RNA Property '%s' \n", tem->name); + else + printf("\t tem = WTF? \n"); + /* just 'append' property to path * - to prevent memory leaks, we must write to newpath not path, then free old path + swap them */ - // TODO: how to do this? we must use 'string' identifiers for collections so that these don't break if data is added/removed - //newpath= RNA_path_append(path, NULL, prop, index, NULL); + // TODO: how should this be done? + //newpath= RNA_path_append(path, ptr, prop, tem->index, /*RNA_property_identifier(ptr, prop)*/0); if (path) MEM_freeN(path); path= newpath; @@ -3234,7 +3244,7 @@ static void ks_editop_add_cb(SpaceOops *soops, KeyingSet *ks, TreeElement *te, T /* add a new path with the information obtained (only if valid) */ // TODO: what do we do with group name? for now, we don't supply one, and just let this use the KeyingSet name if (path) - BKE_keyingset_add_destination(ks, id, NULL, path, array_index, flag); + BKE_keyingset_add_destination(ks, id, NULL, path, array_index, flag, groupmode); } /* free temp data */ |