diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-02-13 09:33:07 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-02-13 09:33:07 +0300 |
commit | c8f04eba487ea43eaf1c8658eccd53711f2760bf (patch) | |
tree | 0fdeb307681c120833289291634a87b13b6f1326 /source/blender/editors/space_action/action_select.c | |
parent | cec4a299771ec0302db6f733ca28e80cbbf3cff4 (diff) |
Animato: Various improvements
* Scene and World AnimDatas are now included in animation editors
* Keyframes for integer-value settings now get the FCURVE_INT_VALUES flag set for their F-Curves, which restricts those curves to only having integer-values. F-Curve displays have been altered accordingly, but some editing tools may still need tweaks to work with this.
* Fixed notifiers for Insert Keyframe -> Active Keying Set.
Diffstat (limited to 'source/blender/editors/space_action/action_select.c')
-rw-r--r-- | source/blender/editors/space_action/action_select.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index b9bcc628160..311ac8ec6b4 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -54,6 +54,7 @@ #include "DNA_userdef_types.h" #include "DNA_gpencil_types.h" #include "DNA_windowmanager_types.h" +#include "DNA_world_types.h" #include "RNA_access.h" #include "RNA_define.h" @@ -763,6 +764,7 @@ static EnumPropertyItem prop_leftright_select_types[] = { /* option 1) select keyframe directly under mouse */ static void mouse_action_keys (bAnimContext *ac, int mval[2], short selectmode) { + Scene *sce= NULL; Object *ob= NULL; bDopeSheet *ads= NULL; bAction *act= NULL; @@ -820,6 +822,9 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short selectmode) case ANIMTYPE_OBJECT: ob= ((Base *)anim_channel)->object; break; + case ANIMTYPE_SCENE: + sce= (Scene *)anim_channel; + break; case ANIMTYPE_GPLAYER: gpl= (bGPDlayer *)anim_channel; break; @@ -887,6 +892,28 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short selectmode) /* 'Sub-Object' animation data */ // TODO... } + else if (sce) { + World *wo= sce->world; + AnimData *adt; + + /* Scene's own animation */ + if (sce->adt && sce->adt->action) { + adt= sce->adt; + act= adt->action; + + for (fcu= act->curves.first; fcu; fcu= fcu->next) + ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL); + } + + /* World */ + if (wo && wo->adt && wo->adt->action) { + adt= wo->adt; + act= adt->action; + + for (fcu= act->curves.first; fcu; fcu= fcu->next) + ANIM_fcurve_keys_bezier_loop(&bed, fcu, ok_cb, select_cb, NULL); + } + } //else if (gpl) // select_gpencil_frame(gpl, (int)selx, selectmode); } |