diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-21 12:07:17 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-22 12:29:56 +0300 |
commit | 25f1c2b04e0d98587c88c5ea26b59650e5c2e3f7 (patch) | |
tree | c4e038cae798ff9c15fcee4fb54ffbb18295ed63 /add_curve_extra_objects/add_curve_torus_knots.py | |
parent | f24ca278e8f67e8cf3f3635b138089d8e53681af (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 'add_curve_extra_objects/add_curve_torus_knots.py')
-rw-r--r-- | add_curve_extra_objects/add_curve_torus_knots.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/add_curve_extra_objects/add_curve_torus_knots.py b/add_curve_extra_objects/add_curve_torus_knots.py index 8352ecfa..3b2b362c 100644 --- a/add_curve_extra_objects/add_curve_torus_knots.py +++ b/add_curve_extra_objects/add_curve_torus_knots.py @@ -711,16 +711,9 @@ class torus_knot_plus(Operator, AddObjectHelper): # update align matrix self.align_matrix = align_matrix(self, context) - # turn off undo - #undo = bpy.context.preferences.edit.use_global_undo - #bpy.context.preferences.edit.use_global_undo = False - # create the curve create_torus_knot(self, context) - # restore pre operator undo state - #bpy.context.preferences.edit.use_global_undo = undo - return {'FINISHED'} def invoke(self, context, event): @@ -744,4 +737,4 @@ def unregister(): unregister_class(cls) if __name__ == "__main__": - register()
\ No newline at end of file + register() |