ran through pep8 checker
This commit is contained in:
@@ -23,6 +23,7 @@ import bpy
|
||||
from bpy.props import *
|
||||
from rna_prop_ui import rna_idprop_ui_prop_get, rna_idprop_ui_prop_clear
|
||||
|
||||
|
||||
class MESH_OT_delete_edgeloop(bpy.types.Operator):
|
||||
'''Delete an edge loop by merging the faces on each side to a single face loop'''
|
||||
bl_idname = "mesh.delete_edgeloop"
|
||||
@@ -86,7 +87,7 @@ class WM_OT_context_set_boolean(bpy.types.Operator):
|
||||
execute = execute_context_assign
|
||||
|
||||
|
||||
class WM_OT_context_set_int(bpy.types.Operator): # same as enum
|
||||
class WM_OT_context_set_int(bpy.types.Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_int"
|
||||
bl_label = "Context Set"
|
||||
@@ -99,7 +100,7 @@ class WM_OT_context_set_int(bpy.types.Operator): # same as enum
|
||||
execute = execute_context_assign
|
||||
|
||||
|
||||
class WM_OT_context_scale_int(bpy.types.Operator): # same as enum
|
||||
class WM_OT_context_scale_int(bpy.types.Operator):
|
||||
'''Scale an int context value.'''
|
||||
bl_idname = "wm.context_scale_int"
|
||||
bl_label = "Context Set"
|
||||
@@ -118,7 +119,7 @@ class WM_OT_context_scale_int(bpy.types.Operator): # same as enum
|
||||
value = self.properties.value
|
||||
data_path = self.properties.data_path
|
||||
|
||||
if value == 1.0: # nothing to do
|
||||
if value == 1.0: # nothing to do
|
||||
return {'CANCELLED'}
|
||||
|
||||
if getattr(self.properties, "always_step", False):
|
||||
@@ -135,7 +136,7 @@ class WM_OT_context_scale_int(bpy.types.Operator): # same as enum
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
class WM_OT_context_set_float(bpy.types.Operator): # same as enum
|
||||
class WM_OT_context_set_float(bpy.types.Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_float"
|
||||
bl_label = "Context Set Float"
|
||||
@@ -149,7 +150,7 @@ class WM_OT_context_set_float(bpy.types.Operator): # same as enum
|
||||
execute = execute_context_assign
|
||||
|
||||
|
||||
class WM_OT_context_set_string(bpy.types.Operator): # same as enum
|
||||
class WM_OT_context_set_string(bpy.types.Operator): # same as enum
|
||||
'''Set a context value.'''
|
||||
bl_idname = "wm.context_set_string"
|
||||
bl_label = "Context Set String"
|
||||
@@ -314,7 +315,7 @@ class WM_OT_context_cycle_enum(bpy.types.Operator):
|
||||
if orig_index == 0:
|
||||
advance_enum = enums[-1]
|
||||
else:
|
||||
advance_enum = enums[orig_index-1]
|
||||
advance_enum = enums[orig_index - 1]
|
||||
else:
|
||||
if orig_index == len(enums) - 1:
|
||||
advance_enum = enums[0]
|
||||
@@ -545,9 +546,9 @@ class WM_OT_doc_view(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
id_split = self.properties.doc_id.split('.')
|
||||
if len(id_split) == 1: # rna, class
|
||||
if len(id_split) == 1: # rna, class
|
||||
url = '%s/bpy.types.%s.html' % (self._prefix, id_split[0])
|
||||
elif len(id_split) == 2: # rna, class.prop
|
||||
elif len(id_split) == 2: # rna, class.prop
|
||||
class_name, class_prop = id_split
|
||||
|
||||
if hasattr(bpy.types, class_name.upper() + '_OT_' + class_prop):
|
||||
@@ -687,7 +688,6 @@ class WM_OT_properties_edit(bpy.types.Operator):
|
||||
# print(exec_str)
|
||||
exec(exec_str)
|
||||
|
||||
|
||||
# Reassign
|
||||
exec_str = "item['%s'] = %s" % (prop, repr(value_eval))
|
||||
# print(exec_str)
|
||||
@@ -714,7 +714,7 @@ class WM_OT_properties_edit(bpy.types.Operator):
|
||||
item = eval("context.%s" % self.properties.data_path)
|
||||
|
||||
# setup defaults
|
||||
prop_ui = rna_idprop_ui_prop_get(item, self.properties.property, False) # dont create
|
||||
prop_ui = rna_idprop_ui_prop_get(item, self.properties.property, False) # dont create
|
||||
if prop_ui:
|
||||
self.properties.min = prop_ui.get("min", -1000000000)
|
||||
self.properties.max = prop_ui.get("max", 1000000000)
|
||||
@@ -767,6 +767,7 @@ class WM_OT_properties_remove(bpy.types.Operator):
|
||||
del item[self.properties.property]
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user