Page Menu
Home
Search
Configure Global Search
Log In
Paste
P1640
Fix sculpt Only Deform
Active
Public
Actions
Authored by
Sergey Sharybin (sergey)
on Sep 17 2020, 4:04 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Tags
None
Subscribers
None
diff --git a/source/blender/blenkernel/intern/crazyspace.c b/source/blender/blenkernel/intern/crazyspace.c
index 01c05c62b70..85b287c3eec 100644
--- a/source/blender/blenkernel/intern/crazyspace.c
+++ b/source/blender/blenkernel/intern/crazyspace.c
@@ -349,9 +349,10 @@ static void crazyspace_init_verts_and_matrices(const Mesh *mesh,
BLI_assert(num_verts == mesh->totvert);
}
-static bool crazyspace_modifier_supports_deform_matrices(ModifierData *md)
+static bool crazyspace_modifier_supports_deform_matrices(ModifierData *md,
+ const bool use_only_deform)
{
- if (ELEM(md->type, eModifierType_Subsurf, eModifierType_Multires)) {
+ if (!use_only_deform && ELEM(md->type, eModifierType_Subsurf, eModifierType_Multires)) {
return true;
}
const ModifierTypeInfo *mti = BKE_modifier_get_info(md->type);
@@ -381,6 +382,7 @@ int BKE_sculpt_get_first_deform_matrices(struct Depsgraph *depsgraph,
const bool is_sculpt_mode = (object->mode & OB_MODE_SCULPT) != 0;
const bool has_multires = mmd != NULL && mmd->sculptlvl > 0;
const ModifierEvalContext mectx = {depsgraph, &object_eval, 0};
+ const bool use_only_deform = (scene->toolsettings->sculpt->flags & SCULPT_ONLY_DEFORM);
if (is_sculpt_mode && has_multires) {
*deformmats = NULL;
@@ -395,7 +397,7 @@ int BKE_sculpt_get_first_deform_matrices(struct Depsgraph *depsgraph,
continue;
}
- if (crazyspace_modifier_supports_deform_matrices(md)) {
+ if (crazyspace_modifier_supports_deform_matrices(md, use_only_deform)) {
const ModifierTypeInfo *mti = BKE_modifier_get_info(md->type);
if (defmats == NULL) {
/* NOTE: Evaluated object si re-set to its original undeformed
Event Timeline
Sergey Sharybin (sergey)
created this paste.
Sep 17 2020, 4:04 PM
Sergey Sharybin (sergey)
created this object with edit policy "Administrators".
Sergey Sharybin (sergey)
mentioned this in
D8921: Fix T80873: Grab active vertex preview not working with shape keys
.
Log In to Comment