diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-10-08 15:29:27 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-10-08 15:29:27 +0400 |
commit | 5ce33cf2bd2def709c9124cc6a7e538e388f1d62 (patch) | |
tree | f0697abbe702f4f7775ea9f4e7e26ab371992109 /source/blender/editors | |
parent | 208d57323e2c1db5432aceebab7216f545410d74 (diff) |
A few fixes:
* Loading old files didn't initialise the new rotation variables properly
* Fixed some errors with the newly added operator for copying RNA-paths for properties
* Auto-keyframing now correctly refreshes animation editors after adding keyframes. Made the keyingsets code send notifiers again, but now using the newly added WM_main_event_add() (thanks Brecht)
* A few UI tweaks again for animation stuff (timeline, keyingsets UI)
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/drivers.c | 13 | ||||
-rw-r--r-- | source/blender/editors/animation/keyingsets.c | 7 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_anim.c | 7 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner.c | 2 |
4 files changed, 19 insertions, 10 deletions
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 7a457548623..bf3fd0f4cf1 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -565,7 +565,7 @@ void ANIM_OT_paste_driver_button (wmOperatorType *ot) } -/* Paste Driver Button Operator ------------------------ */ +/* Copy to Clipboard Button Operator ------------------------ */ static int copy_clipboard_button_exec(bContext *C, wmOperator *op) { @@ -579,9 +579,9 @@ static int copy_clipboard_button_exec(bContext *C, wmOperator *op) memset(&ptr, 0, sizeof(PointerRNA)); uiAnimContextProperty(C, &ptr, &prop, &index); - if (ptr.data && prop) { // && RNA_property_animateable(ptr.data, prop) + if (ptr.data && prop) { path= RNA_path_from_ID_to_property(&ptr, prop); - + if (path) { WM_clipboard_text_set(path, FALSE); MEM_freeN(path); @@ -597,15 +597,14 @@ void ANIM_OT_copy_clipboard_button(wmOperatorType *ot) /* identifiers */ ot->name= "Copy Data Path"; ot->idname= "ANIM_OT_copy_clipboard_button"; - ot->description= "Copy the rna data path to the clipboard."; + ot->description= "Copy the RNA data path for this property to the clipboard."; /* callbacks */ ot->exec= copy_clipboard_button_exec; - //op->poll= ??? // TODO: need to have some driver to be able to do this... + //op->poll= ??? // TODO: need to have some valid property before this can be done /* flags */ - ot->flag= 0; + ot->flag= OPTYPE_REGISTER; } - /* ************************************************** */ diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c index afaa9e3f400..d1ac624ec6f 100644 --- a/source/blender/editors/animation/keyingsets.c +++ b/source/blender/editors/animation/keyingsets.c @@ -349,6 +349,7 @@ static int add_keyingset_button_exec (bContext *C, wmOperator *op) /* add path to this setting */ BKE_keyingset_add_destination(ks, ptr.id.data, NULL, path, index, pflag, KSP_GROUP_KSNAME); + ks->active_path= BLI_countlist(&ks->paths); success= 1; /* free the temp path created */ @@ -1354,6 +1355,9 @@ int modify_keyframes (Scene *scene, ListBase *dsources, bAction *act, KeyingSet } break; } + + /* send notifiers for updates (this doesn't require context to work!) */ + WM_main_add_notifier(NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); } } } @@ -1484,6 +1488,9 @@ int modify_keyframes (Scene *scene, ListBase *dsources, bAction *act, KeyingSet } break; } + + /* send notifiers for updates (this doesn't require context to work!) */ + WM_main_add_notifier(NC_ANIMATION|ND_KEYFRAME_EDIT, NULL); } } } diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index facda32a41e..ca7401c36be 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -309,10 +309,11 @@ void ui_but_anim_menu(bContext *C, uiBut *but) uiItemO(layout, "Remove from Keying Set", 0, "ANIM_OT_remove_keyingset_button"); } } - + uiItemS(layout); - uiItemBooleanO(layout, "Copy Data Path", 0, "ANIM_OT_copy_clipboard_button", "all", 1); - + + uiItemO(layout, "Copy Data Path", 0, "ANIM_OT_copy_clipboard_button"); + uiPupMenuEnd(C, pup); } } diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 3c10375c14b..641137c010b 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -3939,6 +3939,7 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa /* 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 BKE_keyingset_add_destination(ks, id, NULL, path, array_index, flag, groupmode); + ks->active_path= BLI_countlist(&ks->paths); } break; case KEYINGSET_EDITMODE_REMOVE: @@ -3950,6 +3951,7 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa /* free path's data */ // TODO: we probably need an API method for this if (ksp->rna_path) MEM_freeN(ksp->rna_path); + ks->active_path= 0; /* remove path from set */ BLI_freelinkN(&ks->paths, ksp); |