diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-14 10:30:55 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-03-14 10:30:55 +0400 |
commit | 38d4848020bc08cc471310c282ac62e54e881fa8 (patch) | |
tree | 6eb423ab1b8f99a0be4d2715e8b5c485f78d2422 /source/blender/modifiers/intern | |
parent | ee9a00948b950f8361ef280b5f88674721a6698f (diff) |
Don't wait for sculpt stroke to create PBVH.
This idea is borrowed from the multires modifier, which already
checked if the object was in sculpt mode and, if so, created the
PBVH. That check is now moved higher up the chain into
mesh_build_data(), so that it occurs for CDDerivedMesh too.
This also replaces an assert in cdDM_getPBVH for tesselated mesh faces
with a call to create them if missing.
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_multires.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 00572eaad86..f983204945a 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -71,8 +71,6 @@ static void copyData(ModifierData *md, ModifierData *target) static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm, int useRenderParams, int isFinalCalc) { - SculptSession *ss= ob->sculpt; - int sculpting= (ob->mode & OB_MODE_SCULPT) && ss; MultiresModifierData *mmd = (MultiresModifierData*)md; DerivedMesh *result; Mesh *me= (Mesh*)ob->data; @@ -94,11 +92,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm, result->release(result); result= cddm; } - else if(sculpting) { - /* would be created on the fly too, just nicer this - * way on first stroke after e.g. switching levels */ - ss->pbvh= result->getPBVH(ob, result); - } return result; } |