diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-08 15:02:29 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-12-08 15:02:29 +0400 |
commit | 36e7a22fcc3c7ad3b66f5798c6c9a3ad9e0972ea (patch) | |
tree | 8b51904eae309efdcac4e80621f5c8d302131586 /source | |
parent | 0feb2acd8a1deeb56c91723f557055ccd579ac0a (diff) |
Disable redo for some vertex group operators to prevent confusing
situation when changing properties in redo panel messes up things.
This should help in cases described in #29527: Vgroup assign, remove and undo
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index b809fd5dbb1..3401157359e 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -2194,7 +2194,10 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot) ot->exec= vertex_group_remove_exec; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + /* redo operator will fail in this case because vertex groups aren't stored + in local edit mode stack and toggling "all" property will lead to + all groups deleted without way to restore them (see [#29527], sergey) */ + ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups"); @@ -2226,7 +2229,10 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot) ot->exec= vertex_group_assign_exec; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + /* redo operator will fail in this case because vertex group assignment + isn't stored in local edit mode stack and toggling "new" property will + lead to creating plenty of new veretx groups (see [#29527], sergey) */ + ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "new", 0, "New", "Assign vertex to new vertex group"); @@ -2265,7 +2271,10 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot) ot->exec= vertex_group_remove_from_exec; /* flags */ - ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; + /* redo operator will fail in this case because vertex groups ssignment + isn't stored in local edit mode stack and toggling "all" property will lead to + removing vertices from all groups (see [#29527], sergey) */ + ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups"); |