forked from bartvdbraak/blender
Code Cleanup: avoid bpy.context when its passed in as an arg
This commit is contained in:
parent
5b1330e99d
commit
d9bbcb371a
@ -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()
|
||||
|
@ -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')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user