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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-10-24 13:35:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-10-24 13:40:05 +0300
commit6e3a9b9313a2dcbd5c8967387de36b4ecd312d3e (patch)
tree9ef26ac2921eaf69fbd749951e5a0704a5d2cef7 /source/blender/modifiers/intern/MOD_subsurf.c
parentf1f0666bfc355fb57ed13c64fe1685664600e583 (diff)
Subsurf: Remove edit mesh modifier callbacks
Those were used for partial updates during edit mode, which will not be possible anymore with OpenSubdiv. Optimization for OpenSubdiv would be to re-use topology refiner if topology does not change. But this is something to be done for both edit and object modes, no need to have separate code paths for those. This commit makes OpenSubdiv to properly work in edit mode.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_subsurf.c')
-rw-r--r--source/blender/modifiers/intern/MOD_subsurf.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c
index 20122eefecc..20e12a7eda5 100644
--- a/source/blender/modifiers/intern/MOD_subsurf.c
+++ b/source/blender/modifiers/intern/MOD_subsurf.c
@@ -139,35 +139,6 @@ applyModifier_DM_wrapper(applyModifier, applyModifier_DM)
#endif
-static DerivedMesh *applyModifierEM_DM(
- ModifierData *md, const ModifierEvalContext *ctx,
- struct BMEditMesh *UNUSED(editData),
- DerivedMesh *derivedData)
-{
- SubsurfModifierData *smd = (SubsurfModifierData *) md;
- struct Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph);
- DerivedMesh *result;
- /* 'orco' using editmode flags would cause cache to be used twice in editbmesh_calc_modifiers */
- SubsurfFlags ss_flags = (ctx->flag & MOD_APPLY_ORCO) ? 0 : (SUBSURF_FOR_EDIT_MODE | SUBSURF_IN_EDIT_MODE);
-
- result = subsurf_make_derived_from_derived(derivedData, smd, scene, NULL, ss_flags);
- return result;
-}
-
-static Mesh *applyModifierEM(
- struct ModifierData *md, const struct ModifierEvalContext *ctx,
- struct BMEditMesh *editData,
- struct Mesh *mesh)
-{
- DerivedMesh *dm = CDDM_from_mesh_ex(mesh, CD_REFERENCE, CD_MASK_EVERYTHING);
- DerivedMesh *ndm = applyModifierEM_DM(md, ctx, editData, dm);
- if (ndm != dm) {
- dm->release(dm);
- }
- DM_to_mesh(ndm, mesh, ctx->object, CD_MASK_EVERYTHING, true);
- return mesh;
-}
-
#ifdef WITH_OPENSUBDIV_MODIFIER
static int subdiv_levels_for_modifier_get(const SubsurfModifierData *smd,
const ModifierEvalContext *ctx)
@@ -307,7 +278,7 @@ ModifierTypeInfo modifierType_Subsurf = {
#else
/* applyModifier */ applyModifier,
#endif
- /* applyModifierEM */ applyModifierEM,
+ /* applyModifierEM */ NULL,
/* initData */ initData,
/* requiredDataMask */ NULL,