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:
@@ -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:
|
||||
|
||||
@@ -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'}
|
||||
|
||||
Reference in New Issue
Block a user