Cleanup: Clang format

This commit is contained in:
Pablo Dobarro 2021-01-20 18:51:49 +01:00
parent 30b6d7826d
commit 5631bd4f94
2 changed files with 9 additions and 15 deletions

View File

@ -10557,20 +10557,18 @@ float *SCULPT_geodesic_from_vertex(Object *ob, const int vertex, const float lim
return dists;
}
static int sculpt_reset_brushes_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
LISTBASE_FOREACH (Brush *, br, &bmain->brushes) {
if (br->ob_mode != OB_MODE_SCULPT) {
continue;
}
BKE_brush_sculpt_reset(br);
WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, br);
if (br->ob_mode != OB_MODE_SCULPT) {
continue;
}
BKE_brush_sculpt_reset(br);
WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, br);
}
return OPERATOR_FINISHED;
}
@ -10588,8 +10586,6 @@ static void SCULPT_OT_reset_brushes(struct wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER;
}
void ED_operatortypes_sculpt(void)
{
WM_operatortype_append(SCULPT_OT_brush_stroke);
@ -10629,5 +10625,4 @@ void ED_operatortypes_sculpt(void)
WM_operatortype_append(SCULPT_OT_dyntopo_detail_size_edit);
WM_operatortype_append(SCULPT_OT_mask_init);
WM_operatortype_append(SCULPT_OT_reset_brushes);
}

View File

@ -180,17 +180,16 @@ static float sculpt_expand_gradient_falloff_get(ExpandCache *expand_cache, const
float linear_falloff;
if (expand_cache->invert) {
linear_falloff = (falloff_factor - active_factor) / (loop_len - active_factor);
linear_falloff = (falloff_factor - active_factor) / (loop_len - active_factor);
}
linear_falloff = 1.0f - (falloff_factor / active_factor);
if (!expand_cache->brush_gradient) {
return linear_falloff;
return linear_falloff;
}
return BKE_brush_curve_strength(expand_cache->brush, linear_falloff, 1.0f);
}
static float *sculpt_expand_geodesic_falloff_create(Sculpt *sd, Object *ob, const int vertex)
@ -688,8 +687,8 @@ static void sculpt_expand_cache_free(ExpandCache *expand_cache)
MEM_SAFE_FREE(expand_cache);
}
static void sculpt_expand_restore_original_state(SculptSession *ss, ExpandCache *expand_cache) {
static void sculpt_expand_restore_original_state(SculptSession *ss, ExpandCache *expand_cache)
{
}
static void sculpt_mask_expand_cancel(bContext *C, wmOperator *op)