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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-18 14:37:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-18 14:37:49 +0400
commit76f28921dc9757da9ba04b195dd66acda2e4acf2 (patch)
tree0a0306dc0664f52fd864ef929e73205d9e7ceead /source/blender/modifiers
parent181f3670c904efe662444d0e542ea8234f7571a9 (diff)
add option for screw modifier to smooth shade. (renamed smooth_shading to use_smooth_shade for remesh modifier too)
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_screw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index 6a57cd82b50..f45cc9c2ade 100644
--- a/source/blender/modifiers/intern/MOD_screw.c
+++ b/source/blender/modifiers/intern/MOD_screw.c
@@ -111,7 +111,7 @@ static void initData(ModifierData *md)
ltmd->ob_axis = NULL;
ltmd->angle = M_PI * 2.0;
ltmd->axis = 2;
- ltmd->flag = 0;
+ ltmd->flag = MOD_SCREW_SMOOTH_SHADING;
ltmd->steps = 16;
ltmd->render_steps = 16;
ltmd->iter = 1;
@@ -175,6 +175,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
ScrewVertConnect *vc, *vc_tmp, *vert_connect = NULL;
+ const char mpoly_flag = (ltmd->flag & MOD_SCREW_SMOOTH_SHADING) ? ME_SMOOTH : 0;
+
/* don't do anything? */
if (!totvert)
return CDDM_from_template(dm, 0, 0, 0, 0, 0);
@@ -810,7 +812,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
mp_new->loopstart = mpoly_index * 4;
mp_new->totloop = 4;
- mp_new->flag = ME_SMOOTH;
+ mp_new->flag = mpoly_flag;
origindex[mpoly_index] = ORIGINDEX_NONE;
mp_new++;
ml_new += 4;