diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-03 20:31:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-03 20:31:46 +0400 |
commit | a2c182e9233333fc3b8ff40d352113ec95e7e30c (patch) | |
tree | 37a9e08f4e6c4bf794aa0c8c15af875299db4a1b /source/blender/editors/space_view3d | |
parent | 86cec98f9e1523ed41b67ef998174289dbae9b83 (diff) |
style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide).
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/drawarmature.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawmesh.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 40 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawvolume.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_buttons.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 34 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 23 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_fly.c | 41 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 11 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 38 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 50 |
12 files changed, 137 insertions, 122 deletions
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index e611ae1b64c..dd3d0c05beb 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -1280,8 +1280,8 @@ static void draw_wire_bone(int dt, int armflag, int boneflag, short constflag, u static void draw_bone(int dt, int armflag, int boneflag, short constflag, unsigned int id, float length) { - /* Draw a 3d octahedral bone, we use normalized space based on length, - for glDisplayLists */ + /* Draw a 3d octahedral bone, we use normalized space based on length, + * for glDisplayLists */ glScalef(length, length, length); diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index e368d8c10b7..f41846f3378 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -835,9 +835,9 @@ typedef struct TexMatCallback { static void tex_mat_set_material_cb(void *UNUSED(userData), int mat_nr, void *attribs) { /* all we have to do here is simply enable the GLSL material, but note - that the GLSL code will give different result depending on the drawtype, - in texture draw mode it will output the active texture node, in material - draw mode it will show the full material. */ + * that the GLSL code will give different result depending on the drawtype, + * in texture draw mode it will output the active texture node, in material + * draw mode it will show the full material. */ GPU_enable_material(mat_nr, attribs); } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index ecccb673c57..2ab8ec8aa99 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -1057,7 +1057,7 @@ static void spotvolume(float lvec[3], float vvec[3], const float inp) plane[1]= 1.0f; /* now we've got two equations: one of a cone and one of a plane, but we have - three unknowns. We remove one unkown by rotating the plane to z=0 (the plane normal) */ + * three unknowns. We remove one unkown by rotating the plane to z=0 (the plane normal) */ /* rotate around cross product vector of (0,0,1) and plane normal, dot product degrees */ /* according definition, we derive cross product is (plane[1],-plane[0],0), en cos = plane[2]);*/ @@ -1339,8 +1339,8 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, if (la->type==LA_SPOT) { float spotblcirc = fabs(z)*(1 - pow(la->spotblend, 2)); /* hide line if it is zero size or overlaps with outer border, - previously it adjusted to always to show it but that seems - confusing because it doesn't show the actual blend size */ + * previously it adjusted to always to show it but that seems + * confusing because it doesn't show the actual blend size */ if (spotblcirc != 0 && spotblcirc != fabsf(z)) circ(0.0, 0.0, spotblcirc); } @@ -1543,8 +1543,8 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D if (tracking_object->flag & TRACKING_OBJECT_CAMERA) { /* current ogl matrix is translated in camera space, bundles should - be rendered in world space, so camera matrix should be "removed" - from current ogl matrix */ + * be rendered in world space, so camera matrix should be "removed" + * from current ogl matrix */ invert_m4_m4(imat, base->object->obmat); glMultMatrixf(imat); @@ -2819,7 +2819,7 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitS if (me->drawflag & ME_DRAWEXTRA_FACEAREA) { /* would be nice to use BM_face_area_calc, but that is for 2d faces - so instead add up tessalation triangle areas */ + * so instead add up tessalation triangle areas */ BMFace *f; int n; @@ -2996,10 +2996,13 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, if (em->bm->selected.last) { BMEditSelection *ese= em->bm->selected.last; /* face is handeled above */ - /*if (ese->type == BM_FACE ) { +#if 0 + if (ese->type == BM_FACE ) { efa_act = (BMFace *)ese->data; } - else */ if ( ese->htype == BM_EDGE ) { + else +#endif + if ( ese->htype == BM_EDGE ) { eed_act = (BMEdge *)ese->ele; } else if ( ese->htype == BM_VERT ) { @@ -3170,7 +3173,7 @@ static void draw_mesh_object_outline(View3D *v3d, Object *ob, DerivedMesh *dm) glDepthMask(0); /* if transparent, we cannot draw the edges for solid select... edges have no material info. - drawFacesSolid() doesn't draw the transparent faces */ + * drawFacesSolid() doesn't draw the transparent faces */ if (ob->dtx & OB_DRAWTRANSP) { glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); dm->drawFacesSolid(dm, NULL, 0, GPU_enable_material); @@ -4597,13 +4600,15 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); glEnable(GL_COLOR_MATERIAL); } - /*else { +#if 0 + else { glDisableClientState(GL_NORMAL_ARRAY); glDisable(GL_COLOR_MATERIAL); glDisable(GL_LIGHTING); UI_ThemeColor(TH_WIRE); - }*/ + } +#endif if (totchild && (part->draw&PART_DRAW_PARENT)==0) totpart=0; @@ -5479,8 +5484,8 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, if (v3d->zbuf) glEnable(GL_DEPTH_TEST); - /* direction vectors for 3d curve paths - when at its lowest, dont render normals */ + /* direction vectors for 3d curve paths + * when at its lowest, dont render normals */ if (cu->flag & CU_3D && ts->normalsize > 0.0015f && (cu->drawflag & CU_HIDE_NORMALS)==0) { UI_ThemeColor(TH_WIRE); @@ -6766,7 +6771,8 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) // draw collision objects if ((smd->type & MOD_SMOKE_TYPE_COLL) && smd->coll) { - /*SmokeCollSettings *scs = smd->coll; +#if 0 + SmokeCollSettings *scs = smd->coll; if (scs->points) { size_t i; @@ -6795,7 +6801,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) if (col) cpack(col); } - */ +#endif } // only draw domains @@ -7014,8 +7020,8 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) if (ELEM(cti->type, CONSTRAINT_TYPE_FOLLOWTRACK, CONSTRAINT_TYPE_OBJECTSOLVER)) { /* special case for object solver and follow track constraints because they don't fill - constraint targets properly (design limitation -- scene is needed for their target - but it can't be accessed from get_targets callvack) */ + * constraint targets properly (design limitation -- scene is needed for their target + * but it can't be accessed from get_targets callvack) */ Object *camob= NULL; diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c index 9618e5aeef0..b36ce6656b2 100644 --- a/source/blender/editors/space_view3d/drawvolume.c +++ b/source/blender/editors/space_view3d/drawvolume.c @@ -305,12 +305,12 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - /* +#if 0 printf("Viewinv:\n"); printf("%f, %f, %f\n", rv3d->viewinv[0][0], rv3d->viewinv[0][1], rv3d->viewinv[0][2]); printf("%f, %f, %f\n", rv3d->viewinv[1][0], rv3d->viewinv[1][1], rv3d->viewinv[1][2]); printf("%f, %f, %f\n", rv3d->viewinv[2][0], rv3d->viewinv[2][1], rv3d->viewinv[2][2]); - */ +#endif // get view vector copy_v3_v3(viewnormal, rv3d->viewinv[2]); diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 996d782be4d..43d74a7d2cd 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -234,8 +234,8 @@ void ED_view3d_init_mats_rv3d_gl(struct Object *ob, struct RegionView3D *rv3d) ED_view3d_init_mats_rv3d(ob, rv3d); /* we have to multiply instead of loading viewmatob to make - it work with duplis using displists, otherwise it will - override the dupli-matrix */ + * it work with duplis using displists, otherwise it will + * override the dupli-matrix */ glMultMatrixf(ob->obmat); } diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 3e2979a7e88..9a588f698b9 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -1310,7 +1310,7 @@ static void view3d_panel_object(const bContext *C, Panel *pa) if (ob==NULL) return; /* make sure we got storage */ - /* +#if 0 if (v3d->properties_storage==NULL) v3d->properties_storage= MEM_callocN(sizeof(TransformProperties), "TransformProperties"); tfp= v3d->properties_storage; @@ -1324,7 +1324,7 @@ static void view3d_panel_object(const bContext *C, Panel *pa) uiBlockEndAlign(block); } } - */ +#endif lim= 10000.0f * MAX2(1.0f, v3d->grid); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index fc5ef42b462..f1efdd1e165 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -841,8 +841,8 @@ static void draw_viewport_name(ARegion *ar, View3D *v3d) } /* draw info beside axes in bottom left-corner: -* framenum, object name, bone name (if available), marker name (if available) -*/ + * framenum, object name, bone name (if available), marker name (if available) + */ static void draw_selected_name(Scene *scene, Object *ob) { char info[256], *markern; @@ -1225,7 +1225,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) } if (ca && (ca->flag & CAM_SHOWSENSOR)) { /* determine sensor fit, and get sensor x/y, for auto fit we - assume and square sensor and only use sensor_x */ + * assume and square sensor and only use sensor_x */ float sizex= scene->r.xsch*scene->r.xasp; float sizey= scene->r.ysch*scene->r.yasp; int sensor_fit = camera_sensor_fit(ca->sensor_fit, sizex, sizey); @@ -1562,8 +1562,8 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d) ibuf= BKE_movieclip_get_ibuf(clip, &bgpic->cuser); /* working with ibuf from image and clip has got different workflow now. - ibuf acquired from clip is referenced by cache system and should - be dereferenced after usage. */ + * ibuf acquired from clip is referenced by cache system and should + * be dereferenced after usage. */ freeibuf= ibuf; } @@ -1764,9 +1764,9 @@ static void view3d_draw_xraytransp(Scene *scene, ARegion *ar, View3D *v3d, int c /* *********************** */ /* - In most cases call draw_dupli_objects, - draw_dupli_objects_color was added because when drawing set dupli's - we need to force the color + * In most cases call draw_dupli_objects, + * draw_dupli_objects_color was added because when drawing set dupli's + * we need to force the color */ #if 0 @@ -1895,7 +1895,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas static void draw_dupli_objects(Scene *scene, ARegion *ar, View3D *v3d, Base *base) { /* define the color here so draw_dupli_objects_color can be called - * from the set loop */ + * from the set loop */ int color= (base->flag & SELECT)?TH_SELECT:TH_WIRE; /* debug */ @@ -2753,9 +2753,11 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const v3d->zbuf= FALSE; /* enables anti-aliasing for 3D view drawing */ - /*if (!(U.gameflags & USER_DISABLE_AA)) - glEnable(GL_MULTISAMPLE_ARB);*/ - +#if 0 + if (!(U.gameflags & USER_DISABLE_AA)) + glEnable(GL_MULTISAMPLE_ARB); +#endif + // needs to be done always, gridview is adjusted in drawgrid() now rv3d->gridview= v3d->grid; @@ -2868,10 +2870,12 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const ED_view3d_clipping_disable(); BIF_draw_manipulator(C); - + +#if 0 /* Disable back anti-aliasing */ - /*if (!(U.gameflags & USER_DISABLE_AA)) - glDisable(GL_MULTISAMPLE_ARB);*/ + if (!(U.gameflags & USER_DISABLE_AA)) + glDisable(GL_MULTISAMPLE_ARB); +#endif if (v3d->zbuf) { v3d->zbuf= FALSE; diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index c8d577a315e..f3945d1680c 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -610,11 +610,12 @@ void viewrotate_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_add_item(keymap, LEFTALTKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_AXIS_SNAP_ENABLE); WM_modalkeymap_add_item(keymap, LEFTALTKEY, KM_RELEASE, KM_ANY, 0, VIEWROT_MODAL_AXIS_SNAP_DISABLE); - /* disabled mode switching for now, can re-implement better, later on + /* disabled mode switching for now, can re-implement better, later on */ +#if 0 WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ZOOM); WM_modalkeymap_add_item(keymap, LEFTCTRLKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ZOOM); WM_modalkeymap_add_item(keymap, LEFTSHIFTKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_MOVE); - */ +#endif /* assign map to operators */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_rotate"); @@ -640,8 +641,7 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y) cross_v3_v3v3(q1+1, vod->trackvec, newvec); normalize_v3(q1+1); - /* Allow for rotation beyond the interval - * [-pi, pi] */ + /* Allow for rotation beyond the interval [-pi, pi] */ while (si > 1.0f) si -= 2.0f; @@ -1254,11 +1254,12 @@ void viewmove_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, VIEW_MODAL_CONFIRM); - /* disabled mode switching for now, can re-implement better, later on + /* disabled mode switching for now, can re-implement better, later on */ +#if 0 WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ZOOM); WM_modalkeymap_add_item(keymap, LEFTCTRLKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ZOOM); WM_modalkeymap_add_item(keymap, LEFTSHIFTKEY, KM_RELEASE, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ROTATE); - */ +#endif /* assign map to operators */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_move"); @@ -1414,11 +1415,12 @@ void viewzoom_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, VIEW_MODAL_CONFIRM); - /* disabled mode switching for now, can re-implement better, later on + /* disabled mode switching for now, can re-implement better, later on */ +#if 0 WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ROTATE); WM_modalkeymap_add_item(keymap, LEFTCTRLKEY, KM_RELEASE, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ROTATE); WM_modalkeymap_add_item(keymap, LEFTSHIFTKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_MOVE); - */ +#endif /* assign map to operators */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_zoom"); @@ -1666,11 +1668,12 @@ void viewdolly_modal_keymap(wmKeyConfig *keyconf) WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, VIEW_MODAL_CONFIRM); - /* disabled mode switching for now, can re-implement better, later on + /* disabled mode switching for now, can re-implement better, later on */ +#if 0 WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_RELEASE, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ROTATE); WM_modalkeymap_add_item(keymap, LEFTCTRLKEY, KM_RELEASE, KM_ANY, 0, VIEWROT_MODAL_SWITCH_ROTATE); WM_modalkeymap_add_item(keymap, LEFTSHIFTKEY, KM_PRESS, KM_ANY, 0, VIEWROT_MODAL_SWITCH_MOVE); - */ +#endif /* assign map to operators */ WM_modalkeymap_assign(keymap, "VIEW3D_OT_dolly"); diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index c8c62d63e36..0ae2ae0a9d1 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -183,10 +183,10 @@ typedef struct FlyInfo { short pan_view; /* when true, pan the view instead of rotating */ /* relative view axis locking - xlock, zlock - 0; disabled - 1; enabled but not checking because mouse hasnt moved outside the margin since locking was checked an not needed - when the mouse moves, locking is set to 2 so checks are done. - 2; mouse moved and checking needed, if no view altering is donem its changed back to 1 */ + * 0) disabled + * 1) enabled but not checking because mouse hasnt moved outside the margin since locking was checked an not needed + * when the mouse moves, locking is set to 2 so checks are done. + * 2) mouse moved and checking needed, if no view altering is donem its changed back to 1 */ short xlock, zlock; float xlock_momentum, zlock_momentum; /* nicer dynamics */ float grid; /* world scale 1.0 default */ @@ -202,8 +202,8 @@ typedef struct FlyInfo { short persp_backup; /* remember if were ortho or not, only used for restoring the view if it was a ortho view */ short is_ortho_cam; /* are we flying an ortho camera in perspective view, - * which was originall in ortho view? - * could probably figure it out but better be explicit */ + * which was originall in ortho view? + * could probably figure it out but better be explicit */ void *obtfm; /* backup the objects transform */ @@ -223,7 +223,7 @@ static void drawFlyPixel(const struct bContext *UNUSED(C), struct ARegion *UNUSE FlyInfo *fly = arg; /* draws 4 edge brackets that frame the safe area where the - mouse can move during fly mode without spinning the view */ + * mouse can move during fly mode without spinning the view */ float x1, x2, y1, y2; x1= 0.45f * (float)fly->ar->winx; @@ -377,11 +377,11 @@ static int initFlyInfo (bContext *C, FlyInfo *fly, wmOperator *op, wmEvent *even copy_v3_v3(fly->ofs_backup, fly->rv3d->ofs); /* the dist defines a vector that is infront of the offset - to rotate the view about. - this is no good for fly mode because we - want to rotate about the viewers center. - but to correct the dist removal we must - alter offset so the view doesn't jump. */ + * to rotate the view about. + * this is no good for fly mode because we + * want to rotate about the viewers center. + * but to correct the dist removal we must + * alter offset so the view doesn't jump. */ fly->rv3d->dist= 0.0f; @@ -720,10 +720,9 @@ static int flyApply(bContext *C, FlyInfo *fly) #define FLY_ZUP_CORRECT_FAC 0.1f /* amount to correct per step */ #define FLY_ZUP_CORRECT_ACCEL 0.05f /* increase upright momentum each step */ - /* - fly mode - Shift+F - a fly loop where the user can move move the view as if they are flying - */ + /* fly mode - Shift+F + * a fly loop where the user can move move the view as if they are flying + */ RegionView3D *rv3d= fly->rv3d; ARegion *ar = fly->ar; @@ -807,7 +806,7 @@ static int flyApply(bContext *C, FlyInfo *fly) /*fprintf(stderr, "%f\n", time_redraw);*/ /* 0.002 is a small redraw 0.02 is larger */ /* Scale the time to use shift to scale the speed down- just like - shift slows many other areas of blender down */ + * shift slows many other areas of blender down */ if (fly->use_precision) fly->speed= fly->speed * (1.0f-time_redraw_clamped); @@ -829,7 +828,7 @@ static int flyApply(bContext *C, FlyInfo *fly) } else { float roll; /* similar to the angle between the camera's up and the Z-up, - * but its very rough so just roll*/ + * but its very rough so just roll */ /* rotate about the X axis- look up/down */ if (moffset[1]) { @@ -988,8 +987,10 @@ static int flyApply_ndof(bContext *C, FlyInfo *fly) RegionView3D* rv3d = fly->rv3d; const int flag = U.ndof_flag; -/* int shouldRotate = (flag & NDOF_SHOULD_ROTATE) && (fly->pan_view == FALSE), - shouldTranslate = (flag & (NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM)); */ +#if 0 + int shouldRotate = (flag & NDOF_SHOULD_ROTATE) && (fly->pan_view == FALSE), + shouldTranslate = (flag & (NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM)); +#endif int shouldRotate = (fly->pan_view == FALSE), shouldTranslate = TRUE; diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index f80bd6c3807..b3ec1676bfb 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -131,7 +131,7 @@ static void handle_view3d_lock(bContext *C) scene->camera= v3d->camera; /* not through notifiery, listener don't have context - and non-open screens or spaces need to be updated too */ + * and non-open screens or spaces need to be updated too */ BKE_screen_view3d_main_sync(&bmain->screen, scene); /* notifiers for scene update */ @@ -140,10 +140,11 @@ static void handle_view3d_lock(bContext *C) } } -/* layer code is on three levels actually: -- here for operator -- uiTemplateLayers in interface/ code for buttons -- ED_view3d_scene_layer_set for RNA +/** + * layer code is on three levels actually: + * - here for operator + * - uiTemplateLayers in interface/ code for buttons + * - ED_view3d_scene_layer_set for RNA */ static void view3d_layers_editmode_ensure(Scene *scene, View3D *v3d) { diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index a5c7e21e3b4..15b1dde500b 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -394,8 +394,8 @@ int lasso_inside_edge(int mcords[][2], short moves, int x0, int y0, int x1, int /* warning; lasso select with backbuffer-check draws in backbuf with persp(PERSP_WIN) - and returns with persp(PERSP_VIEW). After lasso select backbuf is not OK -*/ + * and returns with persp(PERSP_VIEW). After lasso select backbuf is not OK + */ static void do_lasso_select_pose(ViewContext *vc, Object *ob, int mcords[][2], short moves, short select) { bPoseChannel *pchan; @@ -962,7 +962,7 @@ static void view3d_lasso_select(bContext *C, ViewContext *vc, int mcords[][2], s /* lasso operator gives properties, but since old code works - with short array we convert */ + * with short array we convert */ static int view3d_lasso_select_exec(bContext *C, wmOperator *op) { ViewContext vc; @@ -1377,7 +1377,7 @@ static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int base= startbase; while (base) { /* skip objects with select restriction, to prevent prematurely ending this loop - * with an un-selectable choice */ + * with an un-selectable choice */ if (base->object->restrictflag & OB_RESTRICT_SELECT) { base=base->next; if (base==NULL) base= FIRSTBASE; @@ -1534,13 +1534,13 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce hitresult= buffer[3+(i*4)]; /* if there's bundles in buffer select bundles first, - so non-camera elements should be ignored in buffer */ + * so non-camera elements should be ignored in buffer */ if (basact->selcol != (hitresult & 0xFFFF)) { continue; } /* index of bundle is 1<<16-based. if there's no "bone" index - in hight word, this buffer value belongs to camera,. not to bundle */ + * in hight word, this buffer value belongs to camera,. not to bundle */ if (buffer[4*i+3] & 0xFFFF0000) { MovieClip *clip= object_get_movieclip(scene, basact->object, 0); MovieTracking *tracking= &clip->tracking; @@ -1578,7 +1578,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce if (!changed) { /* fallback to regular object selection if no new bundles were selected, - allows to select object parented to reconstruction object */ + * allows to select object parented to reconstruction object */ basact= mouse_select_eval_buffer(&vc, buffer, hits, mval, startbase, 0); } } @@ -1586,7 +1586,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce else if (ED_do_pose_selectbuffer(scene, basact, buffer, hits, extend) ) { /* then bone is found */ /* we make the armature selected: - not-selected active object in posemode won't work well for tools */ + * not-selected active object in posemode won't work well for tools */ basact->flag|= SELECT; basact->object->flag= basact->flag; @@ -1984,16 +1984,16 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, i vbuffer = MEM_mallocN(4 * (totobj+MAXPICKBUF) * sizeof(unsigned int), "selection buffer"); hits= view3d_opengl_select(vc, vbuffer, 4*(totobj+MAXPICKBUF), rect); /* - LOGIC NOTES (theeth): - The buffer and ListBase have the same relative order, which makes the selection - very simple. Loop through both data sets at the same time, if the color - is the same as the object, we have a hit and can move to the next color - and object pair, if not, just move to the next object, - keeping the same color until we have a hit. - - The buffer order is defined by OGL standard, hopefully no stupid GFX card - does it incorrectly. - */ + * LOGIC NOTES (theeth): + * The buffer and ListBase have the same relative order, which makes the selection + * very simple. Loop through both data sets at the same time, if the color + * is the same as the object, we have a hit and can move to the next color + * and object pair, if not, just move to the next object, + * keeping the same color until we have a hit. + * + * The buffer order is defined by OGL standard, hopefully no stupid GFX card + * does it incorrectly. + */ if (hits>0) { /* no need to loop if there's no hit */ Base *base; @@ -2167,7 +2167,7 @@ static int vertsel_vert_pick(struct bContext *C, Mesh *me, const int mval[2], un if (size > 0) { /* sample rect to increase changes of selecting, so that when clicking - on an face in the backbuf, we can still select a vert */ + * on an face in the backbuf, we can still select a vert */ int dist; *index = view3d_sample_backbuf_rect(&vc, mval, size, 1, me->totvert+1, &dist,0,NULL, NULL); diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 847bd2e0b24..359bb8967eb 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -74,8 +74,8 @@ #include "view3d_intern.h" // own include /* use this call when executing an operator, - event system doesn't set for each event the - opengl drawing context */ + * event system doesn't set for each event the + * opengl drawing context */ void view3d_operator_needs_opengl(const bContext *C) { wmWindow *win = CTX_wm_window(C); @@ -179,7 +179,7 @@ void smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Objec changed = 1; /* The new view is different from the old one - * so animate the view */ + * so animate the view */ if (changed) { /* original values */ @@ -203,9 +203,9 @@ void smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Objec sms.time_allowed= (double)U.smooth_viewtx / 1000.0; /* if this is view rotation only - * we can decrease the time allowed by - * the angle between quats - * this means small rotations wont lag */ + * we can decrease the time allowed by + * the angle between quats + * this means small rotations wont lag */ if (quat && !ofs && !dist) { float vec1[3]={0,0,1}, vec2[3]= {0,0,1}; float q1[4], q2[4]; @@ -531,7 +531,7 @@ void ED_view3d_calc_clipping(BoundBox *bb, float planes[4][4], bglMats *mats, co int val, flip_sign, a; /* near zero floating point values can give issues with gluUnProject - in side view on some implementations */ + * in side view on some implementations */ if (fabs(mats->modelview[0]) < 1e-6) mats->modelview[0]= 0.0; if (fabs(mats->modelview[5]) < 1e-6) mats->modelview[5]= 0.0; @@ -553,8 +553,8 @@ void ED_view3d_calc_clipping(BoundBox *bb, float planes[4][4], bglMats *mats, co } /* verify if we have negative scale. doing the transform before cross - product flips the sign of the vector compared to doing cross product - before transform then, so we correct for that. */ + * product flips the sign of the vector compared to doing cross product + * before transform then, so we correct for that. */ for (a=0; a<16; a++) ((float*)modelview)[a] = mats->modelview[a]; flip_sign = is_negative_m4(modelview); @@ -649,15 +649,15 @@ int initgrabz(RegionView3D *rv3d, float x, float y, float z) if (rv3d->zfac < 0.0f) flip= TRUE; /* if x,y,z is exactly the viewport offset, zfac is 0 and we don't want that - * (accounting for near zero values) - * */ + * (accounting for near zero values) + */ if (rv3d->zfac < 1.e-6f && rv3d->zfac > -1.e-6f) rv3d->zfac = 1.0f; /* Negative zfac means x, y, z was behind the camera (in perspective). - * This gives flipped directions, so revert back to ok default case. - */ - // NOTE: I've changed this to flip zfac to be positive again for now so that GPencil draws ok - // -- Aligorith, 2009Aug31 + * This gives flipped directions, so revert back to ok default case. + */ + /* NOTE: I've changed this to flip zfac to be positive again for now so that GPencil draws ok + * Aligorith, 2009Aug31 */ //if (rv3d->zfac < 0.0f) rv3d->zfac = 1.0f; if (rv3d->zfac < 0.0f) rv3d->zfac= -rv3d->zfac; @@ -757,7 +757,7 @@ void ED_view3d_ob_project_mat_get(RegionView3D *rv3d, Object *ob, float pmat[4][ } /* Uses window coordinates (x,y) and depth component z to find a point in - modelspace */ + * modelspace */ void view3d_unproject(bglMats *mats, float out[3], const short x, const short y, const float z) { double ux, uy, uz; @@ -1192,11 +1192,11 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d) } } -/* IGLuint-> GLuint*/ +/* IGLuint-> GLuint */ /* Warning: be sure to account for a negative return value -* This is an error, "Too many objects in select buffer" -* and no action should be taken (can crash blender) if this happens -*/ + * This is an error, "Too many objects in select buffer" + * and no action should be taken (can crash blender) if this happens + */ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int bufsize, rcti *input) { Scene *scene= vc->scene; @@ -1683,9 +1683,9 @@ static void game_set_commmandline_options(GameData *gm) static int game_engine_poll(bContext *C) { /* we need a context and area to launch BGE - it's a temporary solution to avoid crash at load time - if we try to auto run the BGE. Ideally we want the - context to be set as soon as we load the file. */ + * it's a temporary solution to avoid crash at load time + * if we try to auto run the BGE. Ideally we want the + * context to be set as soon as we load the file. */ if (CTX_wm_window(C)==NULL) return 0; if (CTX_wm_screen(C)==NULL) return 0; @@ -1743,7 +1743,7 @@ static int game_engine_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* redraw to hide any menus/popups, we don't go back to - the window manager until after this operator exits */ + * the window manager until after this operator exits */ WM_redraw_windows(C); rv3d= CTX_wm_region_view3d(C); @@ -1789,7 +1789,7 @@ static int game_engine_exec(bContext *C, wmOperator *op) if (prevwin) { /* restore context, in case it changed in the meantime, for - example by working in another window or closing it */ + * example by working in another window or closing it */ CTX_wm_region_set(C, prevar); CTX_wm_window_set(C, prevwin); CTX_wm_area_set(C, prevsa); |