Commit: a4c067e234f08952299f787df0cb569ce7463ccd
Author: Campbell Barton
Date:   Tue Jul 14 23:50:52 2015 +1000
Branches: temp-derivedmesh-looptri
https://developer.blender.org/rBa4c067e234f08952299f787df0cb569ce7463ccd

Merge branch 'master' into temp-derivedmesh-looptri

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



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

diff --cc source/blender/blenkernel/intern/cdderivedmesh.c
index f67a019,37c3376..73f3b20
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@@ -479,10 -470,10 +479,10 @@@ static void cdDM_drawFacesTex_common(De
                                       void *userData, DMDrawFlag uvflag)
  {
        CDDerivedMesh *cddm = (CDDerivedMesh *) dm;
 -      const MFace *mf = DM_get_tessface_data_layer(dm, CD_MFACE);
        MTexPoly *mtexpoly = DM_get_poly_data_layer(dm, CD_MTEXPOLY);
 -      MCol *mcol;
 +      const MPoly *mpoly = cddm->mpoly;
 +      MLoopCol *mloopcol;
-       int i, orig;
+       int i;
        int colType, startFace = 0;
        bool use_tface = (uvflag & DM_DRAW_USE_ACTIVE_UV) != 0;
        int tottri;
@@@ -540,14 -537,22 +540,14 @@@
                int flush = 0;
                
                if (i != tottri - 1)
 -                      next_actualFace = dm->drawObject->triangle_to_mface[i + 
1];
 -
 +                      next_actualFace = dm->drawObject->triangle_to_mpoly[i + 
1];
 +              
                if (drawParams) {
 -                      MTexPoly *tp = NULL;
 -                      if (use_tface && mtexpoly && index_mf_to_mpoly) {
 -                              int actualFace_poly = 
index_mf_to_mpoly[actualFace];
 -                              if (actualFace_poly != ORIGINDEX_NONE) {
 -                                      tp = &mtexpoly[actualFace_poly];
 -                              }
 -                      }
 -
 -                      draw_option = drawParams(tp, (mcol != NULL), 
mf[actualFace].mat_nr);
 +                      draw_option = drawParams(use_tface && mtexpoly ? 
&mtexpoly[actualFace] : NULL, (mloopcol != NULL), mpoly[actualFace].mat_nr);
                }
                else {
 -                      if (index_mf_to_mpoly) {
 -                              const int orig = 
DM_origindex_mface_mpoly(index_mf_to_mpoly, index_mp_to_orig, actualFace);
 +                      if (index_mp_to_orig) {
-                               orig = index_mp_to_orig[actualFace];
++                              const int orig = index_mp_to_orig[actualFace];
                                if (orig == ORIGINDEX_NONE) {
                                        /* XXX, this is not really correct
                                                         * it will draw the 
previous faces context for this one when we don't know its settings.

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to