diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-09 00:36:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-09 00:36:00 +0400 |
commit | 0361909ab4e0f41c631ef4654345b0034bb89d51 (patch) | |
tree | 49c5b7f181ac1c3d025702f753c0306d71d0fe88 /source/blender/editors/space_view3d/view3d_view.c | |
parent | 9af3e3bb9b220a5eba45e964bbec9cd49b707947 (diff) |
style cleanup
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_view.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index b4350847552..ee2634bf8da 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -71,7 +71,7 @@ #include "RNA_access.h" #include "RNA_define.h" -#include "view3d_intern.h" // own include +#include "view3d_intern.h" /* own include */ /* use this call when executing an operator, * event system doesn't set for each event the @@ -184,7 +184,7 @@ void smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Objec /* original values */ if (oldcamera) { - sms.orig_dist = rv3d->dist; // below function does weird stuff with it... + sms.orig_dist = rv3d->dist; /* below function does weird stuff with it... */ ED_view3d_from_object(oldcamera, sms.orig_ofs, sms.orig_quat, &sms.orig_dist, &sms.orig_lens); } else { @@ -1100,14 +1100,14 @@ static void obmat_to_viewmat(View3D *v3d, RegionView3D *rv3d, Object *ob, short rv3d->dist = 0.0; ED_view3d_from_object(v3d->camera, rv3d->ofs, NULL, NULL, &v3d->lens); - smooth_view(NULL, NULL, NULL, NULL, NULL, orig_ofs, new_quat, &orig_dist, &orig_lens); // XXX - + smooth_view(NULL, NULL, NULL, NULL, NULL, orig_ofs, new_quat, &orig_dist, &orig_lens); /* XXX */ + rv3d->persp = RV3D_CAMOB; /* just to be polite, not needed */ } else { mat3_to_quat(new_quat, tmat); - smooth_view(NULL, NULL, NULL, NULL, NULL, NULL, new_quat, NULL, NULL); // XXX + smooth_view(NULL, NULL, NULL, NULL, NULL, NULL, new_quat, NULL, NULL); /* XXX */ } } else { @@ -1211,7 +1211,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b /* case not a border select */ if (input->xmin == input->xmax) { - rect.xmin = input->xmin - 12; // seems to be default value for bones only now + rect.xmin = input->xmin - 12; /* seems to be default value for bones only now */ rect.xmax = input->xmin + 12; rect.ymin = input->ymin - 12; rect.ymax = input->ymin + 12; @@ -1252,7 +1252,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b else { Base *base; - v3d->xray = TRUE; // otherwise it postpones drawing + v3d->xray = TRUE; /* otherwise it postpones drawing */ for (base = scene->base.first; base; base = base->next) { if (base->lay & v3d->lay) { @@ -1294,7 +1294,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b } } } - v3d->xray = FALSE; // restore + v3d->xray = FALSE; /* restore */ } glPopName(); /* see above (pushname) */ @@ -1313,8 +1313,8 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b if (vc->rv3d->rflag & RV3D_CLIPPING) ED_view3d_clipping_disable(); - if (hits < 0) printf("Too many objects in select buffer\n"); // XXX make error message - + if (hits < 0) printf("Too many objects in select buffer\n"); /* XXX make error message */ + return hits; } @@ -1407,7 +1407,7 @@ static void initlocalview(Main *bmain, Scene *scene, ScrArea *sa) locallay = free_localbit(bmain); if (locallay == 0) { - printf("Sorry, no more than 8 localviews\n"); // XXX error + printf("Sorry, no more than 8 localviews\n"); /* XXX error */ ok = 0; } else { @@ -1460,7 +1460,7 @@ static void initlocalview(Main *bmain, Scene *scene, ScrArea *sa) if (rv3d->persp == RV3D_ORTHO) rv3d->dist *= 0.7f; - // correction for window aspect ratio + /* correction for window aspect ratio */ if (ar->winy > 2 && ar->winx > 2) { float asp = (float)ar->winx / (float)ar->winy; if (asp < 1.0f) asp = 1.0f / asp; @@ -1541,7 +1541,7 @@ static void endlocalview(Main *bmain, Scene *scene, ScrArea *sa) locallay = v3d->lay & 0xFF000000; - restore_localviewdata(sa, 1); // 1 = free + restore_localviewdata(sa, 1); /* 1 = free */ /* for when in other window the layers have changed */ if (v3d->scenelock) v3d->lay = scene->lay; @@ -1681,7 +1681,7 @@ static void game_set_commmandline_options(GameData *gm) } } -#endif // WITH_GAMEENGINE +#endif /* WITH_GAMEENGINE */ static int game_engine_poll(bContext *C) { @@ -1722,7 +1722,7 @@ int ED_view3d_context_activate(bContext *C) if (!ar) return 0; - // bad context switch .. + /* bad context switch .. */ CTX_wm_area_set(C, sa); CTX_wm_region_set(C, ar); @@ -1741,7 +1741,7 @@ static int game_engine_exec(bContext *C, wmOperator *op) (void)op; /* unused */ - // bad context switch .. + /* bad context switch .. */ if (!ED_view3d_context_activate(C)) return OPERATOR_CANCELLED; @@ -1854,11 +1854,11 @@ static void UNUSED_FUNCTION(view3d_align_axis_to_vector)(View3D *v3d, RegionView rv3d->persp = RV3D_PERSP; rv3d->dist = 0.0; ED_view3d_from_object(v3d->camera, rv3d->ofs, NULL, NULL, &v3d->lens); - smooth_view(NULL, NULL, NULL, NULL, NULL, orig_ofs, new_quat, &orig_dist, &orig_lens); // XXX + smooth_view(NULL, NULL, NULL, NULL, NULL, orig_ofs, new_quat, &orig_dist, &orig_lens); /* XXX */ } else { if (rv3d->persp == RV3D_CAMOB) rv3d->persp = RV3D_PERSP; /* switch out of camera mode */ - smooth_view(NULL, NULL, NULL, NULL, NULL, NULL, new_quat, NULL, NULL); // XXX + smooth_view(NULL, NULL, NULL, NULL, NULL, NULL, new_quat, NULL, NULL); /* XXX */ } } |