Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-01-05 16:40:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-05 16:40:09 +0400
commit7fd67392ebd5061ea1bc695ebd7feabe4755eaac (patch)
tree0614d1a94fb610c0157b8b684d21052d159a0999 /source/blender/modifiers
parent348f116fe574ee38a70e8c9bdff7fc62ad1ec2e8 (diff)
added a function to ensure derived mesh has tessface's, in preparation for removal of tessface recalculation after each modifier runs.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_boolean.c4
-rw-r--r--source/blender/modifiers/intern/MOD_decimate.c2
-rw-r--r--source/blender/modifiers/intern/MOD_explode.c2
-rw-r--r--source/blender/modifiers/intern/MOD_particleinstance.c2
-rw-r--r--source/blender/modifiers/intern/MOD_remesh.c2
-rw-r--r--source/blender/modifiers/intern/MOD_solidify.c1
6 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c
index 9670f661d75..ef8d71928d3 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -137,6 +137,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
result = get_quick_derivedMesh(derivedData, dm, bmd->operation);
if(result == NULL) {
+
+ DM_ensure_tessface(dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
+ DM_ensure_tessface(derivedData); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
+
result = NewBooleanDerivedMesh(dm, bmd->object, derivedData, ob,
1 + bmd->operation);
}
diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c
index d14edd6d428..b481391b8e3 100644
--- a/source/blender/modifiers/intern/MOD_decimate.c
+++ b/source/blender/modifiers/intern/MOD_decimate.c
@@ -81,6 +81,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
int totvert, totface;
int a, numTris;
+ DM_ensure_tessface(dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
+
mvert = dm->getVertArray(dm);
mface = dm->getTessFaceArray(dm);
totvert = dm->getNumVerts(dm);
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c
index 793824c4136..e6e3ef2a0aa 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -983,6 +983,8 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
ExplodeModifierData *emd= (ExplodeModifierData*) md;
ParticleSystemModifierData *psmd=findPrecedingParticlesystem(ob,md);
+ DM_ensure_tessface(dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
+
if(psmd){
ParticleSystem * psys=psmd->psys;
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
index 06bc53b77ee..3f8f44bdfd9 100644
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ b/source/blender/modifiers/intern/MOD_particleinstance.c
@@ -122,6 +122,8 @@ static DerivedMesh * applyModifier(ModifierData *md, Object *ob,
float max_co=0.0, min_co=0.0, temp_co[3], cross[3];
float *size=NULL;
+ DM_ensure_tessface(dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
+
trackneg=((ob->trackflag>2)?1:0);
if(pimd->ob==ob){
diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c
index 8e7c13f16e6..26e7f8fdbb1 100644
--- a/source/blender/modifiers/intern/MOD_remesh.c
+++ b/source/blender/modifiers/intern/MOD_remesh.c
@@ -151,6 +151,8 @@ static DerivedMesh *applyModifier(ModifierData *md,
DualConFlags flags = 0;
DualConMode mode = 0;
+ DM_ensure_tessface(dm); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */
+
rmd = (RemeshModifierData*)md;
init_dualcon_mesh(&input, dm);
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c
index 9be38d64cd9..02fb2f81476 100644
--- a/source/blender/modifiers/intern/MOD_solidify.c
+++ b/source/blender/modifiers/intern/MOD_solidify.c
@@ -725,6 +725,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
/* must recalculate normals with vgroups since they can displace unevenly [#26888] */
if(dvert) {
+ /* BMESH_TODO, we only need to get vertex normals here, this is way overkill */
CDDM_calc_normals(result);
}
else {