Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/startup/bl_operators')
-rw-r--r--release/scripts/startup/bl_operators/freestyle.py4
-rw-r--r--release/scripts/startup/bl_operators/object_align.py8
-rw-r--r--release/scripts/startup/bl_operators/wm.py2
3 files changed, 7 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_operators/freestyle.py b/release/scripts/startup/bl_operators/freestyle.py
index 2e46160aeeb..f5da7d45256 100644
--- a/release/scripts/startup/bl_operators/freestyle.py
+++ b/release/scripts/startup/bl_operators/freestyle.py
@@ -78,10 +78,10 @@ class SCENE_OT_freestyle_fill_range_by_selection(bpy.types.Operator):
self.report({'ERROR'}, "Unexpected modifier type: " + m.type)
return {'CANCELLED'}
# Find selected vertices in editmesh
- ob = bpy.context.active_object
+ ob = context.active_object
if ob.type == 'MESH' and ob.mode == 'EDIT' and ob.name != ref.name:
bpy.ops.object.mode_set(mode='OBJECT')
- selected_verts = [v for v in bpy.context.active_object.data.vertices if v.select]
+ selected_verts = [v for v in ob.data.vertices if v.select]
bpy.ops.object.mode_set(mode='EDIT')
# Compute the min/max distance from the reference to mesh vertices
min_dist = sys.float_info.max
diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py
index b7d3866989d..4af0b7f9e15 100644
--- a/release/scripts/startup/bl_operators/object_align.py
+++ b/release/scripts/startup/bl_operators/object_align.py
@@ -65,13 +65,13 @@ def GlobalBB_LQ(bb_world):
return (Vector((left, front, up)), Vector((right, back, down)))
-def GlobalBB_HQ(obj):
+def GlobalBB_HQ(scene, obj):
matrix_world = obj.matrix_world.copy()
# Initialize the variables with the last vertex
- me = obj.to_mesh(scene=bpy.context.scene, apply_modifiers=True, settings='PREVIEW')
+ me = obj.to_mesh(scene=scene, apply_modifiers=True, settings='PREVIEW')
verts = me.vertices
val = matrix_world * verts[-1].co
@@ -154,7 +154,7 @@ def align_objects(context,
for obj, bb_world in objects:
if bb_quality and obj.type == 'MESH':
- GBB = GlobalBB_HQ(obj)
+ GBB = GlobalBB_HQ(scene, obj)
else:
GBB = GlobalBB_LQ(bb_world)
@@ -218,7 +218,7 @@ def align_objects(context,
bb_world = [matrix_world * Vector(v[:]) for v in obj.bound_box]
if bb_quality and obj.type == 'MESH':
- GBB = GlobalBB_HQ(obj)
+ GBB = GlobalBB_HQ(scene, obj)
else:
GBB = GlobalBB_LQ(bb_world)
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 66f202d8c9f..4277ee025e5 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -2215,7 +2215,7 @@ class WM_OT_addon_userpref_show(Operator):
info = addon_utils.module_bl_info(mod)
info["show_expanded"] = True
- bpy.context.user_preferences.active_section = 'ADDONS'
+ context.user_preferences.active_section = 'ADDONS'
context.window_manager.addon_filter = 'All'
context.window_manager.addon_search = info["name"]
bpy.ops.screen.userpref_show('INVOKE_DEFAULT')