diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-03-05 17:06:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-03-05 17:06:39 +0300 |
commit | f4298de8aaafd36cb8da6f7051c24ca630589001 (patch) | |
tree | 8f5f0b2b6879bbb956ab4224ec51a7bf5b8d9e35 /source/blender/editors | |
parent | 19154014b8a87f1f63f5d75d6983adc5fa6dbc7f (diff) |
utility function object_camera_matrix, moved code from RE_SetCamera into this.
use for getting the render matrix of a camera (view plane, winmat, clipstart/end) without rendering.
Diffstat (limited to 'source/blender/editors')
5 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index ed1835266d5..d01a7b7e96f 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -684,7 +684,7 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf) zoom= (float)(SEQ_ZOOM_FAC(sseq->zoom)); if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) { /* XXX sequencer zoom should store it? */ - zoomx = zoom; // * ((float)G.scene->r.xasp / (float)G.scene->r.yasp); + zoomx = zoom; // * (G.scene->r.xasp / G.scene->r.yasp); zoomy = zoom; } else diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 2e45c65568f..deb8e738ef7 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1077,7 +1077,7 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode) /* calculate zoom factor */ zoom= (float)(SEQ_ZOOM_FAC(sseq->zoom)); if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) { - zoomx = zoom * ((float)p->scene->r.xasp / (float)p->scene->r.yasp); + zoomx = zoom * (p->scene->r.xasp / p->scene->r.yasp); zoomy = zoom; } else diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index c1a023d0009..41e2fe2b124 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -678,7 +678,7 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq recty = viewrecty + 0.5f; if (sseq->mainb == SEQ_DRAW_IMG_IMBUF) { - viewrectx *= (float)scene->r.xasp / (float)scene->r.yasp; + viewrectx *= scene->r.xasp / scene->r.yasp; viewrectx /= proxy_size / 100.0; viewrecty /= proxy_size / 100.0; } diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index ce8d99da3a9..1cc2a935a32 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -2237,7 +2237,7 @@ static int sequencer_view_all_preview_exec(bContext *C, wmOperator *op) imgheight= (scene->r.size*scene->r.ysch)/100; /* Apply aspect, dosnt need to be that accurate */ - imgwidth= (int)(imgwidth * ((float)scene->r.xasp / (float)scene->r.yasp)); + imgwidth= (int)(imgwidth * (scene->r.xasp / scene->r.yasp)); if (((imgwidth >= width) || (imgheight >= height)) && ((width > 0) && (height > 0))) { diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 7fd46e7864d..ea81a8cafd9 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -854,7 +854,7 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d) static void view3d_get_viewborder_size(Scene *scene, ARegion *ar, float size_r[2]) { float winmax= MAX2(ar->winx, ar->winy); - float aspect= (float) (scene->r.xsch*scene->r.xasp)/(scene->r.ysch*scene->r.yasp); + float aspect= (scene->r.xsch*scene->r.xasp) / (scene->r.ysch*scene->r.yasp); if(aspect>1.0) { size_r[0]= winmax; |