diff options
author | Campbell Barton <campbell@blender.org> | 2022-09-29 02:46:46 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-09-29 03:11:42 +0300 |
commit | 9cfa8b945a2f24e96005223c4801497191fab281 (patch) | |
tree | 2db7400449534b2c04bfb7c8ded83e0ee635c01c /source | |
parent | c087d09c16c6cc6e575e35a3637e24037617f8ed (diff) |
Cleanup: format
Diffstat (limited to 'source')
7 files changed, 27 insertions, 14 deletions
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c index 3e0708d8b49..060617764f7 100644 --- a/source/blender/draw/intern/draw_manager_data.c +++ b/source/blender/draw/intern/draw_manager_data.c @@ -34,9 +34,9 @@ #include "BLI_hash.h" #include "BLI_link_utils.h" #include "BLI_listbase.h" +#include "BLI_math_bits.h" #include "BLI_memblock.h" #include "BLI_mempool.h" -#include "BLI_math_bits.h" #ifdef DRW_DEBUG_CULLING # include "BLI_math_bits.h" diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index ac77e007081..54810436d20 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -3548,7 +3548,8 @@ static void do_brush_action(Sculpt *sd, SCULPT_bmesh_topology_rake(sd, ob, nodes, totnode, brush->topology_rake_factor); } - if (!SCULPT_tool_can_reuse_cavity_mask(brush->sculpt_tool) || (ss->cache->supports_gravity && sd->gravity_factor > 0.0f)) { + if (!SCULPT_tool_can_reuse_cavity_mask(brush->sculpt_tool) || + (ss->cache->supports_gravity && sd->gravity_factor > 0.0f)) { /* Clear cavity mask cache. */ ss->last_automasking_settings_hash = 0; } diff --git a/source/blender/editors/sculpt_paint/sculpt_automasking.cc b/source/blender/editors/sculpt_paint/sculpt_automasking.cc index 47856c50b57..cb59b591e5c 100644 --- a/source/blender/editors/sculpt_paint/sculpt_automasking.cc +++ b/source/blender/editors/sculpt_paint/sculpt_automasking.cc @@ -141,8 +141,7 @@ static bool SCULPT_automasking_needs_factors_cache(const Sculpt *sd, const Brush return false; } -static float sculpt_cavity_calc_factor(AutomaskingCache *automasking, - float factor) +static float sculpt_cavity_calc_factor(AutomaskingCache *automasking, float factor) { float sign = signf(factor); @@ -323,14 +322,14 @@ int SCULPT_automasking_settings_hash(Object *ob, AutomaskingCache *automasking) if (automasking->settings.flags & BRUSH_AUTOMASKING_CAVITY_ALL) { hash = BLI_hash_int_2d(hash, automasking->settings.cavity_blur_steps); - hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint*>(&automasking->settings.cavity_factor)); + hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint *>(&automasking->settings.cavity_factor)); if (automasking->settings.cavity_curve) { CurveMap *cm = automasking->settings.cavity_curve->cm; for (int i = 0; i < cm->totpoint; i++) { - hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint*>(&cm->curve[i].x)); - hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint*>(&cm->curve[i].y)); + hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint *>(&cm->curve[i].x)); + hash = BLI_hash_int_2d(hash, *reinterpret_cast<uint *>(&cm->curve[i].y)); hash = BLI_hash_int_2d(hash, (uint)cm->curve[i].flag); hash = BLI_hash_int_2d(hash, (uint)cm->curve[i].shorty); } diff --git a/source/blender/editors/sculpt_paint/sculpt_ops.c b/source/blender/editors/sculpt_paint/sculpt_ops.c index d5edd5708ad..965351c76d6 100644 --- a/source/blender/editors/sculpt_paint/sculpt_ops.c +++ b/source/blender/editors/sculpt_paint/sculpt_ops.c @@ -1242,8 +1242,24 @@ static void SCULPT_OT_mask_from_cavity(wmOperatorType *ot) "Use Automask Settings", "Use default settings from Options panel in sculpt mode."); - RNA_def_float(ot->srna, "factor", 0.5f, 0.0f, 5.0f, "Cavity Factor", "The contrast of the cavity mask", 0.0f, 1.0f); - RNA_def_int(ot->srna, "blur_steps", 2, 0, 25, "Cavity Blur", "The number of times the cavity mask is blurred", 0, 25); + RNA_def_float(ot->srna, + "factor", + 0.5f, + 0.0f, + 5.0f, + "Cavity Factor", + "The contrast of the cavity mask", + 0.0f, + 1.0f); + RNA_def_int(ot->srna, + "blur_steps", + 2, + 0, + 25, + "Cavity Blur", + "The number of times the cavity mask is blurred", + 0, + 25); RNA_def_boolean(ot->srna, "use_curve", false, "Use Curve", ""); RNA_def_boolean(ot->srna, "invert", false, "Cavity (Inverted)", ""); diff --git a/source/blender/makesdna/DNA_brush_types.h b/source/blender/makesdna/DNA_brush_types.h index c0beb89392b..a415122579e 100644 --- a/source/blender/makesdna/DNA_brush_types.h +++ b/source/blender/makesdna/DNA_brush_types.h @@ -391,7 +391,7 @@ typedef struct Brush { int automasking_cavity_blur_steps; float automasking_cavity_factor; - + struct CurveMapping *automasking_cavity_curve; } Brush; diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 1bff91ca84e..5962e6cd81d 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -3247,7 +3247,6 @@ static void rna_def_brush(BlenderRNA *brna) RNA_def_property_update(prop, 0, "rna_Brush_update"); } while ((++entry)->identifier); - prop = RNA_def_property(srna, "automasking_cavity_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "automasking_cavity_factor"); RNA_def_property_ui_text(prop, "Cavity Factor", "The contrast of the cavity mask"); diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_control_point_neighbors.cc b/source/blender/nodes/geometry/nodes/node_geo_input_control_point_neighbors.cc index a0f285f0904..7af4b13cd57 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_input_control_point_neighbors.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_input_control_point_neighbors.cc @@ -8,9 +8,7 @@ namespace blender::nodes { - int apply_offset_in_cyclic_range(const IndexRange range, - const int start_index, - const int offset) +int apply_offset_in_cyclic_range(const IndexRange range, const int start_index, const int offset) { BLI_assert(range.contains(start_index)); const int start_in_range = start_index - range.first(); |