svn merge -r 12496:12607 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorDaniel Genrich <daniel.genrich@gmx.net>
Fri, 16 Nov 2007 14:41:07 +0000 (14:41 +0000)
committerDaniel Genrich <daniel.genrich@gmx.net>
Fri, 16 Nov 2007 14:41:07 +0000 (14:41 +0000)
13 files changed:
1  2 
source/Makefile
source/blender/blenkernel/intern/modifier.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/include/butspace.h
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesdna/DNA_object_force.h
source/blender/src/buttons_editing.c
source/blender/src/buttons_object.c
source/blender/src/editobject.c
source/blender/src/transform_conversions.c
source/blender/src/transform_generics.c
source/blender/src/vpaint.c

diff --cc source/Makefile
Simple merge
index 64849affdbf1cb89f34b1cea8d1e2e630766129c,bf70098c7b57ac2eed143f9af70f1aff1a0ae5c9..271ab64da00d66aa8ac4a4b7519d9c25b3eed9cf
@@@ -787,14 -785,10 +787,15 @@@ static void write_modifiers(WriteData *
                        
                        writedata(wd, DATA, sizeof(int)*hmd->totindex, hmd->indexar);
                }
 +              else if(md->type==eModifierType_Cloth) {
 +                      ClothModifierData *clmd = (ClothModifierData*) md;
 +                      writestruct(wd, DATA, "SimulationSettings", 1, clmd->sim_parms);
 +                      writestruct(wd, DATA, "CollisionSettings", 1, clmd->coll_parms);
 +              } 
                else if (md->type==eModifierType_MeshDeform) {
                        MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
-       
+                       int size = mmd->dyngridsize;
                        writedata(wd, DATA, sizeof(float)*mmd->totvert*mmd->totcagevert,
                                mmd->bindweights);
                        writedata(wd, DATA, sizeof(float)*3*mmd->totcagevert,
Simple merge
index 48069f2d7b70fc2604b48c29643ed61386203631,c55ae752ffbd9d201a75bc9f25f033727faf1431..68290c6e9b5c103c18df78377e774c2440b1de1d
@@@ -383,18 -371,17 +395,27 @@@ typedef struct MeshDeformModifierData 
        short gridsize, needbind;
        short flag, pad;
  
-       int totvert, totcagevert;
+       /* variables filled in when bound */
+       float *bindweights, *bindcos;   /* computed binding weights */
+       int totvert, totcagevert;               /* total vertices in mesh and cage */
+       MDefCell *dyngrid;                              /* grid with dynamic binding cell points */
+       MDefInfluence *dyninfluences;   /* dynamic binding vertex influences */
+       int *dynverts, *pad2;                   /* is this vertex bound or not? */
+       int dyngridsize;                                /* size of the dynamic bind grid */
+       int totinfluence;                               /* total number of vertex influences */
+       float dyncellmin[3];                    /* offset of the dynamic bind grid */
+       float dyncellwidth;                             /* width of dynamic bind cell */
+       float bindmat[4][4];                    /* matrix of cage at binding time */
  } MeshDeformModifierData;
  
 +typedef struct PointCacheModifierData {
 +      ModifierData modifier;
 +      short mode, pad1, pad2, pad3;
 +} PointCacheModifierData;
 +
 +typedef enum {
 +      ePointCache_Read =      (1<<0),
 +                               ePointCache_Write =            (1<<1),
 +} PointCacheFlag;
 +
  #endif
index 3f08c7d5ff91ad398395ca5dc10118359f579253,c6c5668fdbd1438cc29725be463c792b1d2ae46e..25540106356e4728d8b7633bc67bda1a8156d0f2
@@@ -1659,9 -1647,8 +1666,10 @@@ static void draw_modifier(uiBlock *bloc
                } else if (md->type==eModifierType_Array) {
                        height = 211;
                } else if (md->type==eModifierType_MeshDeform) {
-                       height = 73;
+                       MeshDeformModifierData *mmd= (MeshDeformModifierData*)md;
+                       height = (mmd->bindcos)? 73: 93;
 +              } else if (md->type==eModifierType_PointCache) {
 +                      height = 48;
                } 
                
                                                        /* roundbox 4 free variables: corner-rounding, nop, roundbox type, shade */
                                uiButSetFunc(but,modifiers_bindMeshDeform,ob,md);
                        }
                        else {
-                               but= uiDefBut(block, BUT, B_MODIFIER_RECALC, "Bind", lx,(cy-24), buttonWidth/2,19, 0, 0, 0, 0, 0, "Bind mesh to cage");
+                               but= uiDefBut(block, BUT, B_MODIFIER_RECALC, "Bind", lx,(cy-=24), buttonWidth,19, 0, 0, 0, 0, 0, "Bind mesh to cage");
                                uiButSetFunc(but,modifiers_bindMeshDeform,ob,md);
-                               uiDefButS(block, NUM, B_NOP, "Precision:", lx+(buttonWidth+1)/2,(cy-=24), buttonWidth/2,19, &mmd->gridsize, 2, 10, 0.5, 0, "The grid size for binding");
+                               uiDefButS(block, NUM, B_NOP, "Precision:", lx,(cy-19), buttonWidth/2 + 20,19, &mmd->gridsize, 2, 10, 0.5, 0, "The grid size for binding");
+                               uiDefButBitS(block, TOG, MOD_MDEF_DYNAMIC_BIND, B_MODIFIER_RECALC, "Dynamic", lx+(buttonWidth+1)/2 + 20, (cy-=19), buttonWidth/2 - 20,19, &mmd->flag, 0.0, 31.0, 0, 0, "Invert vertex group influence");
                        }
                        uiBlockEndAlign(block);
 +              } else if (md->type==eModifierType_PointCache) {
 +              PointCacheModifierData *pcm = (PointCacheModifierData *) md;
 +              uiBut *but;     
 +              cy -= 20;
 +              uiBlockEndAlign(block);
 +                      
 +              uiDefButS(block, ROW,B_MODIFIER_RECALC,"Write Cache",           lx, cy, 75, 19, &pcm->mode, 12.0, ePointCache_Read, 0, 0, "");
 +              uiDefButS(block, ROW,B_MODIFIER_RECALC,"Read Cache",            lx+75, cy, 75,19, &pcm->mode, 12.0, ePointCache_Write, 0, 0, "");
 +              cy -= 20;                       
 +              but = uiDefBut(block, BUT, B_NOP, "Clear Cache",                        lx, cy, 150,19, 0, 0, 0, 0, 0, "");
 +              uiButSetFunc(but, modifiers_pointCacheClearModifier, ob, md);
 +                      
                }
  
                uiBlockEndAlign(block);
Simple merge
Simple merge
Simple merge