forked from bartvdbraak/blender
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:
parent
f025b7b511
commit
2827f57f62
@ -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'}
|
||||
|
@ -893,7 +893,7 @@ static int object_delete_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Main *bmain= CTX_data_main(C);
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
const short use_global= RNA_boolean_get(op->ptr, "global");
|
||||
const short use_global= RNA_boolean_get(op->ptr, "use_global");
|
||||
/* int islamp= 0; */ /* UNUSED */
|
||||
|
||||
if(CTX_data_edit_object(C))
|
||||
@ -951,7 +951,7 @@ void OBJECT_OT_delete(wmOperatorType *ot)
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
|
||||
RNA_def_boolean(ot->srna, "global", 0, "Delete Globally", "Remove object from all scenes");
|
||||
RNA_def_boolean(ot->srna, "use_global", 0, "Delete Globally", "Remove object from all scenes");
|
||||
}
|
||||
|
||||
/**************************** Copy Utilities ******************************/
|
||||
|
Loading…
Reference in New Issue
Block a user