diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-08 12:17:34 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-06-08 12:17:34 +0400 |
commit | 87211a49ab1c249d5c885706ba9130ed3bd0e0b4 (patch) | |
tree | 1e7d2da418d98749206f64b44d2c0c1a4c35e68e /source/blender/editors | |
parent | 54297c8d133d2e144685c1820d7fbd2e01c8fe51 (diff) |
Fix #31743: Applying Smooth modifier to a curve crashes Blender
Actually there were two different issues involved here:
- Recently enabled Smooth modifier wasn't actually designed for curves, so
it in fact requires a bit bigger work to make it working.
For now added check for object's typy in this modifier and if it's not
mesh, it wouldn't try to use edges.
The reason why it worked in 3d viewport is that creating DM from curve while
displist is still ocntrcuting for would result in empty CDDM and that leads to
not taking edges into account, only vertexCos passed to modifier would be used.
This makes it behaving a bit differently from if it was a mesh, but still gives
quite reasonable result. Would leave actual fix for a guy who enabled smooth
modifier.
- Another issue is related on ensuring sculpt mask layer after applying modifier.
This shall happen only for meshes.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 7dd17e59f6f..d6b5fb9fc10 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -642,8 +642,10 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi BLI_remlink(&ob->modifiers, md); modifier_free(md); - /* ensure mesh paint mask layer remains after applying */ - ED_sculpt_mask_layers_ensure(ob, NULL); + if (ob->type == OB_MESH) { + /* ensure mesh paint mask layer remains after applying */ + ED_sculpt_mask_layers_ensure(ob, NULL); + } return 1; } |