sync changes from trunk.

This commit is contained in:
Campbell Barton
2012-02-05 07:44:40 +00:00
parent 1d21e2386e
commit d5fcaeb874
5 changed files with 10 additions and 29 deletions

View File

@@ -945,6 +945,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm,
else dvert = NULL;
} else
dvert = NULL;
if(armature_def_nr >= 0 && dvert) {
armature_weight= defvert_find_weight(dvert, armature_def_nr);

View File

@@ -55,7 +55,6 @@
#include "BLI_threads.h"
#include "BLI_linklist.h"
#include "BLI_bpath.h"
#include "BLI_math.h"
#include "BKE_anim.h"
#include "BKE_animsys.h"

View File

@@ -2302,7 +2302,7 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra
if(timescale) {
time= BKE_curframe(scene);
nexttime= BKE_frame_to_ctime(scene, CFRA + 1.0f);
nexttime= BKE_frame_to_ctime(scene, CFRA+1);
*timescale= MAX2(nexttime - time, 0.0f);
}

View File

@@ -588,9 +588,7 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedM
}
//free memory
if(ss_mesh) {
ss_mesh->needsFree = 1;
if(ss_mesh)
ss_mesh->release(ss_mesh);
}
}

View File

@@ -494,7 +494,7 @@ static void free_ss_weights(WeightTable *wtable)
MEM_freeN(wtable->weight_table);
}
static int ss_sync_from_derivedmesh(CCGSubSurf *ss, DerivedMesh *dm,
static void ss_sync_from_derivedmesh(CCGSubSurf *ss, DerivedMesh *dm,
float (*vertexCos)[3], int useFlatSubdiv)
{
float creaseFactor = (float) ccgSubSurf_getSubdivisionLevels(ss);
@@ -567,22 +567,21 @@ static int ss_sync_from_derivedmesh(CCGSubSurf *ss, DerivedMesh *dm,
static int hasGivenError = 0;
if(!hasGivenError) {
printf("Unrecoverable error in SubSurf calculation,"
" mesh is inconsistent.\n");
//XXX error("Unrecoverable error in SubSurf calculation,"
// " mesh is inconsistent.");
hasGivenError = 1;
}
return 0;
return;
}
((int*)ccgSubSurf_getFaceUserData(ss, f))[1] = index ? *index++: i;
((int*)ccgSubSurf_getFaceUserData(ss, f))[1] = (index)? *index++: i;
}
ccgSubSurf_processSync(ss);
BLI_array_free(fVerts);
return 1;
}
/***/
@@ -1103,11 +1102,6 @@ static void ccgDM_copyFinalFaceArray(DerivedMesh *dm, MFace *mface)
edgeSize, gridSize);
mf->v4 = getFaceIndex(ss, f, S, x + 1, y + 0,
edgeSize, gridSize);
if (faceFlags) {
mat_nr = faceFlags[index*2+1];
mf->flag = faceFlags[index*2];
} else mf->flag = flag;
mf->mat_nr = mat_nr;
mf->flag = flag;
@@ -1209,11 +1203,6 @@ static void ccgDM_copyFinalPolyArray(DerivedMesh *dm, MPoly *mface)
for(x = 0; x < gridSize - 1; x++) {
MPoly *mf = &mface[i];
if (faceFlags) {
mat_nr = faceFlags[index*2+1];
mf->flag = faceFlags[index*2];
} else mf->flag = flag;
mf->mat_nr = mat_nr;
mf->flag = flag;
mf->loopstart = k;
@@ -3304,7 +3293,7 @@ struct DerivedMesh *subsurf_make_derived_from_derived(
result->freeSS = 1;
} else {
int useIncremental = 1; //(smd->flags & eSubsurfModifierFlag_Incremental);
int useIncremental = (smd->flags & eSubsurfModifierFlag_Incremental);
int levels= (smd->modifier.scene)? get_render_subsurf_level(&smd->modifier.scene->r, smd->levels): smd->levels;
CCGSubSurf *ss;
@@ -3327,13 +3316,7 @@ struct DerivedMesh *subsurf_make_derived_from_derived(
if(useIncremental && isFinalCalc) {
smd->mCache = ss = _getSubSurf(smd->mCache, levels, useAging|CCG_CALC_NORMALS);
if (!ss_sync_from_derivedmesh(ss, dm, vertCos, useSimple)) {
//ccgSubSurf_free(smd->mCache);
smd->mCache = ss = _getSubSurf(NULL, levels, useAging);
ss_sync_from_derivedmesh(ss, dm, vertCos, useSimple);
}
ss_sync_from_derivedmesh(ss, dm, vertCos, useSimple);
result = getCCGDerivedMesh(smd->mCache,
drawInteriorEdges,