diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-05-19 15:24:56 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-05-19 15:24:56 +0400 |
commit | ae0c552bd1d7edc83b6790e54ac682ec7c2a07cd (patch) | |
tree | c9f05e57ef73cc26fbba9f53d483b8c5d601f910 /source/blender/modifiers | |
parent | 3aaa03e1f8a1cfa62758aa983d5c0b304128e546 (diff) |
Fix crash when accessing mesh from python while a mesh with a subsurf modifier
is in editmode.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_subsurf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c index fc9958b08d0..e3e09f660aa 100644 --- a/source/blender/modifiers/intern/MOD_subsurf.c +++ b/source/blender/modifiers/intern/MOD_subsurf.c @@ -91,7 +91,7 @@ static int isDisabled(ModifierData *md, int useRenderParams) return get_render_subsurf_level(&md->scene->r, levels) == 0; } -static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), +static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData, int useRenderParams, int isFinalCalc) @@ -100,7 +100,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), DerivedMesh *result; result = subsurf_make_derived_from_derived(derivedData, smd, - useRenderParams, NULL, isFinalCalc, 0); + useRenderParams, NULL, isFinalCalc, 0, (ob->flag & OB_MODE_EDIT)); if(useRenderParams || !isFinalCalc) { DerivedMesh *cddm= CDDM_copy(result); @@ -111,7 +111,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), return result; } -static DerivedMesh *applyModifierEM(ModifierData *md, Object *UNUSED(ob), +static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob, struct EditMesh *UNUSED(editData), DerivedMesh *derivedData) { @@ -119,7 +119,7 @@ static DerivedMesh *applyModifierEM(ModifierData *md, Object *UNUSED(ob), DerivedMesh *result; result = subsurf_make_derived_from_derived(derivedData, smd, 0, - NULL, 0, 1); + NULL, 0, 1, 1); return result; } |