diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index b27ca604810..837b02ace64 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -1027,7 +1027,7 @@ void draw_mesh_paint(RegionView3D *rv3d, Object *ob, DerivedMesh *dm, int draw_f glEnable(GL_COLOR_MATERIAL); dm->drawMappedFaces(dm, facemask, GPU_enable_material, NULL, me, - DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH); + DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH); glDisable(GL_COLOR_MATERIAL); glDisable(GL_LIGHTING); @@ -1035,13 +1035,14 @@ void draw_mesh_paint(RegionView3D *rv3d, Object *ob, DerivedMesh *dm, int draw_f GPU_disable_material(); } else if (ob->mode & OB_MODE_VERTEX_PAINT) { - if (me->mloopcol) + if (me->mloopcol) { dm->drawMappedFaces(dm, facemask, GPU_enable_material, NULL, me, - DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH); + DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH); + } else { glColor3f(1.0f, 1.0f, 1.0f); dm->drawMappedFaces(dm, facemask, GPU_enable_material, NULL, me, - DM_DRAW_ALWAYS_SMOOTH); + DM_DRAW_ALWAYS_SMOOTH); } } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index f93d4bea94d..fe140060821 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -1763,7 +1763,7 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base scale[2] = 1.0f / len_v3(ob->obmat[2]); BKE_camera_view_frame_ex(scene, cam, cam->drawsize, is_view, scale, - asp, shift, &drawsize, vec); + asp, shift, &drawsize, vec); glDisable(GL_LIGHTING); glDisable(GL_CULL_FACE); @@ -2209,9 +2209,9 @@ void mesh_foreachScreenFace( } void nurbs_foreachScreenVert( - ViewContext *vc, - void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y), - void *userData) + ViewContext *vc, + void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y), + void *userData) { Curve *cu = vc->obedit->data; short s[2] = {IS_CLIPPED, 0}; @@ -2905,7 +2905,7 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitS mul_v3_fl(vmid, 1.0f / (float)n); \ if (unit->system) \ bUnit_AsString(numstr, sizeof(numstr), \ - (double)(area * unit->scale_length), \ + (double)(area * unit->scale_length), \ 3, unit->system, B_UNIT_LENGTH, do_split, FALSE); \ else \ BLI_snprintf(numstr, sizeof(numstr), conv_float, area); \ diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 723dc9d5fc8..4a135f91d91 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -83,8 +83,8 @@ /* ******************* view3d space & buttons ************** */ -#define B_NOP 1 -#define B_REDR 2 +#define B_NOP 1 +#define B_REDR 2 #define B_OBJECTPANELMEDIAN 1008 /* temporary struct for storing transform properties */ @@ -595,7 +595,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float } else { bp->weight = scale_w > 0.0f ? bp->weight * scale_w : - 1.0f + ((1.0f - bp->weight) * scale_w); + 1.0f + ((1.0f - bp->weight) * scale_w); CLAMP(bp->weight, 0.0f, 1.0f); } } diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index dd90ef57307..682d8950440 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -102,7 +102,7 @@ static void star_stuff_init_func(void) glPointSize(1.0); glBegin(GL_POINTS); } -static void star_stuff_vertex_func(float*i) +static void star_stuff_vertex_func(float *i) { glVertex3fv(i); } @@ -716,7 +716,7 @@ static void draw_rotation_guide(RegionView3D *rv3d) glColor4fv(color); glBegin(GL_LINE_LOOP); for (i = 0, angle = 0.f; i < ROT_AXIS_DETAIL; ++i, angle += step) { - float p[3] = {s * cosf(angle), s * sinf(angle), 0.0f}; + float p[3] = {s *cosf(angle), s * sinf(angle), 0.0f}; if (!upright) { mul_qt_v3(q, p); @@ -1699,7 +1699,7 @@ static void draw_bgpics(Scene *scene, ARegion *ar, View3D *v3d, int foreground) } } else { - draw_bgpic(scene, ar, v3d, foreground); + draw_bgpic(scene, ar, v3d, foreground); } } @@ -1861,7 +1861,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas * offset feature (used in group-duplicate.blend but no longer works in 2.5) * so for now it should be ok to - campbell */ - if (/* if this is the last no need to make a displist */ + if ( /* if this is the last no need to make a displist */ (dob_next == NULL || dob_next->ob != dob->ob) || /* lamp drawing messes with matrices, could be handled smarter... but this works */ (dob->ob->type == OB_LAMP) || @@ -2556,7 +2556,7 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, /* transp and X-ray afterdraw stuff */ if (v3d->afterdraw_transp.first) view3d_draw_transp(scene, ar, v3d); - if (v3d->afterdraw_xray.first) view3d_draw_xray(scene, ar, v3d, 1); // clears zbuffer if it is used! + if (v3d->afterdraw_xray.first) view3d_draw_xray(scene, ar, v3d, 1); /* clears zbuffer if it is used! */ if (v3d->afterdraw_xraytransp.first) view3d_draw_xraytransp(scene, ar, v3d, 1); if (rv3d->rflag & RV3D_CLIPPING) diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index d7e7f710dcd..60a0d3bf12b 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -986,12 +986,12 @@ void VIEW3D_OT_rotate(wmOperatorType *ot) /* NDOF utility functions * (should these functions live in this file?) */ -float ndof_to_axis_angle(struct wmNDOFMotionData*ndof, float axis[3]) +float ndof_to_axis_angle(struct wmNDOFMotionData *ndof, float axis[3]) { return ndof->dt * normalize_v3_v3(axis, ndof->rvec); } -void ndof_to_quat(struct wmNDOFMotionData*ndof, float q[4]) +void ndof_to_quat(struct wmNDOFMotionData *ndof, float q[4]) { float axis[3]; float angle; @@ -1010,8 +1010,8 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event return OPERATOR_CANCELLED; else { View3D *v3d = CTX_wm_view3d(C); - RegionView3D*rv3d = CTX_wm_region_view3d(C); - wmNDOFMotionData*ndof = (wmNDOFMotionData *) event->customdata; + RegionView3D *rv3d = CTX_wm_region_view3d(C); + wmNDOFMotionData *ndof = (wmNDOFMotionData *) event->customdata; ED_view3d_camera_lock_init(v3d, rv3d); @@ -1162,8 +1162,8 @@ static int ndof_pan_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event) return OPERATOR_CANCELLED; else { View3D *v3d = CTX_wm_view3d(C); - RegionView3D*rv3d = CTX_wm_region_view3d(C); - wmNDOFMotionData*ndof = (wmNDOFMotionData *) event->customdata; + RegionView3D *rv3d = CTX_wm_region_view3d(C); + wmNDOFMotionData *ndof = (wmNDOFMotionData *) event->customdata; ED_view3d_camera_lock_init(v3d, rv3d); @@ -2239,7 +2239,7 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op)) size = v3d->near * 1.5f; } } - else /* ortho */ { + else { /* ortho */ if (size < 0.0001f) { /* bounding box was a single point so do not zoom */ ok_dist = 0; diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index c2a2a2be2fd..2dab26e7781 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -174,7 +174,7 @@ typedef struct FlyInfo { unsigned char use_freelook; int mval[2]; /* latest 2D mouse values */ - wmNDOFMotionData*ndof; /* latest 3D mouse values */ + wmNDOFMotionData *ndof; /* latest 3D mouse values */ /* fly state state */ float speed; /* the speed the view is moving per redraw */ @@ -690,7 +690,7 @@ static void move_camera(bContext *C, RegionView3D *rv3d, FlyInfo *fly, int orien { /* we are in camera view so apply the view ofs and quat to the view matrix and set the camera to the view */ - View3D*v3d = fly->v3d; + View3D *v3d = fly->v3d; Scene *scene = fly->scene; ID *id_key; @@ -1031,7 +1031,7 @@ static int flyApply_ndof(bContext *C, FlyInfo *fly) /* shorthand for oft-used variables */ wmNDOFMotionData *ndof = fly->ndof; const float dt = ndof->dt; - RegionView3D*rv3d = fly->rv3d; + RegionView3D *rv3d = fly->rv3d; const int flag = U.ndof_flag; #if 0 diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 23de42ecc36..b7cb9161ef4 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -53,9 +53,9 @@ struct wmWindowManager; #define BL_NEAR_CLIP 0.001 /* drawing flags: */ -#define DRAW_PICKING 1 -#define DRAW_CONSTCOLOR 2 -#define DRAW_SCENESET 4 +#define DRAW_PICKING 1 +#define DRAW_CONSTCOLOR 2 +#define DRAW_SCENESET 4 /* draw_mesh_fancy/draw_mesh_textured draw_flags */ #define DRAW_MODIFIERS_PREVIEW 1 @@ -95,8 +95,8 @@ void VIEW3D_OT_render_border(struct wmOperatorType *ot); void VIEW3D_OT_zoom_border(struct wmOperatorType *ot); void view3d_boxview_copy(ScrArea *sa, ARegion *ar); -void ndof_to_quat(struct wmNDOFMotionData* ndof, float q[4]); -float ndof_to_axis_angle(struct wmNDOFMotionData* ndof, float axis[3]); +void ndof_to_quat(struct wmNDOFMotionData *ndof, float q[4]); +float ndof_to_axis_angle(struct wmNDOFMotionData *ndof, float axis[3]); /* view3d_fly.c */ void view3d_keymap(struct wmKeyConfig *keyconf); @@ -105,8 +105,8 @@ void VIEW3D_OT_fly(struct wmOperatorType *ot); /* drawanim.c */ void draw_motion_paths_init(View3D *v3d, struct ARegion *ar); void draw_motion_path_instance(Scene *scene, - struct Object *ob, struct bPoseChannel *pchan, - struct bAnimVizSettings *avs, struct bMotionPath *mpath); + struct Object *ob, struct bPoseChannel *pchan, + struct bAnimVizSettings *avs, struct bMotionPath *mpath); void draw_motion_paths_cleanup(View3D *v3d); @@ -120,12 +120,12 @@ void drawaxes(float size, char drawtype); void view3d_cached_text_draw_begin(void); void view3d_cached_text_draw_add(const float co[3], const char *str, short xoffs, short flag, const unsigned char col[4]); -void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, float mat[][4]); -#define V3D_CACHE_TEXT_ZBUF (1<<0) -#define V3D_CACHE_TEXT_WORLDSPACE (1<<1) -#define V3D_CACHE_TEXT_ASCII (1<<2) -#define V3D_CACHE_TEXT_GLOBALSPACE (1<<3) -#define V3D_CACHE_TEXT_LOCALCLIP (1<<4) +void view3d_cached_text_draw_end(View3D * v3d, ARegion * ar, int depth_write, float mat[][4]); +#define V3D_CACHE_TEXT_ZBUF (1 << 0) +#define V3D_CACHE_TEXT_WORLDSPACE (1 << 1) +#define V3D_CACHE_TEXT_ASCII (1 << 2) +#define V3D_CACHE_TEXT_GLOBALSPACE (1 << 3) +#define V3D_CACHE_TEXT_LOCALCLIP (1 << 4) /* drawarmature.c */ int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, int flag, const short is_outline); @@ -136,7 +136,7 @@ void draw_mesh_paint(RegionView3D *rv3d, struct Object *ob, struct DerivedMesh * /* view3d_draw.c */ void view3d_main_area_draw(const struct bContext *C, struct ARegion *ar); -void draw_depth(Scene *scene, struct ARegion *ar, View3D *v3d, int (* func)(void *)); +void draw_depth(Scene *scene, struct ARegion *ar, View3D *v3d, int (*func)(void *)); void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d); void add_view3d_after(ListBase *lb, Base *base, int flag); @@ -160,12 +160,12 @@ void VIEW3D_OT_localview(struct wmOperatorType *ot); void VIEW3D_OT_game_start(struct wmOperatorType *ot); -int ED_view3d_boundbox_clip(RegionView3D *rv3d, float obmat[][4], struct BoundBox *bb); +int ED_view3d_boundbox_clip(RegionView3D * rv3d, float obmat[][4], struct BoundBox *bb); void smooth_view(struct bContext *C, struct View3D *v3d, struct ARegion *ar, struct Object *, struct Object *, float *ofs, float *quat, float *dist, float *lens); -void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); /* rect: for picking */ +void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); /* rect: for picking */ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d); void fly_modal_keymap(struct wmKeyConfig *keyconf); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 44f7dd0b871..d7b03447d5b 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -2055,7 +2055,7 @@ static int vertsel_vert_pick(struct bContext *C, Mesh *me, const int mval[2], un /* gets called via generic mouse select operator */ static int mouse_weight_paint_vertex_select(bContext *C, const int mval[2], short extend, Object *obact) { - Mesh*me = obact->data; /* already checked for NULL */ + Mesh *me = obact->data; /* already checked for NULL */ unsigned int index = 0; MVert *mv;