[Bf-blender-cvs] [d827186c17c] master: Fix T52723: Reset UV layers failed

Campbell Barton noreply at git.blender.org
Thu Sep 14 09:36:14 CEST 2017


Commit: d827186c17c98bbde418f134e562a99722a141c5
Author: Campbell Barton
Date:   Thu Sep 14 17:45:17 2017 +1000
Branches: master
https://developer.blender.org/rBd827186c17c98bbde418f134e562a99722a141c5

Fix T52723: Reset UV layers failed

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

M	source/blender/editors/mesh/mesh_data.c
M	source/blender/editors/uvedit/uvedit_ops.c

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

diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 772bb1bd308..3294490d5b1 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -252,7 +252,7 @@ void ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me)
 {
 	/* could be ldata or pdata */
 	CustomData *pdata = GET_CD_DATA(me, pdata);
-	const int layernum = CustomData_get_active_layer_index(pdata, CD_MTEXPOLY);
+	const int layernum = CustomData_get_active_layer(pdata, CD_MTEXPOLY);
 	ED_mesh_uv_loop_reset_ex(me, layernum);
 	
 	WM_event_add_notifier(C, NC_GEOM | ND_DATA, me);
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index d7361f5a259..75294af08f9 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -225,7 +225,7 @@ void ED_uvedit_assign_image(Main *UNUSED(bmain), Scene *scene, Object *obedit, I
 			BM_data_layer_add(em->bm, &em->bm->pdata, CD_MTEXPOLY);
 			BM_data_layer_add(em->bm, &em->bm->ldata, CD_MLOOPUV);
 			/* make UVs all nice 0-1 */
-			ED_mesh_uv_loop_reset_ex(obedit->data, CustomData_get_active_layer_index(&em->bm->pdata, CD_MTEXPOLY));
+			ED_mesh_uv_loop_reset_ex(obedit->data, CustomData_get_active_layer(&em->bm->pdata, CD_MTEXPOLY));
 			update = true;
 		}



More information about the Bf-blender-cvs mailing list