code cleanup: dont use 'bpy.context' when 'context' is available

This commit is contained in:
Campbell Barton
2013-01-23 07:52:31 +00:00
parent 6b51bb39c8
commit fd35d42bf4
6 changed files with 49 additions and 45 deletions

View File

@@ -72,7 +72,7 @@ class QuickFur(Operator):
)
def execute(self, context):
fake_context = bpy.context.copy()
fake_context = context.copy()
mesh_objects = [obj for obj in context.selected_objects
if obj.type == 'MESH']
@@ -161,7 +161,7 @@ class QuickExplode(Operator):
)
def execute(self, context):
fake_context = bpy.context.copy()
fake_context = context.copy()
obj_act = context.active_object
if obj_act is None or obj_act.type != 'MESH':
@@ -311,7 +311,7 @@ class QuickSmoke(Operator):
)
def execute(self, context):
fake_context = bpy.context.copy()
fake_context = context.copy()
mesh_objects = [obj for obj in context.selected_objects
if obj.type == 'MESH']
min_co = Vector((100000.0, 100000.0, 100000.0))
@@ -432,7 +432,7 @@ class QuickFluid(Operator):
)
def execute(self, context):
fake_context = bpy.context.copy()
fake_context = context.copy()
mesh_objects = [obj for obj in context.selected_objects
if (obj.type == 'MESH' and not 0.0 in obj.dimensions)]
min_co = Vector((100000, 100000, 100000))