Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-05-08 16:51:36 +0400
committerJoshua Leung <aligorith@gmail.com>2009-05-08 16:51:36 +0400
commit4f0dc8abbf4e25345370c691fb591ecc23976c5d (patch)
tree55b1434ebba07b6ef4cfefa72db291c141a99411 /source/blender/editors/space_action
parent7e29e97c218068a979a417e4fc9aca156a0ccd7d (diff)
2.5 - Restored Various Tools using Markers
* Added back a few Marker-API tools * Restored column select tools using markers (some of these aren't working right yet though).
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/action_edit.c1
-rw-r--r--source/blender/editors/space_action/action_select.c27
2 files changed, 5 insertions, 23 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index a486e9067ae..99360450367 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -1118,6 +1118,7 @@ static void snap_action_keys(bAnimContext *ac, short mode)
memset(&bed, 0, sizeof(BeztEditData));
bed.scene= ac->scene;
+ bed.list= ac->scene->markers; /* for marker-snapping option */
/* snap keyframes */
for (ale= anim_data.first; ale; ale= ale->next) {
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index ced80647fec..bb3f16dd506 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -74,6 +74,7 @@
#include "ED_keyframing.h"
#include "ED_keyframes_draw.h"
#include "ED_keyframes_edit.h"
+#include "ED_markers.h"
#include "ED_screen.h"
#include "ED_space_api.h"
@@ -394,11 +395,8 @@ static void markers_selectkeys_between (bAnimContext *ac)
float min, max;
/* get extreme markers */
- //get_minmax_markers(1, &min, &max); // FIXME... add back markers api!
- min= (float)ac->scene->r.sfra; // xxx temp code
- max= (float)ac->scene->r.efra; // xxx temp code
+ ED_markers_get_minmax(&ac->markers, 1, &min, &max);
- if (min==max) return;
min -= 0.5f;
max += 0.5f;
@@ -431,21 +429,6 @@ static void markers_selectkeys_between (bAnimContext *ac)
}
-/* helper callback for columnselect_action_keys() -> populate list CfraElems with frame numbers from selected beztriples */
-// TODO: if some other code somewhere needs this, it'll be time to port this over to keyframes_edit.c!!!
-static short bezt_to_cfraelem(BeztEditData *bed, BezTriple *bezt)
-{
- /* only if selected */
- if (bezt->f2 & SELECT) {
- CfraElem *ce= MEM_callocN(sizeof(CfraElem), "cfraElem");
- BLI_addtail(&bed->list, ce);
-
- ce->cfra= bezt->vec[1][0];
- }
-
- return 0;
-}
-
/* Selects all visible keyframes in the same frames as the specified elements */
static void columnselect_action_keys (bAnimContext *ac, short mode)
{
@@ -490,9 +473,7 @@ static void columnselect_action_keys (bAnimContext *ac, short mode)
break;
case ACTKEYS_COLUMNSEL_MARKERS_COLUMN: /* list of selected markers */
- // FIXME: markers api needs to be improved for this first!
- //make_marker_cfra_list(&elems, 1);
- return; // XXX currently, this does nothing!
+ ED_markers_make_cfra_list(&ac->markers, &bed.list, 1);
break;
default: /* invalid option */
@@ -509,7 +490,7 @@ static void columnselect_action_keys (bAnimContext *ac, short mode)
if (ac->datatype == ANIMCONT_GPENCIL)
filter= (ANIMFILTER_VISIBLE);
else
- filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
+ filter= (ANIMFILTER_VISIBLE | ANIMFILTER_CURVESONLY);
ANIM_animdata_filter(ac, &anim_data, filter, ac->data, ac->datatype);
for (ale= anim_data.first; ale; ale= ale->next) {