diff options
author | Joseph Eagar <joeedh@gmail.com> | 2011-02-27 09:19:40 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2011-02-27 09:19:40 +0300 |
commit | f01261d040be27337db9f9996d648a279c89b7c4 (patch) | |
tree | c448230939b3c90d53ce8852dd00925d6052e3a4 /source/blender/modifiers/intern/MOD_multires.c | |
parent | dcaeda5c4e3a0687251b8511de4f2e8b85ef75c0 (diff) | |
parent | 2198cfdb2deec8b2e85e242c74a032f43d0b26ca (diff) |
merge with/from trunk at r35190
Diffstat (limited to 'source/blender/modifiers/intern/MOD_multires.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_multires.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 699ab44a75c..b61302d118b 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -30,6 +30,11 @@ * */ +/** \file blender/modifiers/intern/MOD_multires.c + * \ingroup modifiers + */ + + #include <stddef.h> #include "BKE_cdderivedmesh.h" @@ -40,6 +45,8 @@ #include "DNA_mesh_types.h" +#include "MOD_util.h" + static void initData(ModifierData *md) { MultiresModifierData *mmd = (MultiresModifierData*)md; @@ -59,6 +66,8 @@ static void copyData(ModifierData *md, ModifierData *target) tmmd->sculptlvl = mmd->sculptlvl; tmmd->renderlvl = mmd->renderlvl; tmmd->totlvl = mmd->totlvl; + tmmd->simple = mmd->simple; + tmmd->flags = mmd->flags; } static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm, @@ -72,9 +81,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm, if(mmd->totlvl) { if(!CustomData_get_layer(&me->ldata, CD_MDISPS)) { - /* multires can't work without displacement layer */ - modifier_setError(md, "Modifier needs mesh with displacement data."); - return dm; + /* multires always needs a displacement layer */ + CustomData_add_layer(&me->fdata, CD_MDISPS, CD_CALLOC, NULL, me->totface); } } @@ -108,6 +116,7 @@ ModifierTypeInfo modifierType_Multires = { /* copyData */ copyData, /* deformVerts */ 0, + /* deformMatrices */ 0, /* deformVertsEM */ 0, /* deformMatricesEM */ 0, /* applyModifier */ applyModifier, @@ -118,6 +127,7 @@ ModifierTypeInfo modifierType_Multires = { /* isDisabled */ 0, /* updateDepgraph */ 0, /* dependsOnTime */ 0, + /* dependsOnNormals */ 0, /* foreachObjectLink */ 0, /* foreachIDLink */ 0, }; |