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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-01-23 16:42:43 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-01-23 16:48:11 +0300
commitf4e4c11433416d2ee44a2f471af866d0f14a155b (patch)
treeaed4bd6cd197142a669a9ba112e2155c23214dee /mesh_bsurfaces.py
parentcff0be27de179cc6239a8dd3e1e19c8b8c3448dc (diff)
Fix T43387: BSurfaces error disables global undo
Real ugly stupid error... :/
Diffstat (limited to 'mesh_bsurfaces.py')
-rw-r--r--mesh_bsurfaces.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/mesh_bsurfaces.py b/mesh_bsurfaces.py
index c0cb91e5..4c572800 100644
--- a/mesh_bsurfaces.py
+++ b/mesh_bsurfaces.py
@@ -2861,6 +2861,8 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator):
def execute(self, context):
+ self.initial_global_undo_state = bpy.context.user_preferences.edit.use_global_undo
+
bpy.context.user_preferences.edit.use_global_undo = False
if not self.is_fill_faces:
@@ -2935,7 +2937,7 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator):
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
- bpy.context.user_preferences.edit.use_global_undo = self.initial_global_undo_state
+ bpy.context.user_preferences.edit.use_global_undo = self.initial_global_undo_state
return{'FINISHED'}
@@ -3200,6 +3202,8 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator):
bpy.ops.object.editmode_toggle('INVOKE_REGION_WIN')
+ bpy.context.user_preferences.edit.use_global_undo = self.initial_global_undo_state
+
if created_faces_count == 0:
self.report({'WARNING'}, "There aren't any strokes.")
return {"CANCELLED"}
@@ -3207,9 +3211,9 @@ class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator):
return {"FINISHED"}
+ bpy.context.user_preferences.edit.use_global_undo = self.initial_global_undo_state
-
- elif self.strokes_type == "EXTERNAL_NO_CURVE":
+ if self.strokes_type == "EXTERNAL_NO_CURVE":
self.report({'WARNING'}, "The secondary object is not a Curve.")
return{"CANCELLED"}