diff options
Diffstat (limited to 'source/blender/editors/space_nla')
-rw-r--r-- | source/blender/editors/space_nla/nla_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_nla/nla_select.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_nla/space_nla.c | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 81520445000..50f00aed867 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -625,7 +625,7 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op) } scene = ac.scene; - cfra = (float)CFRA; + cfra = (float)scene->r.cfra; /* get action to use */ act = BLI_findlink(&bmain->actions, RNA_enum_get(op->ptr, "action")); @@ -901,7 +901,7 @@ static int nlaedit_add_sound_exec(bContext *C, wmOperator *UNUSED(op)) } scene = ac.scene; - cfra = CFRA; + cfra = scene->r.cfra; /* get a list of the editable tracks being shown in the NLA */ filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE | ANIMFILTER_SEL | @@ -2388,7 +2388,7 @@ static int nlaedit_snap_exec(bContext *C, wmOperator *op) /* calculate new start position based on snapping mode */ switch (mode) { case NLAEDIT_SNAP_CFRA: /* to current frame */ - strip->start = (float)CFRA; + strip->start = (float)scene->r.cfra; break; case NLAEDIT_SNAP_NEAREST_FRAME: /* to nearest frame */ strip->start = floorf(start + 0.5f); diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 1efb91bc99f..d51bfce6355 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -455,10 +455,10 @@ static void nlaedit_select_leftright(bContext *C, /* get range, and get the right flag-setting mode */ if (leftright == NLAEDIT_LRSEL_LEFT) { xmin = MINAFRAMEF; - xmax = (float)(CFRA + 0.1f); + xmax = (float)(scene->r.cfra + 0.1f); } else { - xmin = (float)(CFRA - 0.1f); + xmin = (float)(scene->r.cfra - 0.1f); xmax = MAXFRAMEF; } @@ -540,7 +540,7 @@ static int nlaedit_select_leftright_invoke(bContext *C, wmOperator *op, const wm /* determine which side of the current frame mouse is on */ x = UI_view2d_region_to_view_x(v2d, event->mval[0]); - if (x < CFRA) { + if (x < scene->r.cfra) { RNA_enum_set(op->ptr, "mode", NLAEDIT_LRSEL_LEFT); } else { diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index c50278518de..13035a9d5fd 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -87,9 +87,9 @@ static SpaceLink *nla_create(const ScrArea *area, const Scene *scene) BLI_addtail(&snla->regionbase, region); region->regiontype = RGN_TYPE_WINDOW; - region->v2d.tot.xmin = (float)(SFRA - 10); + region->v2d.tot.xmin = (float)(scene->r.sfra - 10); region->v2d.tot.ymin = (float)(-area->winy) / 3.0f; - region->v2d.tot.xmax = (float)(EFRA + 10); + region->v2d.tot.xmax = (float)(scene->r.efra + 10); region->v2d.tot.ymax = 0.0f; region->v2d.cur = region->v2d.tot; |