Code Cleanup: avoid bpy.context when its passed in as an arg

This commit is contained in:
Campbell Barton 2014-01-17 08:42:07 +11:00
parent 5b1330e99d
commit d9bbcb371a
2 changed files with 3 additions and 3 deletions

View File

@ -878,7 +878,7 @@ class LodGenerate(Operator):
return (context.active_object is not None)
def execute(self, context):
scene = bpy.context.scene
scene = context.scene
ob = scene.objects.active
lod_name = ob.name
@ -903,7 +903,7 @@ class LodGenerate(Operator):
for i in range(1, self.count):
scene.objects.active = ob
bpy.ops.object.duplicate()
lod = bpy.context.selected_objects[0]
lod = context.selected_objects[0]
scene.objects.active = ob
bpy.ops.object.lod_add()

View File

@ -131,7 +131,7 @@ class INFO_MT_file(Menu):
layout.separator()
layout.operator_context = 'EXEC_AREA'
if bpy.data.is_dirty and bpy.context.user_preferences.view.use_quit_dialog:
if bpy.data.is_dirty and context.user_preferences.view.use_quit_dialog:
layout.operator_context = 'INVOKE_SCREEN' # quit dialog
layout.operator("wm.quit_blender", text="Quit", icon='QUIT')