Merge branch 'blender2.7'
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 18 Mar 2019 18:06:21 +0000 (19:06 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Mon, 18 Mar 2019 18:06:21 +0000 (19:06 +0100)
1  2 
intern/cycles/blender/blender_curves.cpp
intern/cycles/render/light.cpp
intern/cycles/render/light.h

@@@ -247,11 -251,11 +247,11 @@@ static bool ObtainCacheParticleUV(Mesh 
                                b_psys.particles.begin(b_pa);
                                for(; pa_no < totparts+totchild; pa_no++) {
                                        /* Add UVs */
 -                                      BL::Mesh::tessface_uv_textures_iterator l;
 -                                      b_mesh->tessface_uv_textures.begin(l);
 +                                      BL::Mesh::uv_layers_iterator l;
 +                                      b_mesh->uv_layers.begin(l);
  
-                                       float3 uv = make_float3(0.0f, 0.0f, 0.0f);
+                                       float2 uv = make_float2(0.0f, 0.0f);
 -                                      if(b_mesh->tessface_uv_textures.length())
 +                                      if(b_mesh->uv_layers.length())
                                                b_psys.uv_on_emitter(psmd, *b_pa, pa_no, uv_num, &uv.x);
                                        CData->curve_uv.push_back_slow(uv);
  
@@@ -764,33 -784,24 +760,21 @@@ static void ExportCurveTriangleUV(Parti
  
        for(int sys = 0; sys < CData->psys_firstcurve.size(); sys++) {
                for(int curve = CData->psys_firstcurve[sys]; curve < CData->psys_firstcurve[sys] + CData->psys_curvenum[sys]; curve++) {
 -                      if(CData->curve_keynum[curve] <= 1 || CData->curve_length[curve] == 0.0f)
 -                              continue;
 -
                        for(int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
-                               const float curve_time = CData->curvekey_time[curvekey];
-                               const float curve_length = CData->curve_length[curve];
-                               time = (curve_length > 0.0f) ? curve_time / curve_length : 0.0f;
                                for(int section = 0; section < resol; section++) {
                                        uvdata[vertexindex] = CData->curve_uv[curve];
-                                       uvdata[vertexindex].z = prevtime;
                                        vertexindex++;
                                        uvdata[vertexindex] = CData->curve_uv[curve];
-                                       uvdata[vertexindex].z = time;
                                        vertexindex++;
                                        uvdata[vertexindex] = CData->curve_uv[curve];
-                                       uvdata[vertexindex].z = prevtime;
                                        vertexindex++;
                                        uvdata[vertexindex] = CData->curve_uv[curve];
-                                       uvdata[vertexindex].z = time;
                                        vertexindex++;
                                        uvdata[vertexindex] = CData->curve_uv[curve];
-                                       uvdata[vertexindex].z = prevtime;
                                        vertexindex++;
                                        uvdata[vertexindex] = CData->curve_uv[curve];
-                                       uvdata[vertexindex].z = time;
                                        vertexindex++;
                                }
-                               prevtime = time;
                        }
                }
        }
Simple merge
Simple merge