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:
authorAndre Susano Pinto <andresusanopinto@gmail.com>2008-08-14 07:05:13 +0400
committerAndre Susano Pinto <andresusanopinto@gmail.com>2008-08-14 07:05:13 +0400
commit8da4ad74e9592cbc1b18838d62046924c5f8442c (patch)
treeae14047e715acc3c1595153ef1708ed536233d84 /source/blender/src/buttons_editing.c
parent89be876f965426a352bb03a7b99660da6d1638ca (diff)
Added subsurface levels option to normal projection.
Now when doing normal projeciton is possible to ask it to project along the normals that the vertex would have if it was subsurfaced... this gives "better" projections on low polys. Point of this commit is to add the feature request from Eclectiel http://blenderartists.org/forum/showpost.php?p=1181531&postcount=9 workflow as Eclectiel wanted is now possible: to archieve a nice low-res retopology that aproximates a high-res mesh when subsurfaced: 1 - make base low-poly retopo 2 - apply a shrinkwrap with projection along normal.. and with SS level = N (where N>0) 3 - add a Subsurface with level N 4 - run bretch's script (ss_fit)
Diffstat (limited to 'source/blender/src/buttons_editing.c')
-rw-r--r--source/blender/src/buttons_editing.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index f7606884f29..8ea6a6c191a 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -1903,7 +1903,10 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco
ShrinkwrapModifierData *smd = (ShrinkwrapModifierData*) md;
height = 86 + 3;
if (smd->shrinkType == MOD_SHRINKWRAP_PROJECT)
+ {
height += 19*5;
+ if(smd->projAxis == 0) height += 19;
+ }
else if (smd->shrinkType == MOD_SHRINKWRAP_NEAREST_SURFACE)
height += 19;
@@ -2556,6 +2559,11 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco
/* UI for projection axis */
uiBlockBeginAlign(block);
uiDefButC(block, ROW, B_MODIFIER_RECALC, "Normal" , lx,(cy-=19),buttonWidth,19, &smd->projAxis, 18.0, MOD_SHRINKWRAP_PROJECT_OVER_NORMAL, 0, 0, "Projection over X axis");
+ if(smd->projAxis == 0)
+ {
+ uiDefButC(block, NUM, B_MODIFIER_RECALC, "SS Levels:", lx, (cy-=19), buttonWidth,19, &smd->subsurfLevels, 0, 6, 0, 0, "This indicates the number of CCSubdivisions that must be performed before extracting vertexs positions and normals");
+ }
+
uiDefButBitC(block, TOG, MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS, B_MODIFIER_RECALC, "X", lx+buttonWidth/3*0,(cy-=19),buttonWidth/3,19, &smd->projAxis, 0, 0, 0, 0, "Projection over X axis");
uiDefButBitC(block, TOG, MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS, B_MODIFIER_RECALC, "Y", lx+buttonWidth/3*1,cy,buttonWidth/3,19, &smd->projAxis, 0, 0, 0, 0, "Projection over Y axis");
uiDefButBitC(block, TOG, MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS, B_MODIFIER_RECALC, "Z", lx+buttonWidth/3*2,cy,buttonWidth/3,19, &smd->projAxis, 0, 0, 0, 0, "Projection over Z axis");