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:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-02-12 20:51:02 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2011-02-12 20:51:02 +0300
commitd909e61d99d760e9c5ae0c9e29804ac609bf7b5f (patch)
tree046c921a0670861cd0aca6813700001e052c19f9 /source/blender/editors/sculpt_paint
parent673ac43f2ef06002d67f266ad2066b722654b5fc (diff)
Sculpting on deformed mesh
========================== Removed limitation of armatured-only objects for sculpting -- now all deformation modifiers are allowed in sculpt mode. Use crazyspace corrections like from transformation modules was used to support all deformation modifiers. Internal change: all crazyspace-related functions were noved to crazyspace.c P.S. Brush could make quite unexpected deformation for meshes which are deformed in specified way. Got patch for this and discussing with Brecht if it's really needed or maybe it could be done in better way.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index f109340d827..7e72aad8adb 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -66,6 +66,7 @@
#include "WM_types.h"
#include "ED_screen.h"
#include "ED_view3d.h"
+#include "ED_util.h" /* for crazyspace correction */
#include "paint_intern.h"
#include "sculpt_intern.h"
@@ -169,7 +170,7 @@ int sculpt_modifiers_active(Scene *scene, Object *ob)
if(!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue;
if(md->type==eModifierType_ShapeKey) continue;
- if(mti->type==eModifierTypeType_OnlyDeform && mti->deformMatrices)
+ if(mti->type==eModifierTypeType_OnlyDeform)
return 1;
}
@@ -2642,7 +2643,7 @@ void sculpt_update_mesh_elements(Scene *scene, Object *ob, int need_fmap)
if(ss->kb) ss->orig_cos = key_to_vertcos(ob, ss->kb);
else ss->orig_cos = mesh_getVertexCos(ob->data, NULL);
- sculpt_get_deform_matrices(scene, ob, &ss->deform_imats, &ss->deform_cos);
+ crazyspace_build_sculpt(scene, ob, &ss->deform_imats, &ss->deform_cos);
BLI_pbvh_apply_vertCos(ss->pbvh, ss->deform_cos);
for(a = 0; a < ((Mesh*)ob->data)->totvert; ++a)