Fix error accessing a named UV layer when baking
authorCampbell Barton <ideasman42@gmail.com>
Sun, 25 Aug 2019 06:40:34 +0000 (16:40 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 25 Aug 2019 06:45:47 +0000 (16:45 +1000)
source/blender/render/intern/source/bake_api.c

index c61c9b4dd7a5588451e6ac1e53d5b5a34c8c7fff..4e5a83555eb7ca8998e8faf0d2d707e42ab7b65e 100644 (file)
@@ -700,7 +700,7 @@ void RE_bake_pixels_populate(Mesh *me,
   }
   else {
     int uv_id = CustomData_get_named_layer(&me->ldata, CD_MLOOPUV, uv_layer);
-    mloopuv = CustomData_get_layer_n(&me->ldata, CD_MTFACE, uv_id);
+    mloopuv = CustomData_get_layer_n(&me->ldata, CD_MLOOPUV, uv_id);
   }
 
   if (mloopuv == NULL) {