Cleanup: clang format
authorCampbell Barton <ideasman42@gmail.com>
Tue, 28 May 2019 06:11:49 +0000 (16:11 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 28 May 2019 06:11:49 +0000 (16:11 +1000)
source/blender/collada/ArmatureExporter.cpp
source/blender/collada/BCAnimationSampler.cpp
source/blender/collada/BCSampleData.cpp
source/blender/collada/BlenderContext.h
source/blender/collada/TransformWriter.cpp
source/blender/collada/TransformWriter.h
source/blender/collada/collada_utils.h
source/blender/editors/curve/editcurve.c
source/blender/editors/io/io_collada.c
source/blender/editors/object/object_transform.c

index 49d938fc61dc1bfd347fcaf882fdbf24e4386849..f974996191bb80130afa237c44be20b9ab65a0ac 100644 (file)
@@ -291,7 +291,7 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
     }
 
     // OPEN_SIM_COMPATIBILITY
-    
+
     if (export_settings.get_open_sim()) {
       // Remove rotations vs armature from transform
       // parent_rest_rot * mat * irest_rot
@@ -308,10 +308,8 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
         workmat[3][0] = workmat[3][1] = workmat[3][2] = 0.0f;
 
         mul_m4_m4m4(mat, workmat, mat);
-
       }
     }
-    
   }
 
   if (this->export_settings.get_limit_precision()) {
index 7b0c6c41a013aa987ea28cf0eeee0e458f114fad..1e6ff79f132d3375a7ee8102de4b6e5c458a90a9 100644 (file)
@@ -157,7 +157,7 @@ void BCAnimationSampler::update_animation_curves(BCAnimation &animation,
 BCSample &BCAnimationSampler::sample_object(Object *ob, int frame_index, bool for_opensim)
 {
   BCSample &ob_sample = sample_data.add(ob, frame_index);
-  //if (export_settings.get_apply_global_orientation()) {
+  // if (export_settings.get_apply_global_orientation()) {
   //  const BCMatrix &global_transform = export_settings.get_global_transform();
   //  ob_sample.get_matrix(global_transform);
   //}
index cf3668a08af63d08c7b035f39df24cc46b968d80..88a7fd5993c0f22a714b3a59f89ead79e4b8c0c6 100644 (file)
@@ -66,7 +66,7 @@ BCMatrix::BCMatrix(BC_global_forward_axis global_forward_axis, BC_global_up_axis
   mat3_from_axis_conversion(
       BC_DEFAULT_FORWARD, BC_DEFAULT_UP, global_forward_axis, global_up_axis, mrot);
 
-  transpose_m3(mrot); // TODO: Verify that mat3_from_axis_conversion() returns a transposed matrix
+  transpose_m3(mrot);  // TODO: Verify that mat3_from_axis_conversion() returns a transposed matrix
   copy_m4_m3(mat, mrot);
   set_transform(mat);
 }
@@ -98,7 +98,10 @@ void BCMatrix::add_transform(Matrix &to, const Matrix &transform, const Matrix &
   }
 }
 
-void BCMatrix::apply_transform(Matrix &to, const Matrix &transform, const Matrix &from, bool inverse)
+void BCMatrix::apply_transform(Matrix &to,
+                               const Matrix &transform,
+                               const Matrix &from,
+                               bool inverse)
 {
   Matrix globinv;
   invert_m4_m4(globinv, transform);
index da0384eba8b8415a805df2211438531e62926dc1..c23a1b0f3120cc95d5801714f39e308c6942b038 100644 (file)
@@ -107,9 +107,9 @@ class BCMatrix {
                      const Matrix &from,
                      const bool inverted = false);
   void apply_transform(Matrix &to,
-                     const Matrix &transform,
-                     const Matrix &from,
-                     const bool inverted = false);
+                       const Matrix &transform,
+                       const Matrix &from,
+                       const bool inverted = false);
   void add_inverted_transform(Matrix &to, const Matrix &transform, const Matrix &from);
   void add_transform(const Matrix &matrix, const bool inverted = false);
   void add_transform(const BCMatrix &matrix, const bool inverted = false);
index a80d02ab9a309485da2c404e7c4f3723098227c4..560ce8a359f52e1af09ffb879d5a6e48b65b7961 100644 (file)
 #include "TransformWriter.h"
 
 void TransformWriter::add_joint_transform(COLLADASW::Node &node,
-                                         float mat[4][4],
-                                         float parent_mat[4][4],
-                                         BCExportSettings &export_settings,
-                                         bool has_restmat
-       )
+                                          float mat[4][4],
+                                          float parent_mat[4][4],
+                                          BCExportSettings &export_settings,
+                                          bool has_restmat)
 {
   float local[4][4];
 
@@ -106,9 +105,8 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node &node,
   }
 }
 
