Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/intern/pbvh_intern.h14
-rw-r--r--source/blender/blenlib/intern/math_easing.c6
-rw-r--r--source/blender/editors/animation/keyframes_edit.c2
-rw-r--r--source/blender/editors/interface/interface_widgets.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_intern.h5
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c20
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_proj.c19
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c22
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c10
9 files changed, 54 insertions, 46 deletions
diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h
index 75d2a8333a1..1230d3a90b6 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 a630250d2ba..d3ccf5ea85d 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 b14bbe821e8..e5929d0ad8e 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 68417f90f04..4a830e33027 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 e95632ef8c4..5f951f72a21 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 17e86b2738f..c7bbf241e38 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 3175a5a4235..1d98c39816e 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 1ddc48edf32..6334c167a02 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) < *tmin) {
SculptDetailRaycastData *srd = data_v;
if (BKE_pbvh_bmesh_node_raycast_detail(node, srd->ray_start, srd->ray_normal,
- &srd->detail, &srd->dist)) {
+ &srd->detail, &srd->dist))
+ {
srd->hit = 1;
*tmin = srd->dist;
}
@@ -5262,8 +5263,7 @@ static int sculpt_detail_flood_fill_exec(bContext *C, wmOperator *UNUSED(op))
size = max_fff(bb_max[0], bb_max[1], bb_max[2]);
/* update topology size */
- BKE_pbvh_bmesh_detail_size_set(ss->pbvh,
- sd->constant_detail/ 100.0f);
+ BKE_pbvh_bmesh_detail_size_set(ss->pbvh, sd->constant_detail / 100.0f);
sculpt_undo_push_begin("Dynamic topology flood fill");
sculpt_undo_push_node(ob, NULL, SCULPT_UNDO_COORDS);
@@ -5342,10 +5342,9 @@ static void sample_detail(bContext *C, int ss_co[2])
srd.detail = sd->constant_detail;
BKE_pbvh_raycast(ob->sculpt->pbvh, sculpt_raycast_detail_cb, &srd,
- ray_start, ray_normal, false);
+ ray_start, ray_normal, false);
- if (srd.hit)
- {
+ if (srd.hit) {
sd->constant_detail = srd.detail * 100.0f;
}
}
@@ -5359,7 +5358,8 @@ static int sculpt_sample_detail_size_exec(bContext *C, wmOperator *op)
}
-static int sculpt_sample_detail_size_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(e)) {
+static int sculpt_sample_detail_size_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(e))
+{
ScrArea *sa = CTX_wm_area(C);
ED_area_headerprint(sa, "Click on the mesh to set the detail");
WM_cursor_modal_set(CTX_wm_window(C), BC_EYEDROPPER_CURSOR);
@@ -5367,8 +5367,8 @@ static int sculpt_sample_detail_size_invoke(bContext *C, wmOperator *op, const w
return OPERATOR_RUNNING_MODAL;
}
-static int sculpt_sample_detail_size_modal(bContext *C, wmOperator *op, const wmEvent *e) {
-
+static int sculpt_sample_detail_size_modal(bContext *C, wmOperator *op, const wmEvent *e)
+{
switch (e->type) {
case LEFTMOUSE:
if (e->val == KM_PRESS) {
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 81fa2ad62a4..43f60c4b35f 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -1666,23 +1666,23 @@ static void rna_def_fkeyframe(BlenderRNA *brna)
RNA_def_property_enum_items(prop, beztriple_interpolation_easing_items);
RNA_def_property_ui_text(prop, "Easing",
"Which ends of the segment between this and the next keyframe easing "
- "interpolation is applied to");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+ "interpolation is applied to");
+ RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, NULL);
prop = RNA_def_property(srna, "back", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "back");
RNA_def_property_ui_text(prop, "Back", "Amount of overshoot for 'back' easing");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+ RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, NULL);
prop = RNA_def_property(srna, "amplitude", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "amplitude");
RNA_def_property_ui_text(prop, "Amplitude", "Amplitude of bounces for elastic easing");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+ RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, NULL);
prop = RNA_def_property(srna, "period", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "period");
RNA_def_property_ui_text(prop, "Period", "Time between bounces for elastic easing");
- RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
+ RNA_def_property_update(prop, NC_ANIMATION | ND_KEYFRAME_PROP, NULL);
/* Vector values */
prop = RNA_def_property(srna, "handle_left", PROP_FLOAT, PROP_COORDS); /* keyframes are dimensionless */