Revision: 38316
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38316
Author:   nazgul
Date:     2011-07-11 18:18:42 +0000 (Mon, 11 Jul 2011)
Log Message:
-----------
Merging r38296 through r38315 from trunk into soc-2011-tomato

Revision Links:
--------------
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38296
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38315

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/avi/AVI_avi.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/subsurf_ccg.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_cast.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_displace.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_hook.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_meshdeform.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_simpledeform.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_smooth.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_solidify.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_util.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_util.h
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_warp.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_wave.c

Property Changed:
----------------
    branches/soc-2011-tomato/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:36831-38295
   + /trunk/blender:36831-38315

Modified: branches/soc-2011-tomato/source/blender/avi/AVI_avi.h
===================================================================
--- branches/soc-2011-tomato/source/blender/avi/AVI_avi.h       2011-07-11 
18:16:02 UTC (rev 38315)
+++ branches/soc-2011-tomato/source/blender/avi/AVI_avi.h       2011-07-11 
18:18:42 UTC (rev 38316)
@@ -60,7 +60,7 @@
 
 typedef struct _AviChunk {
   int fcc;
-  int64_t size;
+  int size;
 } AviChunk;
 
 typedef struct _AviList {

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c        
2011-07-11 18:16:02 UTC (rev 38315)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/material.c        
2011-07-11 18:18:42 UTC (rev 38316)
@@ -550,7 +550,7 @@
                                Material **mat;
 
                                if(index + 1 != (*totcol))
-                                       memmove((*matar), (*matar) + 1, 
(*totcol) - (index + 1));
+                                       memmove((*matar), (*matar) + 1, 
sizeof(void *) * ((*totcol) - (index + 1)));
 
                                (*totcol)--;
                                

Modified: 
branches/soc-2011-tomato/source/blender/blenkernel/intern/subsurf_ccg.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/subsurf_ccg.c     
2011-07-11 18:16:02 UTC (rev 38315)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/subsurf_ccg.c     
2011-07-11 18:18:42 UTC (rev 38316)
@@ -1176,7 +1176,8 @@
        CCGSubSurf *ss = ccgdm->ss;
        CCGEdgeIterator *ei = ccgSubSurf_getEdgeIterator(ss);
        CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(ss);
-       int i, edgeSize = ccgSubSurf_getEdgeSize(ss);
+       int i, j, edgeSize = ccgSubSurf_getEdgeSize(ss);
+       int totedge = ccgSubSurf_getNumEdges(ss);
        int gridSize = ccgSubSurf_getGridSize(ss);
        int useAging;
 
@@ -1184,13 +1185,16 @@
 
        ccgSubSurf_getUseAgeCounts(ss, &useAging, NULL, NULL, NULL);
 
-       for (; !ccgEdgeIterator_isStopped(ei); ccgEdgeIterator_next(ei)) {
-               CCGEdge *e = ccgEdgeIterator_getCurrent(ei);
+       for (j=0; j< totedge; j++) {
+               CCGEdge *e = ccgdm->edgeMap[j].edge;
                DMGridData *edgeData = ccgSubSurf_getEdgeDataArray(ss, e);
 
                if (!drawLooseEdges && !ccgSubSurf_getEdgeNumFaces(e))
                        continue;
 
+               if(ccgdm->edgeFlags && !(ccgdm->edgeFlags[j] & ME_EDGEDRAW))
+                       continue;
+
                if (useAging && !(G.f&G_BACKBUFSEL)) {
                        int ageCol = 255-ccgSubSurf_getEdgeAge(ss, e)*4;
                        glColor3ub(0, ageCol>0?ageCol:0, 0);

Modified: branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_cast.c
===================================================================
--- branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_cast.c 
2011-07-11 18:16:02 UTC (rev 38315)
+++ branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_cast.c 
2011-07-11 18:18:42 UTC (rev 38316)
@@ -177,11 +177,8 @@
 
        /* 3) if we were given a vertex group name,
        * only those vertices should be affected */
-       defgrp_index = defgroup_name_index(ob, cmd->defgrp_name);
+       modifier_get_vgroup(ob, dm, cmd->defgrp_name, &dvert, &defgrp_index);
 
-       if ((ob->type == OB_MESH) && dm && defgrp_index >= 0)
-               dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
-
        if(flag & MOD_CAST_SIZE_FROM_RADIUS) {
                len = cmd->radius;
        }
@@ -335,11 +332,8 @@
 
        /* 3) if we were given a vertex group name,
        * only those vertices should be affected */
-       defgrp_index = defgroup_name_index(ob, cmd->defgrp_name);
+       modifier_get_vgroup(ob, dm, cmd->defgrp_name, &dvert, &defgrp_index);
 
-       if ((ob->type == OB_MESH) && dm && defgrp_index >= 0)
-               dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
-
        if (ctrl_ob) {
                if(flag & MOD_CAST_USE_OB_TRANSFORM) {
                        invert_m4_m4(ctrl_ob->imat, ctrl_ob->obmat);

Modified: 
branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_displace.c
===================================================================
--- branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_displace.c     
2011-07-11 18:16:02 UTC (rev 38315)
+++ branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_displace.c     
2011-07-11 18:18:42 UTC (rev 38316)
@@ -169,7 +169,7 @@
 {
        int i;
        MVert *mvert;
-       MDeformVert *dvert = NULL;
+       MDeformVert *dvert;
        int defgrp_index;
        float (*tex_co)[3];
        float weight= 1.0f; /* init value unused but some compilers may 
complain */
@@ -177,11 +177,8 @@
        if(!dmd->texture) return;
        if(dmd->strength == 0.0f) return;
 
-       defgrp_index = defgroup_name_index(ob, dmd->defgrp_name);
-
        mvert = CDDM_get_verts(dm);
-       if(defgrp_index >= 0)
-               dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
+       modifier_get_vgroup(ob, dm, dmd->defgrp_name, &dvert, &defgrp_index);
 
        tex_co = MEM_callocN(sizeof(*tex_co) * numVerts,
                                 "displaceModifier_do tex_co");

Modified: branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_hook.c
===================================================================
--- branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_hook.c 
2011-07-11 18:16:02 UTC (rev 38315)
+++ branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_hook.c 
2011-07-11 18:18:42 UTC (rev 38316)
@@ -157,9 +157,8 @@
        int i, *index_pt;
        const float falloff_squared= hmd->falloff * hmd->falloff; /* for faster 
comparisons */
        
-       int max_dvert= 0;
-       MDeformVert *dvert= NULL;
-       int defgrp_index = -1;
+       MDeformVert *dvert;
+       int defgrp_index, max_dvert;
        
        /* get world-space matrix of target, corrected for the space the verts 
are in */
        if (hmd->subtarget[0] && pchan) {
@@ -174,21 +173,8 @@
        mul_serie_m4(mat, ob->imat, dmat, hmd->parentinv,
                         NULL, NULL, NULL, NULL, NULL);
 
-       if((defgrp_index= defgroup_name_index(ob, hmd->name)) != -1) {
-               Mesh *me = ob->data;
-               if(dm) {
-                       dvert= dm->getVertDataArray(dm, CD_MDEFORMVERT);
-                       if(dvert) {
-                               max_dvert = numVerts;
-                       }
-               }
-               else if(me->dvert) {
-                       dvert= me->dvert;
-                       if(dvert) {
-                               max_dvert = me->totvert;
-                       }
-               }
-       }
+       modifier_get_vgroup(ob, dm, hmd->name, &dvert, &defgrp_index);
+       max_dvert = (dvert)? numVerts: 0;
 
        /* Regarding index range checking below.
         *

Modified: 
branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_meshdeform.c
===================================================================
--- branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_meshdeform.c   
2011-07-11 18:16:02 UTC (rev 38315)
+++ branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_meshdeform.c   
2011-07-11 18:18:42 UTC (rev 38316)
@@ -284,11 +284,8 @@
                        copy_v3_v3(dco[a], co);
        }
 
-       defgrp_index = defgroup_name_index(ob, mmd->defgrp_name);
+       modifier_get_vgroup(ob, dm, mmd->defgrp_name, &dvert, &defgrp_index);
 
-       if(dm && defgrp_index >= 0)
-               dvert= dm->getVertDataArray(dm, CD_MDEFORMVERT);
-
        /* do deformation */
        fac= 1.0f;
 

Modified: 
branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_simpledeform.c
===================================================================
--- branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_simpledeform.c 
2011-07-11 18:16:02 UTC (rev 38315)
+++ branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_simpledeform.c 
2011-07-11 18:18:42 UTC (rev 38316)
@@ -162,8 +162,8 @@
        float smd_limit[2], smd_factor;
        SpaceTransform *transf = NULL, tmp_transf;
        void (*simpleDeform_callback)(const float factor, const float dcut[3], 
float *co) = NULL;       //Mode callback
-       int vgroup = defgroup_name_index(ob, smd->vgroup_name);
-       MDeformVert *dvert = NULL;
+       int vgroup;
+       MDeformVert *dvert;
 
        //Safe-check
        if(smd->origin == ob) smd->origin = NULL;                               
        //No self references
@@ -216,18 +216,8 @@
                smd_factor   = smd->factor / MAX2(FLT_EPSILON, 
smd_limit[1]-smd_limit[0]);
        }
 
+       modifier_get_vgroup(ob, dm, smd->vgroup_name, &dvert, &vgroup);
 
-       if(dm)
-       {
-               dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
-       }
-       else if(ob->type == OB_LATTICE)
-       {
-               dvert = lattice_get_deform_verts(ob);
-       }
-
-
-
        switch(smd->mode)
        {
                case MOD_SIMPLEDEFORM_MODE_TWIST:       simpleDeform_callback = 
simpleDeform_twist;             break;

Modified: branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_smooth.c
===================================================================
--- branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_smooth.c       
2011-07-11 18:16:02 UTC (rev 38315)
+++ branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_smooth.c       
2011-07-11 18:18:42 UTC (rev 38316)
@@ -123,11 +123,8 @@
        medges = dm->getEdgeArray(dm);
        numDMEdges = dm->getNumEdges(dm);
 
-       defgrp_index = defgroup_name_index(ob, smd->defgrp_name);
+       modifier_get_vgroup(ob, dm, smd->defgrp_name, &dvert, &defgrp_index);
 
-       if (defgrp_index >= 0)
-               dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
-
        /* NOTICE: this can be optimized a little bit by moving the
        * if (dvert) out of the loop, if needed */
        for (j = 0; j < smd->repeat; j++) {

Modified: 
branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_solidify.c
===================================================================
--- branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_solidify.c     
2011-07-11 18:16:02 UTC (rev 38315)
+++ branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_solidify.c     
2011-07-11 18:18:42 UTC (rev 38316)
@@ -48,6 +48,7 @@
 
 
 #include "MOD_modifiertypes.h"
+#include "MOD_util.h"
 
 #include "MEM_guardedalloc.h"
 
@@ -235,12 +236,11 @@
        float const ofs_new= smd->offset        - (((-smd->offset_fac + 1.0f) * 
0.5f) * smd->offset);
 
        /* weights */
-       MDeformVert *dvert= NULL, *dv= NULL;
+       MDeformVert *dvert, *dv= NULL;
        const int defgrp_invert = ((smd->flag & MOD_SOLIDIFY_VGROUP_INV) != 0);
-       const int defgrp_index= defgroup_name_index(ob, smd->defgrp_name);
+       int defgrp_index;
 
-       if (defgrp_index >= 0)
-               dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
+       modifier_get_vgroup(ob, dm, smd->defgrp_name, &dvert, &defgrp_index);
 
        orig_mface = dm->getFaceArray(dm);
        orig_medge = dm->getEdgeArray(dm);

Modified: branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_util.c
===================================================================
--- branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_util.c 
2011-07-11 18:16:02 UTC (rev 38315)
+++ branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_util.c 
2011-07-11 18:18:42 UTC (rev 38316)
@@ -37,6 +37,7 @@
 
 #include <string.h>
 
+#include "DNA_lattice_types.h"

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to