[Bf-blender-cvs] [a38313c3bdf] master: Cleanup: style, array wrapping

Campbell Barton noreply at git.blender.org
Sun Mar 24 23:13:29 CET 2019


Commit: a38313c3bdf1a250fb7dc93fefd8f89e81965a1e
Author: Campbell Barton
Date:   Sun Mar 24 16:24:29 2019 +1100
Branches: master
https://developer.blender.org/rBa38313c3bdf1a250fb7dc93fefd8f89e81965a1e

Cleanup: style, array wrapping

Add trailing comma for clang-format.

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

M	source/blender/blenkernel/intern/dynamicpaint.c
M	source/blender/editors/interface/interface_widgets.c
M	source/blender/python/mathutils/mathutils_Matrix.c

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

diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index 1862e284248..aedc301af92 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -98,7 +98,8 @@ static const float gaussianFactors[5] = {
     0.596145f,
     0.596145f,
     0.596145f,
-    0.524141f};
+    0.524141f,
+};
 static const float gaussianTotal = 3.309425f;
 
 /* UV Image neighboring pixel table x and y list */
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index e0b896fd9cf..dce418ab25a 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -4705,11 +4705,7 @@ void ui_draw_pie_center(uiBlock *block)
 		float pie_confirm_radius = U.dpi_fac * (pie_radius_internal + U.pie_menu_confirm);
 		float pie_confirm_external = U.dpi_fac * (pie_radius_internal + U.pie_menu_confirm + 7.0f);
 
-		const char col[4] = {btheme->tui.wcol_pie_menu.text_sel[0],
-		                     btheme->tui.wcol_pie_menu.text_sel[1],
-		                     btheme->tui.wcol_pie_menu.text_sel[2],
-		                     64};
-
+		const char col[4] = {UNPACK3(btheme->tui.wcol_pie_menu.text_sel), 64};
 		draw_disk_shaded(angle - range / 2.0f, range, pie_confirm_radius, pie_confirm_external, subd, col, NULL, false);
 	}
 
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index 354d37500d3..1f2d955c449 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -582,10 +582,12 @@ static PyObject *C_Matrix_Scale(PyObject *cls, PyObject *args)
 	float tvec[3];
 	float factor;
 	int matSize;
-	float mat[16] = {0.0f, 0.0f, 0.0f, 0.0f,
-	                 0.0f, 0.0f, 0.0f, 0.0f,
-	                 0.0f, 0.0f, 0.0f, 0.0f,
-	                 0.0f, 0.0f, 0.0f, 1.0f};
+	float mat[16] = {
+		0.0f, 0.0f, 0.0f, 0.0f,
+		0.0f, 0.0f, 0.0f, 0.0f,
+		0.0f, 0.0f, 0.0f, 0.0f,
+		0.0f, 0.0f, 0.0f, 1.0f,
+	};
 
 	if (!PyArg_ParseTuple(args, "fi|O:Matrix.Scale", &factor, &matSize, &vec)) {
 		return NULL;
@@ -673,10 +675,12 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args)
 
 	int matSize, x;
 	float norm = 0.0f;
-	float mat[16] = {0.0f, 0.0f, 0.0f, 0.0f,
-	                 0.0f, 0.0f, 0.0f, 0.0f,
-	                 0.0f, 0.0f, 0.0f, 0.0f,
-	                 0.0f, 0.0f, 0.0f, 1.0f};
+	float mat[16] = {
+		0.0f, 0.0f, 0.0f, 0.0f,
+		0.0f, 0.0f, 0.0f, 0.0f,
+		0.0f, 0.0f, 0.0f, 0.0f,
+		0.0f, 0.0f, 0.0f, 1.0f,
+	};
 
 	if (!PyArg_ParseTuple(args, "Oi:Matrix.OrthoProjection", &axis, &matSize)) {
 		return NULL;
@@ -794,10 +798,12 @@ static PyObject *C_Matrix_Shear(PyObject *cls, PyObject *args)
 	int matSize;
 	const char *plane;
 	PyObject *fac;
-	float mat[16] = {0.0f, 0.0f, 0.0f, 0.0f,
-	                 0.0f, 0.0f, 0.0f, 0.0f,
-	                 0.0f, 0.0f, 0.0f, 0.0f,
-	                 0.0f, 0.0f, 0.0f, 1.0f};
+	float mat[16] = {
+		0.0f, 0.0f, 0.0f, 0.0f,
+		0.0f, 0.0f, 0.0f, 0.0f,
+		0.0f, 0.0f, 0.0f, 0.0f,
+		0.0f, 0.0f, 0.0f, 1.0f,
+	};
 
 	if (!PyArg_ParseTuple(args, "siO:Matrix.Shear", &plane, &matSize, &fac)) {
 		return NULL;



More information about the Bf-blender-cvs mailing list