Merge branch 'blender2.7'
authorStefan Werner <stefan.werner@tangent-animation.com>
Tue, 5 Mar 2019 14:06:09 +0000 (15:06 +0100)
committerStefan Werner <stefan.werner@tangent-animation.com>
Tue, 5 Mar 2019 14:06:09 +0000 (15:06 +0100)
1  2 
intern/cycles/blender/blender_mesh.cpp
intern/cycles/render/mesh.cpp
intern/cycles/render/nodes.cpp
intern/cycles/render/scene.cpp
intern/cycles/render/scene.h

@@@ -434,15 -493,33 +434,15 @@@ static void attr_create_uv_map(Scene *s
                                                                       ATTR_ELEMENT_CORNER);
                                }
  
 -                              BL::MeshTextureFaceLayer::data_iterator t;
 +                              BL::Mesh::loop_triangles_iterator t;
-                               float3 *fdata = uv_attr->data_float3();
+                               float2 *fdata = uv_attr->data_float2();
 -                              size_t i = 0;
 -
 -                              for(l->data.begin(t); t != l->data.end(); ++t, ++i) {
 -                                      int tri_a[3], tri_b[3];
 -                                      face_split_tri_indices(face_flags[i], tri_a, tri_b);
 -
 -                                      float2 uvs[4];
 -                                      uvs[0] = get_float2(t->uv1());
 -                                      uvs[1] = get_float2(t->uv2());
 -                                      uvs[2] = get_float2(t->uv3());
 -                                      if(nverts[i] == 4) {
 -                                              uvs[3] = get_float2(t->uv4());
 -                                      }
  
 -                                      fdata[0] = uvs[tri_a[0]];
 -                                      fdata[1] = uvs[tri_a[1]];
 -                                      fdata[2] = uvs[tri_a[2]];
 +                              for(b_mesh.loop_triangles.begin(t); t != b_mesh.loop_triangles.end(); ++t) {
 +                                      int3 li = get_int3(t->loops());
-                                       fdata[0] = get_float3(l->data[li[0]].uv());
-                                       fdata[1] = get_float3(l->data[li[1]].uv());
-                                       fdata[2] = get_float3(l->data[li[2]].uv());
++                                      fdata[0] = get_float2(l->data[li[0]].uv());
++                                      fdata[1] = get_float2(l->data[li[1]].uv());
++                                      fdata[2] = get_float2(l->data[li[2]].uv());
                                        fdata += 3;
 -
 -                                      if(nverts[i] == 4) {
 -                                              fdata[0] = uvs[tri_b[0]];
 -                                              fdata[1] = uvs[tri_b[1]];
 -                                              fdata[2] = uvs[tri_b[2]];
 -                                              fdata += 3;
 -                                      }
                                }
                        }
  
Simple merge
Simple merge
Simple merge
Simple merge