Skip to content
Snippets Groups Projects
Commit ae93f3ea authored by Campbell Barton's avatar Campbell Barton
Browse files

update for api changes

parent 8c5206e4
Branches
Tags
No related merge requests found
......@@ -1070,8 +1070,8 @@ class Curveaceous_galore(bpy.types.Operator):
##### EXECUTE #####
def execute(self, context):
# turn off undo
undo = bpy.context.user_preferences.edit.global_undo
bpy.context.user_preferences.edit.global_undo = False
undo = bpy.context.user_preferences.edit.use_global_undo
bpy.context.user_preferences.edit.use_global_undo = False
# deal with 2D - 3D curve differences
props = self.properties
......@@ -1090,7 +1090,7 @@ class Curveaceous_galore(bpy.types.Operator):
main(context, props, self.align_matrix)
# restore pre operator undo state
bpy.context.user_preferences.edit.global_undo = undo
bpy.context.user_preferences.edit.use_global_undo = undo
return {'FINISHED'}
......
......@@ -280,8 +280,8 @@ class torus_knot_plus(bpy.types.Operator):
##### EXECUTE #####
def execute(self, context):
# turn off undo
undo = bpy.context.user_preferences.edit.global_undo
bpy.context.user_preferences.edit.global_undo = False
undo = bpy.context.user_preferences.edit.use_global_undo
bpy.context.user_preferences.edit.use_global_undo = False
props = self.properties
......@@ -292,7 +292,7 @@ class torus_knot_plus(bpy.types.Operator):
main(context, props, self.align_matrix)
# restore pre operator undo state
bpy.context.user_preferences.edit.global_undo = undo
bpy.context.user_preferences.edit.use_global_undo = undo
return {'FINISHED'}
......
......@@ -669,8 +669,8 @@ class landscape_add(bpy.types.Operator):
# Execute
def execute(self, context):
# turn off undo
undo = bpy.context.user_preferences.edit.global_undo
bpy.context.user_preferences.edit.global_undo = False
undo = bpy.context.user_preferences.edit.use_global_undo
bpy.context.user_preferences.edit.use_global_undo = False
# deselect all objects
bpy.ops.object.select_all(action='DESELECT')
......@@ -734,7 +734,7 @@ class landscape_add(bpy.types.Operator):
obj = create_mesh_object(context, verts, [], faces, "Landscape", edit, self.align_matrix)
# restore pre operator undo state
bpy.context.user_preferences.edit.global_undo = undo
bpy.context.user_preferences.edit.use_global_undo = undo
return {'FINISHED'}
def invoke(self, context, event):
......
......@@ -741,7 +741,7 @@ class Solids(bpy.types.Operator):
def execute(self,context):
# turn off undo for better performance (3 - 5x faster), also makes sure
# that mesh ops are undoable and entire script acts as one operator
bpy.context.user_preferences.edit.global_undo = False
bpy.context.user_preferences.edit.use_global_undo = False
props = self.properties
......@@ -794,7 +794,7 @@ class Solids(bpy.types.Operator):
bpy.ops.object.mode_set(mode=current_mode)
# turn undo back on
bpy.context.user_preferences.edit.global_undo = True
bpy.context.user_preferences.edit.use_global_undo = True
return {'FINISHED'}
......
......@@ -569,14 +569,14 @@ class CURVE_OT_simplify(bpy.types.Operator):
self.properties.keepShort] #7
bpy.context.user_preferences.edit.global_undo = False
bpy.context.user_preferences.edit.use_global_undo = False
bpy.ops.object.mode_set(mode='OBJECT', toggle=True)
obj = context.active_object
main(context, obj, options)
bpy.context.user_preferences.edit.global_undo = True
bpy.context.user_preferences.edit.use_global_undo = True
#print("-------END-------")
return {'FINISHED'}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment