[Bf-blender-cvs] [60e4561] temp_custom_loop_normals: Cleanup: arg order (return arg last)

Campbell Barton noreply at git.blender.org
Mon Nov 3 09:46:24 CET 2014


Commit: 60e4561b91e7fd49850fcafc0dfb407afad8829b
Author: Campbell Barton
Date:   Mon Nov 3 09:07:47 2014 +0100
Branches: temp_custom_loop_normals
https://developer.blender.org/rB60e4561b91e7fd49850fcafc0dfb407afad8829b

Cleanup: arg order (return arg last)

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

M	source/blender/blenkernel/BKE_mesh.h
M	source/blender/blenkernel/intern/mesh_evaluate.c
M	source/blender/bmesh/intern/bmesh_mesh.c

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

diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 0c0a45e..0732fa9 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -205,7 +205,7 @@ void BKE_lnor_space_define(
         struct BLI_Stack *edge_vectors);
 void BKE_lnor_space_add_loop(
         MLoopsNorSpaces *lnors_spaces, MLoopNorSpace *lnor_space, const int ml_index, const bool add_to_list);
-void BKE_lnor_space_custom_data_to_normal(MLoopNorSpace *lnor_space, float r_custom_lnor[3], const short clnor_data[2]);
+void BKE_lnor_space_custom_data_to_normal(MLoopNorSpace *lnor_space, const short clnor_data[2], float r_custom_lnor[3]);
 void BKE_lnor_space_custom_normal_to_data(MLoopNorSpace *lnor_space, const float custom_lnor[3], short r_clnor_data[2]);
 
 bool BKE_mesh_has_custom_loop_normals(struct Mesh *me);
diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c
index c10e215..f167a4e 100644
--- a/source/blender/blenkernel/intern/mesh_evaluate.c
+++ b/source/blender/blenkernel/intern/mesh_evaluate.c
@@ -409,7 +409,7 @@ void BKE_lnor_space_add_loop(MLoopsNorSpaces *lnors_spaces, MLoopNorSpace *lnor_
 	}
 }
 
-void BKE_lnor_space_custom_data_to_normal(MLoopNorSpace *lnor_space, float r_custom_lnor[3], const short clnor_data[2])
+void BKE_lnor_space_custom_data_to_normal(MLoopNorSpace *lnor_space, const short clnor_data[2], float r_custom_lnor[3])
 {
 	/* NOP custom normal data or invalid lnor space, return. */
 	if (clnor_data[0] == 0 || lnor_space->ref_alpha == 0.0f || lnor_space->ref_beta == 0.0f) {
@@ -629,7 +629,7 @@ static void split_loop_nor_single_do(LoopSplitTaskDataCommon *common_data, LoopS
 		BKE_lnor_space_add_loop(lnors_spaces, lnor_space, ml_curr_index, false);
 
 		if (clnors_data) {
-			BKE_lnor_space_custom_data_to_normal(lnor_space, *lnor, clnors_data[ml_curr_index]);
+			BKE_lnor_space_custom_data_to_normal(lnor_space, clnors_data[ml_curr_index], *lnor);
 		}
 	}
 }
@@ -847,7 +847,7 @@ static void split_loop_nor_fan_do(LoopSplitTaskDataCommon *common_data, LoopSpli
 				}
 				/* Extra bonus: since smallstack is local to this func, no more need to empty it at all cost! */
 
-				BKE_lnor_space_custom_data_to_normal(lnor_space, lnor, *clnor_ref);
+				BKE_lnor_space_custom_data_to_normal(lnor_space, *clnor_ref, lnor);
 			}
 		}
 
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c
index b3e3a19..fc3f729 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.c
+++ b/source/blender/bmesh/intern/bmesh_mesh.c
@@ -617,7 +617,7 @@ static void bm_mesh_loops_calc_normals(BMesh *bm, const float (*vcos)[3], const
 					if (has_clnors) {
 						short (*clnor)[2] = clnors_data ? &clnors_data[l_curr_index] :
 						                                  BM_ELEM_CD_GET_VOID_P(l_curr, cd_loop_clnors_offset);
-						BKE_lnor_space_custom_data_to_normal(lnor_space, r_lnos[l_curr_index], *clnor);
+						BKE_lnor_space_custom_data_to_normal(lnor_space, *clnor, r_lnos[l_curr_index]);
 					}
 				}
 			}
@@ -782,7 +782,7 @@ static void bm_mesh_loops_calc_normals(BMesh *bm, const float (*vcos)[3], const
 								/* We still have to consume the stack! */
 								while (BLI_SMALLSTACK_POP(clnors));
 							}
-							BKE_lnor_space_custom_data_to_normal(lnor_space, lnor, *clnor_ref);
+							BKE_lnor_space_custom_data_to_normal(lnor_space, *clnor_ref, lnor);
 						}
 					}




More information about the Bf-blender-cvs mailing list