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:
Diffstat (limited to 'source/blender/editors/animation/anim_markers.c')
-rw-r--r--source/blender/editors/animation/anim_markers.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 8b0e9b22ce8..46566feea91 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -74,12 +74,12 @@
/* ************* Marker API **************** */
/* helper function for getting the list of markers to work on */
-static ListBase *context_get_markers(Scene *scene, ScrArea *sa)
+static ListBase *context_get_markers(Scene *scene, ScrArea *area)
{
/* local marker sets... */
- if (sa) {
- if (sa->spacetype == SPACE_ACTION) {
- SpaceAction *saction = (SpaceAction *)sa->spacedata.first;
+ if (area) {
+ if (area->spacetype == SPACE_ACTION) {
+ SpaceAction *saction = (SpaceAction *)area->spacedata.first;
/* local markers can only be shown when there's only a single active action to grab them from
* - flag only takes effect when there's an action, otherwise it can get too confusing?
@@ -108,7 +108,7 @@ ListBase *ED_context_get_markers(const bContext *C)
ListBase *ED_animcontext_get_markers(const bAnimContext *ac)
{
if (ac) {
- return context_get_markers(ac->scene, ac->sa);
+ return context_get_markers(ac->scene, ac->area);
}
else {
return NULL;
@@ -234,35 +234,35 @@ void ED_markers_get_minmax(ListBase *markers, short sel, float *r_first, float *
*/
static bool ED_operator_markers_region_active(bContext *C)
{
- ScrArea *sa = CTX_wm_area(C);
- if (sa == NULL) {
+ ScrArea *area = CTX_wm_area(C);
+ if (area == NULL) {
return false;
}
- switch (sa->spacetype) {
+ switch (area->spacetype) {
case SPACE_ACTION: {
- SpaceAction *saction = sa->spacedata.first;
+ SpaceAction *saction = area->spacedata.first;
if (saction->flag & SACTION_SHOW_MARKERS) {
return true;
}
break;
}
case SPACE_GRAPH: {
- SpaceGraph *sipo = sa->spacedata.first;
+ SpaceGraph *sipo = area->spacedata.first;
if (sipo->mode != SIPO_MODE_DRIVERS && sipo->flag & SIPO_SHOW_MARKERS) {
return true;
}
break;
}
case SPACE_NLA: {
- SpaceNla *snla = sa->spacedata.first;
+ SpaceNla *snla = area->spacedata.first;
if (snla->flag & SNLA_SHOW_MARKERS) {
return true;
}
break;
}
case SPACE_SEQ: {
- SpaceSeq *seq = sa->spacedata.first;
+ SpaceSeq *seq = area->spacedata.first;
if (seq->flag & SEQ_SHOW_MARKERS) {
return true;
}
@@ -358,7 +358,7 @@ void ED_markers_deselect_all(ListBase *markers, int action)
action = ED_markers_get_first_selected(markers) ? SEL_DESELECT : SEL_SELECT;
}
- for (TimeMarker *marker = markers->first; marker; marker = marker->next) {
+ LISTBASE_FOREACH (TimeMarker *, marker, markers) {
if (action == SEL_SELECT) {
marker->flag |= SELECT;
}
@@ -528,7 +528,7 @@ static void draw_markers_background(rctf *rect)
uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
- unsigned char shade[4];
+ uchar shade[4];
UI_GetThemeColor4ubv(TH_TIME_SCRUB_BACKGROUND, shade);
immUniformColor4ubv(shade);
@@ -599,14 +599,14 @@ void ED_markers_draw(const bContext *C, int flag)
const uiFontStyle *fstyle = UI_FSTYLE_WIDGET;
/* Separate loops in order to draw selected markers on top */
- for (TimeMarker *marker = markers->first; marker; marker = marker->next) {
+ LISTBASE_FOREACH (TimeMarker *, marker, markers) {
if ((marker->flag & SELECT) == 0) {
if (marker_is_in_frame_range(marker, clip_frame_range)) {
draw_marker(fstyle, marker, cfra, marker->frame * xscale, flag, region->winy);
}
}
}
- for (TimeMarker *marker = markers->first; marker; marker = marker->next) {
+ LISTBASE_FOREACH (TimeMarker *, marker, markers) {
if (marker->flag & SELECT) {
if (marker_is_in_frame_range(marker, clip_frame_range)) {
draw_marker(fstyle, marker, cfra, marker->frame * xscale, flag, region->winy);
@@ -906,7 +906,7 @@ static int ed_marker_move_invoke(bContext *C, wmOperator *op, const wmEvent *eve
static void ed_marker_move_apply(bContext *C, wmOperator *op)
{
#ifdef DURIAN_CAMERA_SWITCH
- bScreen *sc = CTX_wm_screen(C);
+ bScreen *screen = CTX_wm_screen(C);
Scene *scene = CTX_data_scene(C);
Object *camera = scene->camera;
#endif
@@ -930,7 +930,7 @@ static void ed_marker_move_apply(bContext *C, wmOperator *op)
BKE_scene_camera_switch_update(scene);
if (camera != scene->camera) {
- BKE_screen_view3d_scene_sync(sc, scene);
+ BKE_screen_view3d_scene_sync(screen, scene);
WM_event_add_notifier(C, NC_SCENE | NA_EDITED, scene);
}
#endif
@@ -1156,7 +1156,7 @@ static void MARKER_OT_duplicate(wmOperatorType *ot)
static void deselect_markers(ListBase *markers)
{
- for (TimeMarker *marker = markers->first; marker; marker = marker->next) {
+ LISTBASE_FOREACH (TimeMarker *, marker, markers) {
marker->flag &= ~SELECT;
}
}
@@ -1373,7 +1373,7 @@ static int ed_marker_box_select_exec(bContext *C, wmOperator *op)
ED_markers_deselect_all(markers, SEL_DESELECT);
}
- for (TimeMarker *marker = markers->first; marker; marker = marker->next) {
+ LISTBASE_FOREACH (TimeMarker *, marker, markers) {
if (BLI_rctf_isect_x(&rect, marker->frame)) {
SET_FLAG_FROM_TEST(marker->flag, select, SELECT);
}
@@ -1621,7 +1621,7 @@ static void MARKER_OT_make_links_scene(wmOperatorType *ot)
static int ed_marker_camera_bind_exec(bContext *C, wmOperator *op)
{
- bScreen *sc = CTX_wm_screen(C);
+ bScreen *screen = CTX_wm_screen(C);
Scene *scene = CTX_data_scene(C);
Object *ob = CTX_data_active_object(C);
ListBase *markers = ED_context_get_markers(C);
@@ -1646,7 +1646,7 @@ static int ed_marker_camera_bind_exec(bContext *C, wmOperator *op)
BLI_addtail(markers, marker);
/* deselect all others, so that the user can then move it without problems */
- for (TimeMarker *m = markers->first; m; m = m->next) {
+ LISTBASE_FOREACH (TimeMarker *, m, markers) {
if (m != marker) {
m->flag &= ~SELECT;
}
@@ -1658,7 +1658,7 @@ static int ed_marker_camera_bind_exec(bContext *C, wmOperator *op)
/* camera may have changes */
BKE_scene_camera_switch_update(scene);
- BKE_screen_view3d_scene_sync(sc, scene);
+ BKE_screen_view3d_scene_sync(screen, scene);
WM_event_add_notifier(C, NC_SCENE | ND_MARKERS, NULL);
WM_event_add_notifier(C, NC_ANIMATION | ND_MARKERS, NULL);