global is python keyword so cant use as operator argument,

also ran operator cheat sheet and made sure no syntax errors.

+ minor pep8 edits.
This commit is contained in:
2011-12-09 10:19:11 +00:00
parent f025b7b511
commit 2827f57f62
3 changed files with 7 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ import bpy
from bpy.types import Operator
from mathutils import Vector
def randomize_selected(seed, delta, loc, rot, scale, scale_even, scale_min):
import random
@@ -44,9 +45,9 @@ def randomize_selected(seed, delta, loc, rot, scale, scale_even, scale_min):
if rot:
vec = rand_vec(rot)
rotation_mode = obj.rotation_mode
if rotation_mode in ('QUATERNION', 'AXIS_ANGLE'):
if rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
obj.rotation_mode = 'XYZ'
if delta:

View File

@@ -457,8 +457,8 @@ class WM_OT_context_cycle_enum(Operator):
class WM_OT_context_cycle_array(Operator):
'''Set a context array value.
Useful for cycling the active mesh edit mode'''
'''Set a context array value. '''
'''Useful for cycling the active mesh edit mode'''
bl_idname = "wm.context_cycle_array"
bl_label = "Context Array Cycle"
bl_options = {'UNDO', 'INTERNAL'}