-void TransformWriter::add_node_transform_identity(
-       COLLADASW::Node &node,
-       BCExportSettings &export_settings)
+void TransformWriter::add_node_transform_identity(COLLADASW::Node &node,
+                                                  BCExportSettings &export_settings)
 {
   BC_export_transformation_type transformation_type =
       export_settings.get_object_transformation_type();
index f0bfbaabbc28f62603c90b380cb027105440e80b..d2e4b369cdc47ce7a6622fb21af4a653b9bb1c20 100644 (file)
 class TransformWriter {
  protected:
   void add_joint_transform(COLLADASW::Node &node,
-                          float mat[4][4],
-                          float parent_mat[4][4],
-                          BCExportSettings &export_settings,
-                          bool has_restmat);
+                           float mat[4][4],
+                           float parent_mat[4][4],
+                           BCExportSettings &export_settings,
+                           bool has_restmat);
 
   void add_node_transform_ob(COLLADASW::Node &node, Object *ob, BCExportSettings &export_settings);
 
index 810b905619369fb723ee205d09019a20fa6e76fc..ca40de6fc1da8e5f488f6167928411fd3321b4ef 100644 (file)
@@ -251,10 +251,10 @@ extern void bc_apply_global_transform(Vector &to_vec,
                                       const BCMatrix &global_transform,
                                       const bool invert = false);
 extern void bc_create_restpose_mat(BCExportSettings &export_settings,
-                                          Bone *bone,
-                                          float to_mat[4][4],
-                                          float from_mat[4][4],
-                                          bool use_local_space);
+                                   Bone *bone,
+                                   float to_mat[4][4],
+                                   float from_mat[4][4],
+                                   bool use_local_space);
 
 class ColladaBaseNodes {
  private:
index 5dbc2dd74eb4116c453c4188e84de78d21cd9b95..8d131ee28baa884eed7176d5270ce5d7a2684cde 100644 (file)
@@ -3307,7 +3307,8 @@ static int reveal_exec(bContext *C, wmOperator *op)
     }
 
     if (changed) {
-      DEG_id_tag_update(obedit->data, ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT | ID_RECALC_GEOMETRY);
+      DEG_id_tag_update(obedit->data,
+                        ID_RECALC_COPY_ON_WRITE | ID_RECALC_SELECT | ID_RECALC_GEOMETRY);
       WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
       changed_multi = true;
     }
index c5c24051299314b810134a84d3d04fc2caed2cf5..1f844961d192592490e7a70eb189270d9a488209 100644 (file)
@@ -172,10 +172,10 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
   use_blender_profile = RNA_boolean_get(op->ptr, "use_blender_profile");
   sort_by_name = RNA_boolean_get(op->ptr, "sort_by_name");
 
-  export_object_transformation_type = RNA_enum_get(
-    op->ptr, "export_object_transformation_type_selection");
+  export_object_transformation_type = RNA_enum_get(op->ptr,
+                                                   "export_object_transformation_type_selection");
   export_animation_transformation_type = RNA_enum_get(
-    op->ptr, "export_animation_transformation_type_selection");
+      op->ptr, "export_animation_transformation_type_selection");
 
   open_sim = RNA_boolean_get(op->ptr, "open_sim");
   limit_precision = RNA_boolean_get(op->ptr, "limit_precision");
@@ -271,11 +271,11 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
   bool include_animations = RNA_boolean_get(imfptr, "include_animations");
   int ui_section = RNA_enum_get(imfptr, "prop_bc_export_ui_section");
 
-  BC_export_animation_type animation_type = RNA_enum_get(
-    imfptr, "export_animation_type_selection");
+  BC_export_animation_type animation_type = RNA_enum_get(imfptr,
+                                                         "export_animation_type_selection");
 
   BC_export_transformation_type animation_transformation_type = RNA_enum_get(
-    imfptr, "export_animation_transformation_type_selection");
+      imfptr, "export_animation_transformation_type_selection");
 
   bool sampling = animation_type == BC_ANIMATION_EXPORT_SAMPLES;
 
@@ -727,7 +727,7 @@ void WM_OT_collada_export(wmOperatorType *ot)
               INT_MAX,
               "Transform",
               "Transformation type for translation, scale and rotation\n"
-              "Note: The Animation transformation type in the Anim Tab\n"\
+              "Note: The Animation transformation type in the Anim Tab\n"
               "is always equal to the Object transformation type in the Geom tab",
               INT_MIN,
               INT_MAX);
index 61cdf68904405de9b6c718b35d5c954baf05bfe0..00f5dffb3cc7b45798f40eb662947fed84757954 100644 (file)
@@ -1336,8 +1336,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
       DEG_id_tag_update(&tob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
     }
     /* special support for dupligroups */
-    else if (tob->instance_collection &&
-             tob->instance_collection->id.tag & LIB_TAG_DOIT) {
+    else if (tob->instance_collection && tob->instance_collection->id.tag & LIB_TAG_DOIT) {
       DEG_id_tag_update(&tob->id, ID_RECALC_TRANSFORM);
       DEG_id_tag_update(&tob->instance_collection->id, ID_RECALC_COPY_ON_WRITE);
     }