diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2011-07-31 06:03:28 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2011-07-31 06:03:28 +0400 |
commit | cae05598b1d10a70a0e37f28b6e49a5b5715a30f (patch) | |
tree | da1209caf4f9caf1e55beca38d260bd77dfedead /source/blender/modifiers | |
parent | 601eb684208eb3f5e8025b81be30817b87daeb98 (diff) |
Added DNA and RNA for skin modifier, stubbed in skin modifier functions
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/modifiers/MOD_modifiertypes.h | 1 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_skin.c | 88 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_util.c | 1 |
4 files changed, 91 insertions, 0 deletions
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt index d1f153265ac..7db03f48631 100644 --- a/source/blender/modifiers/CMakeLists.txt +++ b/source/blender/modifiers/CMakeLists.txt @@ -70,6 +70,7 @@ set(SRC intern/MOD_shapekey.c intern/MOD_shrinkwrap.c intern/MOD_simpledeform.c + intern/MOD_skin.c intern/MOD_smoke.c intern/MOD_smooth.c intern/MOD_softbody.c diff --git a/source/blender/modifiers/MOD_modifiertypes.h b/source/blender/modifiers/MOD_modifiertypes.h index 4e44a226c64..329037ee210 100644 --- a/source/blender/modifiers/MOD_modifiertypes.h +++ b/source/blender/modifiers/MOD_modifiertypes.h @@ -72,6 +72,7 @@ extern ModifierTypeInfo modifierType_ShapeKey; extern ModifierTypeInfo modifierType_Solidify; extern ModifierTypeInfo modifierType_Screw; extern ModifierTypeInfo modifierType_Warp; +extern ModifierTypeInfo modifierType_Skin; /* MOD_util.c */ void modifier_type_init(ModifierTypeInfo *types[]); diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c new file mode 100644 index 00000000000..adc47f32c9c --- /dev/null +++ b/source/blender/modifiers/intern/MOD_skin.c @@ -0,0 +1,88 @@ +/* +* $Id$ +* +* ***** BEGIN GPL LICENSE BLOCK ***** +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License +* as published by the Free Software Foundation; either version 2 +* of the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software Foundation, +* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +* +* ***** END GPL LICENSE BLOCK ***** +* +*/ + +/** \file blender/modifiers/intern/MOD_skin.c + * \ingroup modifiers + */ + + +#include <stddef.h> + +#include "BKE_cdderivedmesh.h" +#include "BKE_modifier.h" + +#include "DNA_mesh_types.h" +#include "DNA_object_types.h" + +#include "MOD_util.h" + +static void initData(ModifierData *md) +{ + SkinModifierData *smd = (SkinModifierData*)md; + + smd->threshold = 0; + smd->subdiv = 1; + smd->flag = MOD_SKIN_DRAW_NODES; +} + +static void copyData(ModifierData *md, ModifierData *target) +{ + SkinModifierData *smd = (SkinModifierData*) md; + SkinModifierData *tsmd = (SkinModifierData*) target; + + tsmd->threshold = smd->threshold; + tsmd->subdiv = smd->subdiv; + tsmd->flag = smd->flag; +} + +static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm, + int useRenderParams, int isFinalCalc) +{ + return dm; +} + + +ModifierTypeInfo modifierType_Skin = { + /* name */ "Skin", + /* structName */ "SkinModifierData", + /* structSize */ sizeof(SkinModifierData), + /* type */ eModifierTypeType_Constructive, + /* flags */ eModifierTypeFlag_AcceptsMesh, + + /* copyData */ copyData, + /* deformVerts */ NULL, + /* deformMatrices */ NULL, + /* deformVertsEM */ NULL, + /* deformMatricesEM */ NULL, + /* applyModifier */ applyModifier, + /* applyModifierEM */ NULL, + /* initData */ initData, + /* requiredDataMask */ NULL, + /* freeData */ NULL, + /* isDisabled */ NULL, + /* updateDepgraph */ NULL, + /* dependsOnTime */ NULL, + /* dependsOnNormals */ NULL, + /* foreachObjectLink */ NULL, + /* foreachIDLink */ NULL, +}; diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index e9b835eab81..e823a347ced 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -295,5 +295,6 @@ void modifier_type_init(ModifierTypeInfo *types[]) INIT_TYPE(Solidify); INIT_TYPE(Screw); INIT_TYPE(Warp); + INIT_TYPE(Skin); #undef INIT_TYPE } |