Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-21 12:07:17 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-22 12:29:56 +0300
commit25f1c2b04e0d98587c88c5ea26b59650e5c2e3f7 (patch)
treec4e038cae798ff9c15fcee4fb54ffbb18295ed63 /io_scene_ms3d/ms3d_utils.py
parentf24ca278e8f67e8cf3f3635b138089d8e53681af (diff)
Add-ons: remove temporary disabling of use_global_undo
This can cause bugs where if the operator throws an exception, undo is not properly enabled again. There have been maybe a dozen Blender bug reports related to this. This could get worse now that we are autosaving preferences. Some add-ons guard against this, but turning off undo should not be needed in the first place. If the operator is set to do an undo push, any operators it calls will automatically not do any undo pushes. If this fail in some cases, it should be reported as a bug in Blender. I could not find issues or a performance impact testing a few add-ons though. Differential Revision: https://developer.blender.org/D4908
Diffstat (limited to 'io_scene_ms3d/ms3d_utils.py')
-rw-r--r--io_scene_ms3d/ms3d_utils.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/io_scene_ms3d/ms3d_utils.py b/io_scene_ms3d/ms3d_utils.py
index 330c53bb..943d8708 100644
--- a/io_scene_ms3d/ms3d_utils.py
+++ b/io_scene_ms3d/ms3d_utils.py
@@ -97,11 +97,6 @@ def select_all(select):
###############################################################################
def pre_setup_environment(porter, blender_context):
- # inject undo to porter
- # and turn off undo
- porter.undo = blender_context.preferences.edit.use_global_undo
- blender_context.preferences.edit.use_global_undo = False
-
# inject active_object to self
porter.active_object = blender_context.view_layer.objects.active
@@ -125,9 +120,6 @@ def post_setup_environment(porter, blender_context):
blender_context.view_layer.objects.active \
= blender_context.selected_objects[0]
- # restore pre operator undo state
- blender_context.preferences.edit.use_global_undo = porter.undo
-
###############################################################################
def get_edge_split_modifier_add_if(blender_mesh_object):