[Bf-blender-cvs] [12eb29fe355] blender2.8: Cleanup: whitespace, duplicate includes

Campbell Barton noreply at git.blender.org
Sun May 20 08:55:22 CEST 2018


Commit: 12eb29fe355bc17dacf094e8e9d6edc1d8b877f0
Author: Campbell Barton
Date:   Sun May 20 08:52:10 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB12eb29fe355bc17dacf094e8e9d6edc1d8b877f0

Cleanup: whitespace, duplicate includes

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

M	source/blender/blenkernel/BKE_studiolight.h
M	source/blender/blenkernel/intern/DerivedMesh.c
M	source/blender/blenkernel/intern/collection.c
M	source/blender/blenkernel/intern/icons.c
M	source/blender/blenkernel/intern/layer.c
M	source/blender/blenkernel/intern/mball.c
M	source/blender/blenkernel/intern/studiolight.c
M	source/blender/blenlib/intern/math_geom.c
M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/depsgraph/intern/builder/deg_builder_relations.h
M	source/blender/draw/engines/workbench/workbench_materials.c
M	source/blender/draw/intern/draw_manager.c
M	source/blender/draw/intern/draw_manager_exec.c
M	source/blender/draw/modes/pose_mode.c
M	source/blender/editors/mesh/editmesh_add_manipulator.c
M	source/blender/editors/mesh/editmesh_intersect.c
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/object/object_edit.c
M	source/blender/editors/space_outliner/outliner_collections.c
M	source/blender/editors/space_outliner/outliner_tree.c
M	source/blender/makesrna/intern/rna_layer.c
M	source/blender/makesrna/intern/rna_scene.c
M	source/blender/makesrna/intern/rna_space.c

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

diff --git a/source/blender/blenkernel/BKE_studiolight.h b/source/blender/blenkernel/BKE_studiolight.h
index 33c2af668b2..863aab37f39 100644
--- a/source/blender/blenkernel/BKE_studiolight.h
+++ b/source/blender/blenkernel/BKE_studiolight.h
@@ -73,7 +73,7 @@ typedef struct StudioLight
 
 void BKE_studiolight_init(void);
 void BKE_studiolight_free(void);
-struct StudioLight *BKE_studiolight_find(const char* name);
+struct StudioLight *BKE_studiolight_find(const char *name);
 struct StudioLight *BKE_studiolight_findindex(int index);
 unsigned int *BKE_studiolight_preview(StudioLight *sl, int icon_size);
 const struct ListBase *BKE_studiolight_listbase(void);
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index bcb45b199d2..602dd4c965b 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -1295,8 +1295,9 @@ static Mesh *create_orco_mesh(Object *ob, Mesh *me, BMEditMesh *em, int layer)
 		mesh = BKE_bmesh_to_mesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
 	}
 	else {
-		BKE_id_copy_ex(NULL, &me->id, (ID**)&mesh,
-			LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
+		BKE_id_copy_ex(
+		        NULL, &me->id, (ID **)&mesh,
+		        LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
 	}
 
 	orco = get_orco_coords_dm(ob, em, layer, &free);
@@ -1984,7 +1985,7 @@ static void mesh_ensure_display_normals(Mesh *mesh)
 	 */
 	/* BLI_assert((CustomData_has_layer(&mesh->pdata, CD_NORMAL) == false)); */
 
-	if(mesh->runtime.cd_dirty_vert & CD_MASK_NORMAL || !CustomData_has_layer(&mesh->pdata, CD_NORMAL)) {
+	if (mesh->runtime.cd_dirty_vert & CD_MASK_NORMAL || !CustomData_has_layer(&mesh->pdata, CD_NORMAL)) {
 		float (*face_nors)[3] = NULL;
 		face_nors = MEM_malloc_arrayN(mesh->totpoly, sizeof(*face_nors), "face_nors");
 
@@ -1993,9 +1994,9 @@ static void mesh_ensure_display_normals(Mesh *mesh)
 
 		/* calculate face normals */
 		BKE_mesh_calc_normals_poly(
-				mesh->mvert, NULL, mesh->totvert, mesh->mloop, mesh->mpoly,
-				mesh->totloop, mesh->totpoly, face_nors,
-				only_face_normals);
+		        mesh->mvert, NULL, mesh->totvert, mesh->mloop, mesh->mpoly,
+		        mesh->totloop, mesh->totpoly, face_nors,
+		        only_face_normals);
 
 		CustomData_add_layer(&mesh->pdata, CD_NORMAL, CD_ASSIGN, face_nors, mesh->totpoly);
 
@@ -2127,8 +2128,9 @@ static void mesh_calc_modifiers(
 		 * coordinates (vpaint, etc.)
 		 */
 		if (r_deform_mesh) {
-			BKE_id_copy_ex(NULL, &me->id, (ID**)r_deform_mesh,
-				LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
+			BKE_id_copy_ex(
+			        NULL, &me->id, (ID **)r_deform_mesh,
+			        LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
 
 			/* XXX: Is build_shapekey_layers ever even true? This should have crashed long ago... */
 			BLI_assert(!build_shapekey_layers);
@@ -2269,8 +2271,9 @@ static void mesh_calc_modifiers(
 				}
 			}
 			else {
-				BKE_id_copy_ex(NULL, &me->id, (ID**)&mesh,
-					LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
+				BKE_id_copy_ex(
+				        NULL, &me->id, (ID **)&mesh,
+				        LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
 				ASSERT_IS_VALID_MESH(mesh);
 
 				// XXX: port to Mesh if build_shapekey_layers can ever be true
@@ -2439,8 +2442,9 @@ static void mesh_calc_modifiers(
 #endif
 	}
 	else {
-		BKE_id_copy_ex(NULL, &me->id, (ID**)&final_mesh,
-			LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
+		BKE_id_copy_ex(
+		        NULL, &me->id, (ID **)&final_mesh,
+		        LIB_ID_CREATE_NO_MAIN | LIB_ID_CREATE_NO_USER_REFCOUNT | LIB_ID_CREATE_NO_DEG_TAG, false);
 
 		//if (build_shapekey_layers) {
 		//	add_shapekey_layers(final_mesh, me, ob);
@@ -2521,11 +2525,12 @@ static void mesh_calc_modifiers_dm(
 {
 	Mesh *deform_mesh = NULL, *final_mesh = NULL;
 
-	mesh_calc_modifiers(depsgraph, scene, ob, inputVertexCos, useRenderParams, useDeform,
-			need_mapping, dataMask, index, useCache, build_shapekey_layers, allow_gpu,
-			(r_deformdm ? &deform_mesh : NULL), &final_mesh);
+	mesh_calc_modifiers(
+	        depsgraph, scene, ob, inputVertexCos, useRenderParams, useDeform,
+	        need_mapping, dataMask, index, useCache, build_shapekey_layers, allow_gpu,
+	        (r_deformdm ? &deform_mesh : NULL), &final_mesh);
 
-	if(deform_mesh) {
+	if (deform_mesh) {
 		*r_deformdm = CDDM_from_mesh_ex(deform_mesh, CD_DUPLICATE);
 		BKE_id_free(NULL, deform_mesh);
 	}
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index 5ba4a1196b8..215477e66cc 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -313,7 +313,8 @@ bool BKE_collection_is_animated(Collection *collection, Object *UNUSED(parent))
  * you can draw everything, leaves tags in objects to signal it needs further updating */
 
 /* note: does not work for derivedmesh and render... it recreates all again in convertblender.c */
-void BKE_collection_handle_recalc_and_update(struct Depsgraph *depsgraph, Scene *scene, Object *UNUSED(parent), Collection *collection)
+void BKE_collection_handle_recalc_and_update(
+        struct Depsgraph *depsgraph, Scene *scene, Object *UNUSED(parent), Collection *collection)
 {
 	/* only do existing tags, as set by regular depsgraph */
 	FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(collection, object)
@@ -323,7 +324,7 @@ void BKE_collection_handle_recalc_and_update(struct Depsgraph *depsgraph, Scene
 		}
 	}
 	FOREACH_COLLECTION_OBJECT_RECURSIVE_END;
-	}
+}
 
 /* **************** Object List Cache *******************/
 
@@ -508,7 +509,7 @@ Collection *BKE_collection_object_find(Main *bmain, Collection *collection, Obje
 		collection = collection->id.next;
 	else
 		collection = bmain->collection.first;
-	
+
 	while (collection) {
 		if (BKE_collection_has_object(collection, ob))
 			return collection;
diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c
index 8476bb6b66d..bfd4e07606f 100644
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@ -806,7 +806,8 @@ struct Icon_Geom *BKE_icon_geom_from_file(const char *filename)
 
 /** \name Studio Light Icon
  * \{ */
-int BKE_icon_ensure_studio_light(struct StudioLight *sl) {
+int BKE_icon_ensure_studio_light(struct StudioLight *sl)
+{
 	int icon_id = get_next_free_id();
 	icon_create(icon_id, ICON_DATA_STUDIOLIGHT, sl);
 	return icon_id;
diff --git a/source/blender/blenkernel/intern/layer.c b/source/blender/blenkernel/intern/layer.c
index 685c007da6b..461d332dcf5 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -349,8 +349,9 @@ static void layer_collections_copy_data(ListBase *layer_collections_dst, const L
 	const LayerCollection *layer_collection_src = layer_collections_src->first;
 
 	while (layer_collection_dst != NULL) {
-		layer_collections_copy_data(&layer_collection_dst->layer_collections,
-									 &layer_collection_src->layer_collections);
+		layer_collections_copy_data(
+		        &layer_collection_dst->layer_collections,
+		        &layer_collection_src->layer_collections);
 
 		layer_collection_dst = layer_collection_dst->next;
 		layer_collection_src = layer_collection_src->next;
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 7fc289f8bf2..2f85bfedcf2 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -317,7 +317,7 @@ bool BKE_mball_is_basis_for(Object *ob1, Object *ob2)
 bool BKE_mball_is_any_selected(const MetaBall *mb)
 {
 	for (const MetaElem *ml = mb->editelems->first; ml != NULL; ml = ml->next) {
-		if(ml->flag & SELECT) {
+		if (ml->flag & SELECT) {
 			return true;
 		}
 	}
@@ -327,7 +327,7 @@ bool BKE_mball_is_any_selected(const MetaBall *mb)
 bool BKE_mball_is_any_unselected(const MetaBall *mb)
 {
 	for (const MetaElem *ml = mb->editelems->first; ml != NULL; ml = ml->next) {
-		if((ml->flag & SELECT) == 0) {
+		if ((ml->flag & SELECT) == 0) {
 			return true;
 		}
 	}
diff --git a/source/blender/blenkernel/intern/studiolight.c b/source/blender/blenkernel/intern/studiolight.c
index baecbd90bc5..7942cbaab71 100644
--- a/source/blender/blenkernel/intern/studiolight.c
+++ b/source/blender/blenkernel/intern/studiolight.c
@@ -83,11 +83,11 @@ static void direction_to_equirectangular(float r[2], const float dir[3])
 
 static void equirectangular_to_direction(float r[3], float u, float v)
 {
-	float phi = (-(M_PI * 2))*u + M_PI;
-	float theta = -M_PI*v + M_PI;
+	float phi = (-(M_PI * 2)) * u + M_PI;
+	float theta = -M_PI * v + M_PI;
 	float sin_theta = sinf(theta);
-	r[0] = sin_theta*cosf(phi);
-	r[1] = sin_theta*sinf(phi);
+	r[0] = sin_theta * cosf(phi);
+	r[1] = sin_theta * sinf(phi);
 	r[2] = cosf(theta);
 }
 
@@ -120,7 +120,7 @@ static void studiolight_calculate_directional_diffuse_light(ImBuf *ibuf, float c
 			add_v3_v3(totcol, col);
 		}
 	}
-	mul_v3_v3fl(color, totcol, 1.0/(steps*steps));
+	mul_v3_v3fl(color, totcol, 1.0 / (steps * steps));
 }
 
 static void studiolight_calculate_diffuse_light(StudioLight *sl)
@@ -138,7 +138,7 @@ static void studiolight_calculate_diffuse_light(StudioLight *sl)
 	copy_v3_fl(sl->diffuse_light[STUDIOLIGHT_Z_NEG], 0.0f);
 
 	if (sl->flag & STUDIOLIGHT_EXTERNAL_FILE) {
-		ImBuf* ibuf = NULL;
+		ImBuf *ibuf = NULL;
 		ibuf = IMB_loadiffname(sl->path, 0, NULL);
 		if (ibuf) {
 			IMB_float_from_rect(ibuf);
@@ -177,7 +177,7 @@ static void studiolight_calculate_light_direction(StudioLight *sl)
 	sl->light_direction[2] = -1.0f;
 
 	if ((sl->flag & STUDIOLIGHT_EXTERNAL_FILE) && (sl->flag & STUDIOLIGHT_ORIENTATION_WORLD)) {
-		ImBuf* ibuf = NULL;
+		ImBuf *ibuf = NULL;
 		ibuf = IMB_loadiffname(sl->path, 0, NULL);
 		if (ibuf) {
 			IMB_float_from_rect(ibuf);
@@ -204,7 +204,7 @@ static void studiolight_calculate_light_directi

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list