diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-01-31 23:02:51 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-01-31 23:02:51 +0300 |
commit | 329e2d8037050e06d16984924a412e8b32ad4351 (patch) | |
tree | f8b38481445cc1492777383f94be74caa3fb29ce /source/blender/blenkernel/BKE_paint.h | |
parent | 55865239a236e5567b78bf95001b0de3ab049717 (diff) |
Todo issue: sculpting on deformed mesh
Used a crazyspace approach (like in edit mode), but only modifiers with
deformMatricies are allowed atm (currently shapekeys and armature modifiers only).
All the rest modifiers had an warning message that they aren't applied because
of sculpt mode. Deformation of multires is also unsupported.
With all this restictions users will always see the actual "layer" (or maybe
mesh state would be more correct word) they are sculpting on.
Internal changes:
- All modifiers could have deformMatricies callback (the same as deformMatriciesEM but
for non-edit mode usage)
- Added function to build crazyspace for sculpting (sculpt_get_deform_matrices), but it
could be generalized for usage in other painting modes (particle edit mode, i.e)
Todo:
- Implement crazyspace correction to support all kinds of deformation modifiers
- Maybe deformation of multires isn't so difficult?
- And maybe we could avoid extra bad-level-stub for ED_sculpt_modifiers_changed
without code duplicating?
Diffstat (limited to 'source/blender/blenkernel/BKE_paint.h')
-rw-r--r-- | source/blender/blenkernel/BKE_paint.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 20742033a2e..2203277b301 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -78,8 +78,11 @@ typedef struct SculptSession { /* PBVH acceleration structure */ struct PBVH *pbvh; - /* Used temporarily per-stroke */ - float *vertexcosnos; + /* Paiting on deformed mesh */ + int modifiers_active; /* object is deformed with some modifiers */ + float (*orig_cos)[3]; /* coords of undeformed mesh */ + float (*deform_cos)[3]; /* coords of deformed mesh but without stroke displacement */ + float (*deform_imats)[3][3]; /* crazyspace deformation matricies */ /* Partial redraw */ int partial_redraw; @@ -95,8 +98,6 @@ typedef struct SculptSession { struct GPUDrawObject *drawobject; - int modifiers_active; - rcti previous_r; } SculptSession; |