[Bf-blender-cvs] [f737a254ebe] temp-T96710-pbvh-pixels: Cleanup: clang-format

Campbell Barton noreply at git.blender.org
Fri Apr 8 11:07:46 CEST 2022


Commit: f737a254ebe1b35d30fa0908002fd9838dcf9319
Author: Campbell Barton
Date:   Thu Apr 7 14:34:51 2022 +1000
Branches: temp-T96710-pbvh-pixels
https://developer.blender.org/rBf737a254ebe1b35d30fa0908002fd9838dcf9319

Cleanup: clang-format

===================================================================

M	intern/cycles/hydra/camera.cpp
M	intern/cycles/hydra/node_util.cpp
M	intern/cycles/scene/geometry.cpp
M	source/blender/blenkernel/intern/curve_eval.cc
M	source/blender/blenkernel/intern/paint.c
M	source/blender/bmesh/operators/bmo_utils.c
M	source/blender/draw/engines/overlay/overlay_armature.c
M	source/blender/editors/io/io_usd.c
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/sculpt_paint/sculpt_paint_color.c
M	source/blender/makesrna/intern/rna_attribute.c
M	source/blender/sequencer/intern/animation.c

===================================================================

diff --git a/intern/cycles/hydra/camera.cpp b/intern/cycles/hydra/camera.cpp
index 5d961a6a090..c746a107899 100644
--- a/intern/cycles/hydra/camera.cpp
+++ b/intern/cycles/hydra/camera.cpp
@@ -88,9 +88,9 @@ void HdCyclesCamera::Sync(HdSceneDelegate *sceneDelegate,
     if (!value.IsEmpty()) {
       _projectionMatrix = value.Get<GfMatrix4d>();
       const float focalLength = _data.GetFocalLength();  // Get default focal length
-#if PXR_VERSION >= 2102
+#  if PXR_VERSION >= 2102
       _data.SetFromViewAndProjectionMatrix(GetViewMatrix(), _projectionMatrix, focalLength);
-#else
+#  else
       if (_projectionMatrix[2][3] < -0.5) {
         _data.SetProjection(GfCamera::Perspective);
 
@@ -120,7 +120,7 @@ void HdCyclesCamera::Sync(HdSceneDelegate *sceneDelegate,
         _data.SetClippingRange(
             GfRange1f(nearPlusFarHalf + nearMinusFarHalf, nearPlusFarHalf - nearMinusFarHalf));
       }
-#endif
+#  endif
     }
   }
 #endif
@@ -150,9 +150,8 @@ void HdCyclesCamera::Sync(HdSceneDelegate *sceneDelegate,
 #else
     value = sceneDelegate->GetCameraParamValue(id, _tokens->projection);
     if (!value.IsEmpty()) {
-      _data.SetProjection(value.Get<TfToken>() != _tokens->orthographic ?
-                              GfCamera::Perspective :
-                              GfCamera::Orthographic);
+      _data.SetProjection(value.Get<TfToken>() != _tokens->orthographic ? GfCamera::Perspective :
+                                                                          GfCamera::Orthographic);
     }
 #endif
 
diff --git a/intern/cycles/hydra/node_util.cpp b/intern/cycles/hydra/node_util.cpp
index bdf5786ed75..2fc16bba731 100644
--- a/intern/cycles/hydra/node_util.cpp
+++ b/intern/cycles/hydra/node_util.cpp
@@ -273,7 +273,8 @@ template<typename MatrixArray> array<Transform> convertToCyclesTransformArray(co
   array<Transform> cyclesArray;
   cyclesArray.reserve(valueData.size());
   for (const auto &element : valueData) {
-    cyclesArray.push_back_reserved(convertMatrixToCycles<typename MatrixArray::value_type>(element));
+    cyclesArray.push_back_reserved(
+        convertMatrixToCycles<typename MatrixArray::value_type>(element));
   }
   return cyclesArray;
 }
diff --git a/intern/cycles/scene/geometry.cpp b/intern/cycles/scene/geometry.cpp
index 8152a27046f..351ec4f09ae 100644
--- a/intern/cycles/scene/geometry.cpp
+++ b/intern/cycles/scene/geometry.cpp
@@ -179,8 +179,12 @@ bool Geometry::has_true_displacement() const
   return false;
 }
 
-void Geometry::compute_bvh(
-    Device *device, DeviceScene *dscene, SceneParams *params, Progress *progress, size_t n, size_t total)
+void Geometry::compute_bvh(Device *device,
+                           DeviceScene *dscene,
+                           SceneParams *params,
+                           Progress *progress,
+                           size_t n,
+                           size_t total)
 {
   if (progress->get_cancel())
     return;
diff --git a/source/blender/blenkernel/intern/curve_eval.cc b/source/blender/blenkernel/intern/curve_eval.cc
index c41fdabf8f8..122df12261c 100644
--- a/source/blender/blenkernel/intern/curve_eval.cc
+++ b/source/blender/blenkernel/intern/curve_eval.cc
@@ -383,7 +383,7 @@ std::unique_ptr<CurveEval> curves_to_curve_eval(const Curves &curves)
       curves.geometry);
 
   VArray<int> resolution = geometry.resolution();
-  
+
   VArray_Span<float> nurbs_weights{
       src_component.attribute_get_for_read<float>("nurbs_weight", ATTR_DOMAIN_POINT, 0.0f)};
   VArray_Span<int> nurbs_orders{
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 80c3ead3039..8e87f6ea243 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -1836,7 +1836,7 @@ void BKE_sculpt_color_layer_create_if_needed(struct Object *object)
 
   CustomData_add_layer(&orig_me->vdata, CD_PROP_COLOR, CD_DEFAULT, NULL, orig_me->totvert);
   CustomDataLayer *layer = orig_me->vdata.layers +
-                        CustomData_get_layer_index(&orig_me->vdata, CD_PROP_COLOR);
+                           CustomData_get_layer_index(&orig_me->vdata, CD_PROP_COLOR);
 
   BKE_mesh_update_customdata_pointers(orig_me, true);
 
diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c
index 60a893ab5da..309ef2cf21e 100644
--- a/source/blender/bmesh/operators/bmo_utils.c
+++ b/source/blender/bmesh/operators/bmo_utils.c
@@ -564,7 +564,8 @@ static void bmo_get_loop_color_ref(BMesh *bm,
 {
   Mesh me_query;
 
-  BKE_id_attribute_copy_domains_temp(ID_ME, &bm->vdata, NULL, &bm->ldata, NULL, NULL, &me_query.id);
+  BKE_id_attribute_copy_domains_temp(
+      ID_ME, &bm->vdata, NULL, &bm->ldata, NULL, NULL, &me_query.id);
 
   CustomDataLayer *layer = BKE_id_attribute_from_index(
       &me_query.id, index, ATTR_DOMAIN_MASK_COLOR, CD_MASK_COLOR_ALL);
diff --git a/source/blender/draw/engines/overlay/overlay_armature.c b/source/blender/draw/engines/overlay/overlay_armature.c
index 473fadab5ed..741259a95b2 100644
--- a/source/blender/draw/engines/overlay/overlay_armature.c
+++ b/source/blender/draw/engines/overlay/overlay_armature.c
@@ -798,7 +798,8 @@ static void drw_shgroup_bone_ik_no_target_lines(ArmatureDrawContext *ctx,
                                                 const float start[3],
                                                 const float end[3])
 {
-  drw_shgroup_bone_relationship_lines_ex(ctx, start, end, G_draw.block.color_bone_ik_line_no_target);
+  drw_shgroup_bone_relationship_lines_ex(
+      ctx, start, end, G_draw.block.color_bone_ik_line_no_target);
 }
 
 static void drw_shgroup_bone_ik_spline_lines(ArmatureDrawContext *ctx,
diff --git a/source/blender/editors/io/io_usd.c b/source/blender/editors/io/io_usd.c
index 51181f7caaa..bff1bdd0ed8 100644
--- a/source/blender/editors/io/io_usd.c
+++ b/source/blender/editors/io/io_usd.c
@@ -524,7 +524,8 @@ void WM_OT_usd_import(struct wmOperatorType *ot)
 
   RNA_def_boolean(ot->srna, "read_mesh_uvs", true, "UV Coordinates", "Read mesh UV coordinates");
 
-  RNA_def_boolean(ot->srna, "read_mesh_colors", false, "Color Attributes", "Read mesh color attributes");
+  RNA_def_boolean(
+      ot->srna, "read_mesh_colors", false, "Color Attributes", "Read mesh color attributes");
 
   RNA_def_string(ot->srna,
                  "prim_path_mask",
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 5a0a2b7a09a..cafcc4ec578 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -3153,8 +3153,10 @@ static int edbm_reverse_colors_exec(bContext *C, wmOperator *op)
 
     BMOperator bmop;
 
-    int color_index = BKE_id_attribute_to_index(&me->id, layer, ATTR_DOMAIN_MASK_COLOR, CD_MASK_COLOR_ALL);
-    EDBM_op_init(em, &bmop, op, "reverse_colors faces=%hf color_index=%i", BM_ELEM_SELECT, color_index);
+    int color_index = BKE_id_attribute_to_index(
+        &me->id, layer, ATTR_DOMAIN_MASK_COLOR, CD_MASK_COLOR_ALL);
+    EDBM_op_init(
+        em, &bmop, op, "reverse_colors faces=%hf color_index=%i", BM_ELEM_SELECT, color_index);
 
     BMO_op_exec(em->bm, &bmop);
 
diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_color.c b/source/blender/editors/sculpt_paint/sculpt_paint_color.c
index 5a5232843a6..d712f08b5ad 100644
--- a/source/blender/editors/sculpt_paint/sculpt_paint_color.c
+++ b/source/blender/editors/sculpt_paint/sculpt_paint_color.c
@@ -158,7 +158,7 @@ static void do_paint_brush_task_cb_ex(void *__restrict userdata,
     float noise = 1.0f;
     const float density = ss->cache->paint_brush.density;
     if (density < 1.0f) {
-      const float hash_noise = (float) BLI_hash_int_01(ss->cache->density_seed * 1000 * vd.index);
+      const float hash_noise = (float)BLI_hash_int_01(ss->cache->density_seed * 1000 * vd.index);
       if (hash_noise > density) {
         noise = density * hash_noise;
         fade = fade * noise;
@@ -257,7 +257,7 @@ void SCULPT_do_paint_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
 
   if (SCULPT_stroke_is_first_brush_step_of_symmetry_pass(ss->cache)) {
     if (SCULPT_stroke_is_first_brush_step(ss->cache)) {
-      ss->cache->density_seed = (float) BLI_hash_int_01(ss->cache->location[0] * 1000);
+      ss->cache->density_seed = (float)BLI_hash_int_01(ss->cache->location[0] * 1000);
     }
     return;
   }
diff --git a/source/blender/makesrna/intern/rna_attribute.c b/source/blender/makesrna/intern/rna_attribute.c
index 01266a26104..b11250cf891 100644
--- a/source/blender/makesrna/intern/rna_attribute.c
+++ b/source/blender/makesrna/intern/rna_attribute.c
@@ -526,7 +526,9 @@ static void rna_AttributeGroup_active_color_index_range(
   *softmax = *max;
 }
 
-static void rna_AttributeGroup_update_active_color(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
+static void rna_AttributeGroup_update_active_color(Main *UNUSED(bmain),
+                                                   Scene *UNUSED(scene),
+                                                   PointerRNA *ptr)
 {
   ID *id = ptr->owner_id;
 
diff --git a/source/blender/sequencer/intern/animation.c b/source/blender/sequencer/intern/animation.c
index b970038eeed..b8b2dda4690 100644
--- a/source/blender/sequencer/intern/animation.c
+++ b/source/blender/sequencer/intern/animation.c
@@ -141,7 +141,7 @@ void SEQ_animation_duplicate(Scene *scene, Sequence *seq, ListBase *list)
   }
 
   if (seq->type == SEQ_TYPE_META) {
-    LISTBASE_FOREACH (Sequence*, meta_child, &seq->seqbase){
+    LISTBASE_FOREACH (Sequence *, meta_child, &seq->seqbase) {
       SEQ_animation_duplicate(scene, meta_child, list);
     }
   }



More information about the Bf-blender-cvs mailing list