forked from bartvdbraak/blender
Cleanup: pep8
This commit is contained in:
parent
b3f4bf87b4
commit
922d72355d
@ -49,6 +49,7 @@ def _workaround_buggy_drivers():
|
|||||||
print("Cycles: OpenGL driver known to be buggy, disabling OpenCL platform.")
|
print("Cycles: OpenGL driver known to be buggy, disabling OpenCL platform.")
|
||||||
_cycles.opencl_disable()
|
_cycles.opencl_disable()
|
||||||
|
|
||||||
|
|
||||||
def init():
|
def init():
|
||||||
import bpy
|
import bpy
|
||||||
import _cycles
|
import _cycles
|
||||||
|
@ -41,7 +41,7 @@ def rna_backup_gen(data, include_props=None, exclude_props=None, root=()):
|
|||||||
# only writable properties...
|
# only writable properties...
|
||||||
for p in data.bl_rna.properties:
|
for p in data.bl_rna.properties:
|
||||||
pid = p.identifier
|
pid = p.identifier
|
||||||
if pid in {'rna_type',}:
|
if pid in {'rna_type', }:
|
||||||
continue
|
continue
|
||||||
path = root + (pid,)
|
path = root + (pid,)
|
||||||
if include_props is not None and path not in include_props:
|
if include_props is not None and path not in include_props:
|
||||||
|
@ -85,6 +85,7 @@ class NodeItemCustom:
|
|||||||
|
|
||||||
_node_categories = {}
|
_node_categories = {}
|
||||||
|
|
||||||
|
|
||||||
def register_node_categories(identifier, cat_list):
|
def register_node_categories(identifier, cat_list):
|
||||||
if identifier in _node_categories:
|
if identifier in _node_categories:
|
||||||
raise KeyError("Node categories list '%s' already registered" % identifier)
|
raise KeyError("Node categories list '%s' already registered" % identifier)
|
||||||
@ -167,6 +168,7 @@ def unregister_node_categories(identifier=None):
|
|||||||
unregister_node_cat_types(cat_types)
|
unregister_node_cat_types(cat_types)
|
||||||
_node_categories.clear()
|
_node_categories.clear()
|
||||||
|
|
||||||
|
|
||||||
def draw_node_categories_menu(self, context):
|
def draw_node_categories_menu(self, context):
|
||||||
for cats in _node_categories.values():
|
for cats in _node_categories.values():
|
||||||
cats[1](self, context)
|
cats[1](self, context)
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
|
||||||
class ProgressReport:
|
class ProgressReport:
|
||||||
"""
|
"""
|
||||||
A basic 'progress report' using either simple prints in console, or WindowManager's 'progress' API.
|
A basic 'progress report' using either simple prints in console, or WindowManager's 'progress' API.
|
||||||
|
@ -28,6 +28,7 @@ from bpy.props import (
|
|||||||
|
|
||||||
# ########## Datablock previews... ##########
|
# ########## Datablock previews... ##########
|
||||||
|
|
||||||
|
|
||||||
class WM_OT_previews_batch_generate(Operator):
|
class WM_OT_previews_batch_generate(Operator):
|
||||||
"""Generate selected .blend file's previews"""
|
"""Generate selected .blend file's previews"""
|
||||||
bl_idname = "wm.previews_batch_generate"
|
bl_idname = "wm.previews_batch_generate"
|
||||||
|
@ -381,7 +381,6 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
|
|||||||
message = "Enable Face Smoothness to use this modifier"
|
message = "Enable Face Smoothness to use this modifier"
|
||||||
self.draw_modifier_box_error(col.box(), modifier, message)
|
self.draw_modifier_box_error(col.box(), modifier, message)
|
||||||
|
|
||||||
|
|
||||||
def draw_alpha_modifier(self, context, modifier):
|
def draw_alpha_modifier(self, context, modifier):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
@ -496,7 +495,6 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
|
|||||||
row.prop(modifier, "angle_min")
|
row.prop(modifier, "angle_min")
|
||||||
row.prop(modifier, "angle_max")
|
row.prop(modifier, "angle_max")
|
||||||
|
|
||||||
|
|
||||||
elif modifier.type == 'CURVATURE_3D':
|
elif modifier.type == 'CURVATURE_3D':
|
||||||
self.draw_modifier_curve_common(box, modifier, False, False)
|
self.draw_modifier_curve_common(box, modifier, False, False)
|
||||||
row = box.row(align=True)
|
row = box.row(align=True)
|
||||||
@ -510,7 +508,6 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
|
|||||||
message = "Enable Face Smoothness to use this modifier"
|
message = "Enable Face Smoothness to use this modifier"
|
||||||
self.draw_modifier_box_error(col.box(), modifier, message)
|
self.draw_modifier_box_error(col.box(), modifier, message)
|
||||||
|
|
||||||
|
|
||||||
def draw_geometry_modifier(self, context, modifier):
|
def draw_geometry_modifier(self, context, modifier):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
@ -611,7 +608,6 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
|
|||||||
elif modifier.type == 'SIMPLIFICATION':
|
elif modifier.type == 'SIMPLIFICATION':
|
||||||
box.prop(modifier, "tolerance")
|
box.prop(modifier, "tolerance")
|
||||||
|
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ class FILEBROWSER_HT_header(Header):
|
|||||||
row.prop(params, "use_filter_folder", text="")
|
row.prop(params, "use_filter_folder", text="")
|
||||||
|
|
||||||
if params.filter_glob:
|
if params.filter_glob:
|
||||||
#if st.active_operator and hasattr(st.active_operator, "filter_glob"):
|
# if st.active_operator and hasattr(st.active_operator, "filter_glob"):
|
||||||
# row.prop(params, "filter_glob", text="")
|
# row.prop(params, "filter_glob", text="")
|
||||||
row.label(params.filter_glob)
|
row.label(params.filter_glob)
|
||||||
else:
|
else:
|
||||||
|
@ -230,7 +230,7 @@ class TIME_MT_autokey(Menu):
|
|||||||
|
|
||||||
def marker_menu_generic(layout):
|
def marker_menu_generic(layout):
|
||||||
|
|
||||||
#layout.operator_context = 'EXEC_REGION_WIN'
|
# layout.operator_context = 'EXEC_REGION_WIN'
|
||||||
|
|
||||||
layout.column()
|
layout.column()
|
||||||
layout.operator("marker.add", "Add Marker")
|
layout.operator("marker.add", "Add Marker")
|
||||||
|
@ -1998,7 +1998,7 @@ class VIEW3D_MT_pose_group(Menu):
|
|||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
|
||||||
#layout.operator_context = 'INVOKE_AREA'
|
# layout.operator_context = 'INVOKE_AREA'
|
||||||
layout.operator("pose.group_unassign")
|
layout.operator("pose.group_unassign")
|
||||||
layout.operator("pose.group_remove")
|
layout.operator("pose.group_remove")
|
||||||
|
|
||||||
@ -3292,7 +3292,7 @@ class VIEW3D_PT_background_image(Panel):
|
|||||||
box.template_image(bg, "image", bg.image_user, compact=True)
|
box.template_image(bg, "image", bg.image_user, compact=True)
|
||||||
has_bg = True
|
has_bg = True
|
||||||
|
|
||||||
if use_multiview and bg.view_axis in {'CAMERA','ALL'}:
|
if use_multiview and bg.view_axis in {'CAMERA', 'ALL'}:
|
||||||
box.prop(bg.image, "use_multiview")
|
box.prop(bg.image, "use_multiview")
|
||||||
|
|
||||||
column = box.column()
|
column = box.column()
|
||||||
|
@ -1552,7 +1552,6 @@ class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel):
|
|||||||
row.prop(sculpt, "lock_y", text="Y", toggle=True)
|
row.prop(sculpt, "lock_y", text="Y", toggle=True)
|
||||||
row.prop(sculpt, "lock_z", text="Z", toggle=True)
|
row.prop(sculpt, "lock_z", text="Z", toggle=True)
|
||||||
|
|
||||||
|
|
||||||
layout.label(text="Tiling:")
|
layout.label(text="Tiling:")
|
||||||
|
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
@ -1562,6 +1561,7 @@ class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel):
|
|||||||
|
|
||||||
layout.column().prop(sculpt, "tile_offset", text="Tile Offset")
|
layout.column().prop(sculpt, "tile_offset", text="Tile Offset")
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_PT_tools_brush_appearance(Panel, View3DPaintPanel):
|
class VIEW3D_PT_tools_brush_appearance(Panel, View3DPaintPanel):
|
||||||
bl_category = "Options"
|
bl_category = "Options"
|
||||||
bl_label = "Appearance"
|
bl_label = "Appearance"
|
||||||
|
Loading…
Reference in New Issue
Block a user