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>2010-07-22 15:27:54 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2010-07-22 15:27:54 +0400
commit33cb2f93ff2e02ac45c20e6b4251a48600a83cb0 (patch)
tree998ac717cc43380c6ae2c0c9e19f1d1a2d167c58 /source/blender/editors/sculpt_paint
parentaa2f0b1e429c8de23e8de1423d875ac1b462e516 (diff)
Fix #22661: Multires/Sculpt Segfult
- Show error message in multires modifier if there is no MDISPS layer - Sculpt on basis mesh if there is no the same layer
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 645441e415f..f5e93edb674 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -112,8 +112,14 @@ void ED_sculpt_force_update(bContext *C)
it's the last modifier on the stack and it is not on the first level */
struct MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob)
{
+ Mesh *me= (Mesh*)ob->data;
ModifierData *md, *nmd;
-
+
+ if(!CustomData_get_layer(&me->fdata, CD_MDISPS)) {
+ /* multires can't work without displacement layer */
+ return NULL;
+ }
+
for(md= modifiers_getVirtualModifierList(ob); md; md= md->next) {
if(md->type == eModifierType_Multires) {
MultiresModifierData *mmd= (MultiresModifierData*)md;