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:
authorJacques Lucke <jacques@blender.org>2021-03-03 14:17:16 +0300
committerJacques Lucke <jacques@blender.org>2021-03-03 14:17:16 +0300
commite9c50913f83373e7679b2877a86c043e3bd89cd1 (patch)
tree6907db19e6c2acbef581ab7a09b81c1cf6564282 /source/blender/editors/sculpt_paint/sculpt_expand.c
parentb9ee8777525d12942c6c7b3adbd5a087699a6186 (diff)
Cleanup: clang tidy
Warning: else-after-return/break
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_expand.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_expand.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c
index 53f2821eb76..2d1d973221a 100644
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@ -1471,9 +1471,7 @@ static int sculpt_expand_target_vertex_update_and_get(bContext *C,
if (SCULPT_cursor_geometry_info_update(C, &sgi, mouse, false)) {
return SCULPT_active_vertex_get(ss);
}
- else {
- return SCULPT_EXPAND_VERTEX_NONE;
- }
+ return SCULPT_EXPAND_VERTEX_NONE;
}
/**
@@ -1768,20 +1766,18 @@ static int sculpt_expand_modal(bContext *C, wmOperator *op, const wmEvent *event
expand_cache->move_original_falloff_type);
break;
}
+ expand_cache->move = true;
+ expand_cache->move_original_falloff_type = expand_cache->falloff_type;
+ copy_v2_v2(expand_cache->initial_mouse_move, mouse);
+ copy_v2_v2(expand_cache->original_mouse_move, expand_cache->initial_mouse);
+ if (expand_cache->falloff_type == SCULPT_EXPAND_FALLOFF_GEODESIC &&
+ SCULPT_vertex_count_get(ss) > expand_cache->max_geodesic_move_preview) {
+ /* Set to spherical falloff for preview in high poly meshes as it is the fastest one.
+ * In most cases it should match closely the preview from geodesic. */
+ expand_cache->move_preview_falloff_type = SCULPT_EXPAND_FALLOFF_SPHERICAL;
+ }
else {
- expand_cache->move = true;
- expand_cache->move_original_falloff_type = expand_cache->falloff_type;
- copy_v2_v2(expand_cache->initial_mouse_move, mouse);
- copy_v2_v2(expand_cache->original_mouse_move, expand_cache->initial_mouse);
- if (expand_cache->falloff_type == SCULPT_EXPAND_FALLOFF_GEODESIC &&
- SCULPT_vertex_count_get(ss) > expand_cache->max_geodesic_move_preview) {
- /* Set to spherical falloff for preview in high poly meshes as it is the fastest one.
- * In most cases it should match closely the preview from geodesic. */
- expand_cache->move_preview_falloff_type = SCULPT_EXPAND_FALLOFF_SPHERICAL;
- }
- else {
- expand_cache->move_preview_falloff_type = expand_cache->falloff_type;
- }
+ expand_cache->move_preview_falloff_type = expand_cache->falloff_type;
}
break;
}