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/space_clip')
-rw-r--r--source/blender/editors/space_clip/clip_buttons.c2
-rw-r--r--source/blender/editors/space_clip/clip_dopesheet_draw.c2
-rw-r--r--source/blender/editors/space_clip/clip_draw.c8
-rw-r--r--source/blender/editors/space_clip/clip_editor.c8
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c6
-rw-r--r--source/blender/editors/space_clip/clip_ops.c8
-rw-r--r--source/blender/editors/space_clip/space_clip.c4
7 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c
index 0a1e1d75098..969b0e25928 100644
--- a/source/blender/editors/space_clip/clip_buttons.c
+++ b/source/blender/editors/space_clip/clip_buttons.c
@@ -174,7 +174,7 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname)
scopes->track_preview_height =
(scopes->track_preview_height <= UI_UNIT_Y) ? UI_UNIT_Y : scopes->track_preview_height;
- uiDefBut(block, TRACKPREVIEW, 0, "", rect.xmin, rect.ymin, BLI_RCT_SIZE_X(&rect),
+ uiDefBut(block, TRACKPREVIEW, 0, "", rect.xmin, rect.ymin, BLI_rctf_size_x(&rect),
scopes->track_preview_height, scopes, 0, 0, 0, 0, "");
}
diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.c b/source/blender/editors/space_clip/clip_dopesheet_draw.c
index 5d890155e25..cc1b8d444bc 100644
--- a/source/blender/editors/space_clip/clip_dopesheet_draw.c
+++ b/source/blender/editors/space_clip/clip_dopesheet_draw.c
@@ -274,7 +274,7 @@ void clip_draw_dopesheet_channels(const bContext *C, ARegion *ar)
dopesheet = &tracking->dopesheet;
height = (dopesheet->tot_channel * CHANNEL_STEP) + (CHANNEL_HEIGHT * 2);
- if (height > BLI_RCT_SIZE_Y(&v2d->mask)) {
+ if (height > BLI_rcti_size_y(&v2d->mask)) {
/* don't use totrect set, as the width stays the same
* (NOTE: this is ok here, the configuration is pretty straightforward)
*/
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c
index d486caeacc2..b22c9a60bdc 100644
--- a/source/blender/editors/space_clip/clip_draw.c
+++ b/source/blender/editors/space_clip/clip_draw.c
@@ -957,12 +957,12 @@ static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTra
static void view2d_to_region_float(View2D *v2d, float x, float y, float *regionx, float *regiony)
{
/* express given coordinates as proportional values */
- x = -v2d->cur.xmin / BLI_RCT_SIZE_X(&v2d->cur);
- y = -v2d->cur.ymin / BLI_RCT_SIZE_Y(&v2d->cur);
+ x = -v2d->cur.xmin / BLI_rctf_size_x(&v2d->cur);
+ y = -v2d->cur.ymin / BLI_rctf_size_y(&v2d->cur);
/* convert proportional distances to screen coordinates */
- *regionx = v2d->mask.xmin + x * BLI_RCT_SIZE_X(&v2d->mask);
- *regiony = v2d->mask.ymin + y * BLI_RCT_SIZE_Y(&v2d->mask);
+ *regionx = v2d->mask.xmin + x * BLI_rcti_size_x(&v2d->mask);
+ *regiony = v2d->mask.ymin + y * BLI_rcti_size_y(&v2d->mask);
}
static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip,
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index f2a48f299cf..32f91671daf 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -149,8 +149,8 @@ void ED_space_clip_get_zoom(SpaceClip *sc, ARegion *ar, float *zoomx, float *zoo
ED_space_clip_get_size(sc, &width, &height);
- *zoomx = (float)(BLI_RCT_SIZE_X(&ar->winrct) + 1) / (float)(BLI_RCT_SIZE_X(&ar->v2d.cur) * width);
- *zoomy = (float)(BLI_RCT_SIZE_Y(&ar->winrct) + 1) / (float)(BLI_RCT_SIZE_Y(&ar->v2d.cur) * height);
+ *zoomx = (float)(BLI_rcti_size_x(&ar->winrct) + 1) / (BLI_rctf_size_x(&ar->v2d.cur) * width);
+ *zoomy = (float)(BLI_rcti_size_y(&ar->winrct) + 1) / (BLI_rctf_size_y(&ar->v2d.cur) * height);
}
void ED_space_clip_get_aspect(SpaceClip *sc, float *aspx, float *aspy)
@@ -388,8 +388,8 @@ int ED_clip_view_selection(const bContext *C, ARegion *ar, int fit)
ED_space_clip_get_aspect(sc, &aspx, &aspy);
- width = BLI_RCT_SIZE_X(&ar->winrct) + 1;
- height = BLI_RCT_SIZE_Y(&ar->winrct) + 1;
+ width = BLI_rcti_size_x(&ar->winrct) + 1;
+ height = BLI_rcti_size_y(&ar->winrct) + 1;
zoomx = (float)width / w / aspx;
zoomy = (float)height / h / aspy;
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c
index f48d4e8d946..fa235bd2997 100644
--- a/source/blender/editors/space_clip/clip_graph_ops.c
+++ b/source/blender/editors/space_clip/clip_graph_ops.c
@@ -580,11 +580,11 @@ static int view_all_exec(bContext *C, wmOperator *UNUSED(op))
}
/* we need an extra "buffer" factor on either side so that the endpoints are visible */
- extra = 0.01f * BLI_RCT_SIZE_X(&v2d->cur);
+ extra = 0.01f * BLI_rctf_size_x(&v2d->cur);
v2d->cur.xmin -= extra;
v2d->cur.xmax += extra;
- extra = 0.01f * BLI_RCT_SIZE_Y(&v2d->cur);
+ extra = 0.01f * BLI_rctf_size_y(&v2d->cur);
v2d->cur.ymin -= extra;
v2d->cur.ymax += extra;
@@ -610,7 +610,7 @@ void CLIP_OT_graph_view_all(wmOperatorType *ot)
void ED_clip_graph_center_current_frame(Scene *scene, ARegion *ar)
{
View2D *v2d = &ar->v2d;
- float extra = BLI_RCT_SIZE_X(&v2d->cur) / 2.0f;
+ float extra = BLI_rctf_size_x(&v2d->cur) / 2.0f;
/* set extents of view to start/end frames */
v2d->cur.xmin = (float)CFRA - extra;
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index aa2cadbd2d3..5c338f3e6f1 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -90,9 +90,9 @@ static void sclip_zoom_set(const bContext *C, float zoom, float location[2])
if ((width < 4) && (height < 4))
sc->zoom = oldzoom;
- else if (BLI_RCT_SIZE_X(&ar->winrct) <= sc->zoom)
+ else if (BLI_rcti_size_x(&ar->winrct) <= sc->zoom)
sc->zoom = oldzoom;
- else if (BLI_RCT_SIZE_Y(&ar->winrct) <= sc->zoom)
+ else if (BLI_rcti_size_y(&ar->winrct) <= sc->zoom)
sc->zoom = oldzoom;
}
@@ -726,8 +726,8 @@ static int view_all_exec(bContext *C, wmOperator *op)
h = h * aspy;
/* check if the image will fit in the image with zoom == 1 */
- width = BLI_RCT_SIZE_X(&ar->winrct) + 1;
- height = BLI_RCT_SIZE_Y(&ar->winrct) + 1;
+ width = BLI_rcti_size_x(&ar->winrct) + 1;
+ height = BLI_rcti_size_y(&ar->winrct) + 1;
if (fit_view) {
const int margin = 5; /* margin from border */
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 7f43c404095..3f925df30c7 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -1036,8 +1036,8 @@ static void movieclip_main_area_set_view2d(const bContext *C, ARegion *ar)
if (clip)
h *= clip->aspy / clip->aspx / clip->tracking.camera.pixel_aspect;
- winx = BLI_RCT_SIZE_X(&ar->winrct) + 1;
- winy = BLI_RCT_SIZE_Y(&ar->winrct) + 1;
+ winx = BLI_rcti_size_x(&ar->winrct) + 1;
+ winy = BLI_rcti_size_y(&ar->winrct) + 1;
ar->v2d.tot.xmin = 0;
ar->v2d.tot.ymin = 0;