[Bf-blender-cvs] [551d1a1] master: Code cleanup: style
Campbell Barton
noreply at git.blender.org
Mon Mar 24 03:31:49 CET 2014
Commit: 551d1a1ed56d7406f440c8e858ad64f177664c5b
Author: Campbell Barton
Date: Mon Mar 24 12:59:36 2014 +1100
https://developer.blender.org/rB551d1a1ed56d7406f440c8e858ad64f177664c5b
Code cleanup: style
===================================================================
M source/blender/blenkernel/intern/pbvh_intern.h
M source/blender/blenlib/intern/math_easing.c
M source/blender/editors/animation/keyframes_edit.c
M source/blender/editors/interface/interface_widgets.c
M source/blender/editors/sculpt_paint/paint_intern.h
M source/blender/editors/sculpt_paint/paint_vertex.c
M source/blender/editors/sculpt_paint/paint_vertex_proj.c
M source/blender/editors/sculpt_paint/sculpt.c
M source/blender/makesrna/intern/rna_fcurve.c
===================================================================
diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h
index 75d2a83..1230d3a 100644
--- a/source/blender/blenkernel/intern/pbvh_intern.h
+++ b/source/blender/blenkernel/intern/pbvh_intern.h
@@ -181,12 +181,14 @@ bool ray_face_intersection(const float ray_start[3], const float ray_normal[3],
void pbvh_update_BB_redraw(PBVH *bvh, PBVHNode **nodes, int totnode, int flag);
/* pbvh_bmesh.c */
-int pbvh_bmesh_node_raycast(PBVHNode *node, const float ray_start[3],
- const float ray_normal[3], float *dist,
- int use_original);
-
-int pbvh_bmesh_node_raycast_detail(PBVHNode *node, const float ray_start[3],
- const float ray_normal[3], float *detail, float *dist);
+int pbvh_bmesh_node_raycast(
+ PBVHNode *node, const float ray_start[3],
+ const float ray_normal[3], float *dist,
+ int use_original);
+
+int pbvh_bmesh_node_raycast_detail(
+ PBVHNode *node, const float ray_start[3],
+ const float ray_normal[3], float *detail, float *dist);
void pbvh_bmesh_normals_update(PBVHNode **nodes, int totnode);
diff --git a/source/blender/blenlib/intern/math_easing.c b/source/blender/blenlib/intern/math_easing.c
index a630250..d3ccf5e 100644
--- a/source/blender/blenlib/intern/math_easing.c
+++ b/source/blender/blenlib/intern/math_easing.c
@@ -227,7 +227,7 @@ float ExpoEaseInOut(float time, float begin, float change, float duration)
if (time == duration)
return begin + change;
if ((time /= duration / 2) < 1)
- return change/2 * pow(2, 10 * (time - 1)) + begin;
+ return change / 2 * pow(2, 10 * (time - 1)) + begin;
--time;
return change / 2 * (-pow(2, -10 * time) + 2) + begin;
}
@@ -275,7 +275,7 @@ float QuartEaseInOut(float time, float begin, float change, float duration)
if ((time /= duration / 2) < 1)
return change / 2 * time * time * time * time + begin;
time -= 2;
- return -change/2 * ( time * time * time * time - 2) + begin;
+ return -change / 2 * ( time * time * time * time - 2) + begin;
}
float QuintEaseIn(float time, float begin, float change, float duration)
@@ -291,7 +291,7 @@ float QuintEaseOut(float time, float begin, float change, float duration)
float QuintEaseInOut(float time, float begin, float change, float duration)
{
if ((time /= duration / 2) < 1)
- return change/2 * time * time * time * time * time + begin;
+ return change / 2 * time * time * time * time * time + begin;
time -= 2;
return change / 2 * (time * time * time * time * time + 2) + begin;
}
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index b14bbe8..e5929d0 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -988,7 +988,7 @@ static short set_bezt_quint(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
static short set_bezt_sine(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
{
if (bezt->f2 & SELECT)
- bezt->ipo= BEZT_IPO_SINE;
+ bezt->ipo = BEZT_IPO_SINE;
return 0;
}
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 68417f9..4a830e3 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -2081,7 +2081,7 @@ static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, const rcti *
* lock the value of the color wheel to 1.
* Useful for color correction tools where you're only interested in hue. */
if (but->flag & UI_BUT_COLOR_LOCK) {
- if(U.color_picker_type == USER_CP_CIRCLE_HSV)
+ if (U.color_picker_type == USER_CP_CIRCLE_HSV)
hsv[2] = 1.f;
else
hsv[2] = 0.5f;
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index e95632e..5f951f7 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -126,8 +126,9 @@ typedef struct VertProjData {
/* paint_vertex_proj.c */
struct VertProjHandle;
-struct VertProjHandle *ED_vpaint_proj_handle_create(struct Scene *scene, struct Object *ob,
- VertProjData **r_vcosnos);
+struct VertProjHandle *ED_vpaint_proj_handle_create(
+ struct Scene *scene, struct Object *ob,
+ VertProjData **r_vcosnos);
void ED_vpaint_proj_handle_update(
struct VertProjHandle *vp_handle,
/* runtime vars */
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 17e86b2..c7bbf24 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -910,8 +910,9 @@ static int sample_backbuf_area(ViewContext *vc, int *indexar, int totface, int x
}
/* whats _dl mean? */
-static float calc_vp_strength_col_dl(VPaint *vp, ViewContext *vc, const VertProjData *data, const int index,
- const float brush_size_pressure, float rgba[4])
+static float calc_vp_strength_col_dl(
+ VPaint *vp, ViewContext *vc, const VertProjData *data, const int index,
+ const float brush_size_pressure, float rgba[4])
{
float dist_sq = data->dists_sq[index];
if (dist_sq <= brush_size_pressure * brush_size_pressure) {
@@ -939,10 +940,11 @@ static float calc_vp_strength_col_dl(VPaint *vp, ViewContext *vc, const VertProj
return 0.0f;
}
-static float calc_vp_alpha_col_dl(VPaint *vp, ViewContext *vc,
- float vpimat[3][3], const VertProjData *data,
- const int index,
- const float brush_size_pressure, const float brush_alpha_pressure, float rgba[4])
+static float calc_vp_alpha_col_dl(
+ VPaint *vp, ViewContext *vc,
+ float vpimat[3][3], const VertProjData *data,
+ const int index,
+ const float brush_size_pressure, const float brush_alpha_pressure, float rgba[4])
{
float strength = calc_vp_strength_col_dl(vp, vc, data, index, brush_size_pressure, rgba);
@@ -2842,7 +2844,7 @@ static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const f
}
static void vpaint_paint_poly(VPaint *vp, VPaintData *vpd, Mesh *me, const unsigned int index,
- const float brush_size_pressure, const float brush_alpha_pressure)
+ const float brush_size_pressure, const float brush_alpha_pressure)
{
ViewContext *vc = &vpd->vc;
Brush *brush = BKE_paint_brush(&vp->paint);
@@ -2892,8 +2894,8 @@ static void vpaint_paint_poly(VPaint *vp, VPaintData *vpd, Mesh *me, const unsig
float rgba[4];
unsigned int paintcol;
alpha = calc_vp_alpha_col_dl(vp, vc, vpd->vpimat,
- vpd->data, ml->v,
- brush_size_pressure, brush_alpha_pressure, rgba);
+ vpd->data, ml->v,
+ brush_size_pressure, brush_alpha_pressure, rgba);
if (vpd->is_texbrush) {
float rgba_br[3];
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_proj.c b/source/blender/editors/sculpt_paint/paint_vertex_proj.c
index 3175a5a..1d98c39 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_proj.c
@@ -124,8 +124,9 @@ static void vpaint_proj_dm_map_cosnos_init(Scene *scene, Object *ob,
/* Same as init but take mouse location into account */
-static void vpaint_proj_dm_map_cosnos_update__map_cb(void *userData, int index, const float co[3],
- const float no_f[3], const short no_s[3])
+static void vpaint_proj_dm_map_cosnos_update__map_cb(
+ void *userData, int index, const float co[3],
+ const float no_f[3], const short no_s[3])
{
struct VertProjUpdate *vp_update = userData;
@@ -136,8 +137,8 @@ static void vpaint_proj_dm_map_cosnos_update__map_cb(void *userData, int index,
float co_ss[2]; /* screenspace */
if (ED_view3d_project_float_object(vp_update->ar,
- co, co_ss,
- V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
+ co, co_ss,
+ V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
{
const float dist_sq = len_squared_v2v2(vp_update->mval_fl, co_ss);
if (dist_sq > data->dists_sq[index]) {
@@ -158,8 +159,9 @@ static void vpaint_proj_dm_map_cosnos_update__map_cb(void *userData, int index,
}
}
-static void vpaint_proj_dm_map_cosnos_update(struct VertProjHandle *vp_handle,
- ARegion *ar, const float mval_fl[2])
+static void vpaint_proj_dm_map_cosnos_update(
+ struct VertProjHandle *vp_handle,
+ ARegion *ar, const float mval_fl[2])
{
struct VertProjUpdate vp_update = {vp_handle, ar, mval_fl};
@@ -187,8 +189,9 @@ static void vpaint_proj_dm_map_cosnos_update(struct VertProjHandle *vp_handle,
/* -------------------------------------------------------------------- */
/* Public Functions */
-struct VertProjHandle *ED_vpaint_proj_handle_create(Scene *scene, Object *ob,
- VertProjData **r_vcosnos)
+struct VertProjHandle *ED_vpaint_proj_handle_create(
+ Scene *scene, Object *ob,
+ VertProjData **r_vcosnos)
{
struct VertProjHandle *vp_handle = MEM_mallocN(sizeof(struct VertProjHandle), __func__);
Mesh *me = ob->data;
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 1ddc48e..6334c16 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -115,7 +115,7 @@ int system_physical_thread_count(void)
size_t pcount_len;
sysctlbyname("hw.physicalcpu", &pcount, &pcount_len, NULL, 0);
return pcount;
- }
+}
#endif // __APPLE__
void ED_sculpt_get_average_stroke(Object *ob, float stroke[3])
@@ -3793,7 +3793,7 @@ static void sculpt_omp_start(Sculpt *sd, SculptSession *ss)
cache->num_threads = omp_get_num_procs();
#endif
}
- else {
+ else {
cache->num_threads = 1;
}
omp_set_num_threads(cache->num_threads);
@@ -4301,7 +4301,8 @@ static void sculpt_raycast_detail_cb(PBVHNode *node, void *data_v, float *tmin)
if (BKE_pbvh_node_get_tmin(node
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list