Cleanup: pep8
This commit is contained in:
@@ -22,6 +22,7 @@ from bpy_extras.asset_utils import (
|
|||||||
SpaceAssetInfo,
|
SpaceAssetInfo,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class ASSET_OT_tag_add(bpy.types.Operator):
|
class ASSET_OT_tag_add(bpy.types.Operator):
|
||||||
"""Add a new keyword tag to the active asset"""
|
"""Add a new keyword tag to the active asset"""
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
|
|
||||||
|
|
||||||
def geometry_node_group_empty_new(context):
|
def geometry_node_group_empty_new(context):
|
||||||
group = bpy.data.node_groups.new("Geometry Nodes", 'GeometryNodeTree')
|
group = bpy.data.node_groups.new("Geometry Nodes", 'GeometryNodeTree')
|
||||||
group.inputs.new('NodeSocketGeometry', "Geometry")
|
group.inputs.new('NodeSocketGeometry', "Geometry")
|
||||||
@@ -33,6 +34,7 @@ def geometry_node_group_empty_new(context):
|
|||||||
|
|
||||||
return group
|
return group
|
||||||
|
|
||||||
|
|
||||||
def geometry_modifier_poll(context) -> bool:
|
def geometry_modifier_poll(context) -> bool:
|
||||||
ob = context.object
|
ob = context.object
|
||||||
|
|
||||||
@@ -42,6 +44,7 @@ def geometry_modifier_poll(context) -> bool:
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
class NewGeometryNodesModifier(bpy.types.Operator):
|
class NewGeometryNodesModifier(bpy.types.Operator):
|
||||||
"""Create a new modifier with a new geometry node group"""
|
"""Create a new modifier with a new geometry node group"""
|
||||||
|
|
||||||
|
|||||||
@@ -573,6 +573,7 @@ class QuickLiquid(Operator):
|
|||||||
|
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
|
||||||
classes = (
|
classes = (
|
||||||
QuickExplode,
|
QuickExplode,
|
||||||
QuickFur,
|
QuickFur,
|
||||||
|
|||||||
@@ -893,6 +893,7 @@ class GreasePencilLayerDisplayPanel:
|
|||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.prop(gpl, "use_solo_mode", text="Show Only on Keyframed")
|
row.prop(gpl, "use_solo_mode", text="Show Only on Keyframed")
|
||||||
|
|
||||||
|
|
||||||
class GreasePencilFlipTintColors(Operator):
|
class GreasePencilFlipTintColors(Operator):
|
||||||
bl_label = "Flip Colors"
|
bl_label = "Flip Colors"
|
||||||
bl_idname = "gpencil.tint_flip"
|
bl_idname = "gpencil.tint_flip"
|
||||||
|
|||||||
@@ -550,7 +550,6 @@ def brush_settings(layout, context, brush, popover=False):
|
|||||||
if context.preferences.experimental.use_sculpt_tools_tilt and capabilities.has_tilt:
|
if context.preferences.experimental.use_sculpt_tools_tilt and capabilities.has_tilt:
|
||||||
layout.prop(brush, "tilt_strength_factor", slider=True)
|
layout.prop(brush, "tilt_strength_factor", slider=True)
|
||||||
|
|
||||||
|
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.prop(brush, "hardness", slider=True)
|
row.prop(brush, "hardness", slider=True)
|
||||||
row.prop(brush, "invert_hardness_pressure", text="")
|
row.prop(brush, "invert_hardness_pressure", text="")
|
||||||
|
|||||||
@@ -267,7 +267,11 @@ class FILEBROWSER_PT_bookmarks_system(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
return not context.preferences.filepaths.hide_system_bookmarks and panel_poll_is_upper_region(context.region) and not panel_poll_is_asset_browsing(context)
|
return (
|
||||||
|
not context.preferences.filepaths.hide_system_bookmarks and
|
||||||
|
panel_poll_is_upper_region(context.region) and
|
||||||
|
not panel_poll_is_asset_browsing(context)
|
||||||
|
)
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@@ -301,7 +305,10 @@ class FILEBROWSER_PT_bookmarks_favorites(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
return panel_poll_is_upper_region(context.region) and not panel_poll_is_asset_browsing(context)
|
return (
|
||||||
|
panel_poll_is_upper_region(context.region) and
|
||||||
|
not panel_poll_is_asset_browsing(context)
|
||||||
|
)
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@@ -338,7 +345,11 @@ class FILEBROWSER_PT_bookmarks_recents(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
return not context.preferences.filepaths.hide_recent_locations and panel_poll_is_upper_region(context.region) and not panel_poll_is_asset_browsing(context)
|
return (
|
||||||
|
not context.preferences.filepaths.hide_recent_locations and
|
||||||
|
panel_poll_is_upper_region(context.region) and
|
||||||
|
not panel_poll_is_asset_browsing(context)
|
||||||
|
)
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@@ -362,7 +373,11 @@ class FILEBROWSER_PT_advanced_filter(Panel):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
# only useful in append/link (library) context currently...
|
# only useful in append/link (library) context currently...
|
||||||
return context.space_data.params.use_library_browsing and panel_poll_is_upper_region(context.region) and not panel_poll_is_asset_browsing(context)
|
return (
|
||||||
|
context.space_data.params.use_library_browsing and
|
||||||
|
panel_poll_is_upper_region(context.region) and
|
||||||
|
not panel_poll_is_asset_browsing(context)
|
||||||
|
)
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|||||||
@@ -1496,7 +1496,6 @@ class IMAGE_PT_overlay_uv_edit(Panel):
|
|||||||
subrow.prop(uvedit, "display_stretch_type", text="")
|
subrow.prop(uvedit, "display_stretch_type", text="")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class IMAGE_PT_overlay_uv_edit_geometry(Panel):
|
class IMAGE_PT_overlay_uv_edit_geometry(Panel):
|
||||||
bl_space_type = 'IMAGE_EDITOR'
|
bl_space_type = 'IMAGE_EDITOR'
|
||||||
bl_region_type = 'HEADER'
|
bl_region_type = 'HEADER'
|
||||||
@@ -1529,7 +1528,6 @@ class IMAGE_PT_overlay_uv_edit_geometry(Panel):
|
|||||||
row.prop(uvedit, "show_faces", text="Faces")
|
row.prop(uvedit, "show_faces", text="Faces")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class IMAGE_PT_overlay_texture_paint(Panel):
|
class IMAGE_PT_overlay_texture_paint(Panel):
|
||||||
bl_space_type = 'IMAGE_EDITOR'
|
bl_space_type = 'IMAGE_EDITOR'
|
||||||
bl_region_type = 'HEADER'
|
bl_region_type = 'HEADER'
|
||||||
|
|||||||
@@ -168,7 +168,6 @@ class NODE_HT_header(Header):
|
|||||||
else:
|
else:
|
||||||
row.template_ID(snode, "node_tree", new="node.new_geometry_nodes_modifier")
|
row.template_ID(snode, "node_tree", new="node.new_geometry_nodes_modifier")
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Custom node tree is edited as independent ID block
|
# Custom node tree is edited as independent ID block
|
||||||
NODE_MT_editor_menus.draw_collapsible(context, layout)
|
NODE_MT_editor_menus.draw_collapsible(context, layout)
|
||||||
|
|||||||
@@ -61,8 +61,10 @@ class PROPERTIES_PT_navigation_bar(Panel):
|
|||||||
layout.scale_x = 1.4
|
layout.scale_x = 1.4
|
||||||
layout.scale_y = 1.4
|
layout.scale_y = 1.4
|
||||||
if view.search_filter:
|
if view.search_filter:
|
||||||
layout.prop_tabs_enum(view, "context", data_highlight=view,
|
layout.prop_tabs_enum(
|
||||||
property_highlight="tab_search_results", icon_only=True)
|
view, "context", data_highlight=view,
|
||||||
|
property_highlight="tab_search_results", icon_only=True,
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
layout.prop_tabs_enum(view, "context", icon_only=True)
|
layout.prop_tabs_enum(view, "context", icon_only=True)
|
||||||
|
|
||||||
|
|||||||
@@ -156,7 +156,6 @@ class SEQUENCER_HT_header(Header):
|
|||||||
if tool_settings.use_proportional_edit:
|
if tool_settings.use_proportional_edit:
|
||||||
row.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
|
row.prop(tool_settings, "proportional_edit_falloff", icon_only=True)
|
||||||
|
|
||||||
|
|
||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.prop(st, "show_strip_overlay", text="", icon='OVERLAY')
|
row.prop(st, "show_strip_overlay", text="", icon='OVERLAY')
|
||||||
sub = row.row(align=True)
|
sub = row.row(align=True)
|
||||||
@@ -213,7 +212,6 @@ class SEQUENCER_PT_preview_overlay(Panel):
|
|||||||
st = context.space_data
|
st = context.space_data
|
||||||
return st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'} and st.display_mode == 'IMAGE'
|
return st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'} and st.display_mode == 'IMAGE'
|
||||||
|
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
ed = context.scene.sequence_editor
|
ed = context.scene.sequence_editor
|
||||||
st = context.space_data
|
st = context.space_data
|
||||||
@@ -237,7 +235,6 @@ class SEQUENCER_PT_sequencer_overlay(Panel):
|
|||||||
st = context.space_data
|
st = context.space_data
|
||||||
return st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}
|
return st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}
|
||||||
|
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
st = context.space_data
|
st = context.space_data
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
@@ -258,7 +255,6 @@ class SEQUENCER_PT_sequencer_overlay(Panel):
|
|||||||
layout.prop_menu_enum(st, "waveform_display_type")
|
layout.prop_menu_enum(st, "waveform_display_type")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class SEQUENCER_MT_view_cache(Menu):
|
class SEQUENCER_MT_view_cache(Menu):
|
||||||
bl_label = "Cache"
|
bl_label = "Cache"
|
||||||
|
|
||||||
|
|||||||
@@ -297,6 +297,7 @@ class TIME_PT_keyframing_settings(TimelinePanelButtons, Panel):
|
|||||||
col.label(text="New Keyframe Type")
|
col.label(text="New Keyframe Type")
|
||||||
col.prop(tool_settings, "keyframe_type", text="")
|
col.prop(tool_settings, "keyframe_type", text="")
|
||||||
|
|
||||||
|
|
||||||
class TIME_PT_auto_keyframing(TimelinePanelButtons, Panel):
|
class TIME_PT_auto_keyframing(TimelinePanelButtons, Panel):
|
||||||
bl_label = "Auto Keyframing"
|
bl_label = "Auto Keyframing"
|
||||||
bl_options = {'HIDE_HEADER'}
|
bl_options = {'HIDE_HEADER'}
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ class USERPREF_PT_interface_display(InterfacePanel, CenterAlignMixIn, Panel):
|
|||||||
col.separator()
|
col.separator()
|
||||||
|
|
||||||
col = layout.column(heading="Tooltips", align=True)
|
col = layout.column(heading="Tooltips", align=True)
|
||||||
col.prop(view, "show_tooltips", text = "User Tooltips")
|
col.prop(view, "show_tooltips", text="User Tooltips")
|
||||||
sub = col.column()
|
sub = col.column()
|
||||||
sub.active = view.show_tooltips
|
sub.active = view.show_tooltips
|
||||||
sub.prop(view, "show_tooltips_python")
|
sub.prop(view, "show_tooltips_python")
|
||||||
|
|||||||
@@ -5306,6 +5306,7 @@ class VIEW3D_MT_sculpt_mask_edit_pie(Menu):
|
|||||||
op.filter_type = 'CONTRAST_DECREASE'
|
op.filter_type = 'CONTRAST_DECREASE'
|
||||||
op.auto_iteration_count = False
|
op.auto_iteration_count = False
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_MT_sculpt_automasking_pie(Menu):
|
class VIEW3D_MT_sculpt_automasking_pie(Menu):
|
||||||
bl_label = "Automasking"
|
bl_label = "Automasking"
|
||||||
|
|
||||||
|
|||||||
@@ -966,6 +966,7 @@ class VIEW3D_PT_tools_weightpaint_symmetry(Panel, View3DPaintPanel):
|
|||||||
row.active = mesh.use_mirror_vertex_group_x
|
row.active = mesh.use_mirror_vertex_group_x
|
||||||
row.prop(mesh, "use_mirror_topology")
|
row.prop(mesh, "use_mirror_topology")
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_PT_tools_weightpaint_symmetry_for_topbar(Panel):
|
class VIEW3D_PT_tools_weightpaint_symmetry_for_topbar(Panel):
|
||||||
bl_space_type = 'TOPBAR'
|
bl_space_type = 'TOPBAR'
|
||||||
bl_region_type = 'HEADER'
|
bl_region_type = 'HEADER'
|
||||||
|
|||||||
Reference in New Issue
Block a user