diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-10-16 11:36:01 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-10-16 11:36:01 +0300 |
commit | c2fbe46b0f0fde44b8a40d89601a195da27d28fb (patch) | |
tree | f66e3e50758acb36001e2774c6e4ede5fc8bead6 /source/blender/modifiers/intern | |
parent | 386ba094988fc793f8e060d15438566e5e2d2cae (diff) | |
parent | dcf57e34f3866bba5ddd9cfdfe858a1a5eedc4c2 (diff) |
Merge branch 'master' into temp-gpencil-drw-enginetemp-gpencil-drw-engine
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_multires.c | 20 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_subsurf.c | 19 |
2 files changed, 25 insertions, 14 deletions
diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 53bb579128a..883c17aa1e1 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -228,16 +228,22 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes return result; } -static void deformVerts(ModifierData *md, - const ModifierEvalContext *UNUSED(ctx), - Mesh *mesh, - float (*vertex_cos)[3], - int num_verts) +static void deformMatrices(ModifierData *md, + const ModifierEvalContext *UNUSED(ctx), + Mesh *mesh, + float (*vertex_cos)[3], + float (*deform_matrices)[3][3], + int num_verts) + { #if !defined(WITH_OPENSUBDIV) modifier_setError(md, "Disabled, built without OpenSubdiv"); return; #endif + + /* Subsurf does not require extra space mapping, keep matrices as is. */ + (void)deform_matrices; + MultiresModifierData *mmd = (MultiresModifierData *)md; SubdivSettings subdiv_settings; BKE_multires_subdiv_settings_init(&subdiv_settings, mmd); @@ -268,8 +274,8 @@ ModifierTypeInfo modifierType_Multires = { /* copyData */ copyData, - /* deformVerts */ deformVerts, - /* deformMatrices */ NULL, + /* deformVerts */ NULL, + /* deformMatrices */ deformMatrices, /* deformVertsEM */ NULL, /* deformMatricesEM */ NULL, /* applyModifier */ applyModifier, diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c index 55df1b5ddda..4a5887c3122 100644 --- a/source/blender/modifiers/intern/MOD_subsurf.c +++ b/source/blender/modifiers/intern/MOD_subsurf.c @@ -241,16 +241,21 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes return result; } -static void deformVerts(ModifierData *md, - const ModifierEvalContext *UNUSED(ctx), - Mesh *mesh, - float (*vertex_cos)[3], - int num_verts) +static void deformMatrices(ModifierData *md, + const ModifierEvalContext *UNUSED(ctx), + Mesh *mesh, + float (*vertex_cos)[3], + float (*deform_matrices)[3][3], + int num_verts) { #if !defined(WITH_OPENSUBDIV) modifier_setError(md, "Disabled, built without OpenSubdiv"); return; #endif + + /* Subsurf does not require extra space mapping, keep matrices as is. */ + (void)deform_matrices; + SubsurfModifierData *smd = (SubsurfModifierData *)md; SubdivSettings subdiv_settings; subdiv_settings_init(&subdiv_settings, smd); @@ -281,8 +286,8 @@ ModifierTypeInfo modifierType_Subsurf = { /* copyData */ copyData, - /* deformVerts */ deformVerts, - /* deformMatrices */ NULL, + /* deformVerts */ NULL, + /* deformMatrices */ deformMatrices, /* deformVertsEM */ NULL, /* deformMatricesEM */ NULL, /* applyModifier */ applyModifier, |