Cleanup: line length
This commit is contained in:
@@ -476,8 +476,6 @@ class PrincipledBSDFWrapper(ShaderWrapper):
|
||||
|
||||
normalmap_texture = property(normalmap_texture_get)
|
||||
|
||||
|
||||
|
||||
class ShaderImageTextureWrapper():
|
||||
"""
|
||||
Generic 'image texture'-like wrapper, handling image node, some mapping (texture coordinates transformations),
|
||||
|
||||
@@ -747,7 +747,12 @@ def BuildRNAInfo():
|
||||
|
||||
# for rna_info in InfoStructRNA.global_lookup.values():
|
||||
# print(rna_info)
|
||||
return InfoStructRNA.global_lookup, InfoFunctionRNA.global_lookup, InfoOperatorRNA.global_lookup, InfoPropertyRNA.global_lookup
|
||||
return (
|
||||
InfoStructRNA.global_lookup,
|
||||
InfoFunctionRNA.global_lookup,
|
||||
InfoOperatorRNA.global_lookup,
|
||||
InfoPropertyRNA.global_lookup,
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@@ -5128,7 +5128,6 @@ def km_node_editor_tool_links_cut(params):
|
||||
)
|
||||
|
||||
|
||||
|
||||
def km_3d_view_tool_cursor(params):
|
||||
return (
|
||||
"3D View Tool: Cursor",
|
||||
|
||||
@@ -251,7 +251,8 @@ class WM_OT_previews_batch_clear(Operator):
|
||||
|
||||
|
||||
class WM_OT_blend_strings_utf8_validate(Operator):
|
||||
"""Check and fix all strings in current .blend file to be valid UTF-8 Unicode (needed for some old, 2.4x area files)"""
|
||||
"""Check and fix all strings in current .blend file to be valid UTF-8 Unicode """ \
|
||||
"""(needed for some old, 2.4x area files)"""
|
||||
bl_idname = "wm.blend_strings_utf8_validate"
|
||||
bl_label = "Validate .blend strings"
|
||||
bl_options = {'REGISTER'}
|
||||
|
||||
@@ -953,7 +953,8 @@ class LoadReferenceImage(LoadImageAsEmpty, Operator):
|
||||
|
||||
|
||||
class OBJECT_OT_assign_property_defaults(Operator):
|
||||
"""Assign the current values of custom properties as their defaults, for use as part of the rest pose state in NLA track mixing"""
|
||||
"""Assign the current values of custom properties as their defaults, """ \
|
||||
"""for use as part of the rest pose state in NLA track mixing"""
|
||||
bl_idname = "object.assign_property_defaults"
|
||||
bl_label = "Assign Custom Property Values as Default"
|
||||
bl_options = {'UNDO', 'REGISTER'}
|
||||
|
||||
@@ -803,7 +803,8 @@ def main(context,
|
||||
if not meshFaces:
|
||||
continue
|
||||
|
||||
# Smallest first is slightly more efficient, but if the user cancels early then its better we work on the larger data.
|
||||
# Smallest first is slightly more efficient,
|
||||
# but if the user cancels early then its better we work on the larger data.
|
||||
|
||||
# Generate Projection Vecs
|
||||
# 0d is 1.0
|
||||
@@ -812,7 +813,9 @@ def main(context,
|
||||
# Initialize projectVecs
|
||||
if USER_VIEW_INIT:
|
||||
# Generate Projection
|
||||
projectVecs = [Vector(Window.GetViewVector()) @ ob.matrix_world.inverted().to_3x3()] # We add to this along the way
|
||||
|
||||
# We add to this along the way
|
||||
projectVecs = [Vector(Window.GetViewVector()) @ ob.matrix_world.inverted().to_3x3()]
|
||||
else:
|
||||
projectVecs = []
|
||||
|
||||
|
||||
@@ -2170,11 +2170,8 @@ class WM_OT_addon_remove(Operator):
|
||||
addon_utils.disable(self.module, default_set=True)
|
||||
|
||||
import shutil
|
||||
if isdir:
|
||||
if os.path.islink(path):
|
||||
os.remove(path)
|
||||
else:
|
||||
shutil.rmtree(path)
|
||||
if isdir and (not os.path.islink(path)):
|
||||
shutil.rmtree(path)
|
||||
else:
|
||||
os.remove(path)
|
||||
|
||||
|
||||
@@ -68,7 +68,8 @@ class ConstraintButtonsPanel:
|
||||
row = layout.row(align=True)
|
||||
row.label(text="Head/Tail:")
|
||||
row.prop(con, "head_tail", text="")
|
||||
row.prop(con, "use_bbone_shape", text="", icon='IPO_BEZIER') # XXX icon, and only when bone has segments?
|
||||
# XXX icon, and only when bone has segments?
|
||||
row.prop(con, "use_bbone_shape", text="", icon='IPO_BEZIER')
|
||||
elif con.target.type in {'MESH', 'LATTICE'}:
|
||||
layout.prop_search(con, "subtarget", con.target, "vertex_groups", text="Vertex Group")
|
||||
|
||||
|
||||
@@ -100,7 +100,8 @@ class AnnotationDrawingToolsPanel:
|
||||
col.label(text="Draw:")
|
||||
row = col.row(align=True)
|
||||
row.operator("gpencil.annotate", icon='GREASEPENCIL', text="Draw").mode = 'DRAW'
|
||||
row.operator("gpencil.annotate", icon='FORCE_CURVE', text="Erase").mode = 'ERASER' # XXX: Needs a dedicated icon
|
||||
# XXX: Needs a dedicated icon
|
||||
row.operator("gpencil.annotate", icon='FORCE_CURVE', text="Erase").mode = 'ERASER'
|
||||
|
||||
row = col.row(align=True)
|
||||
row.operator("gpencil.annotate", icon='LINE_DATA', text="Line").mode = 'DRAW_STRAIGHT'
|
||||
|
||||
@@ -240,7 +240,8 @@ class DOPESHEET_HT_editor_buttons(Header):
|
||||
tool_settings = context.tool_settings
|
||||
|
||||
if st.mode in {'ACTION', 'SHAPEKEY'}:
|
||||
# TODO: These buttons need some tidying up - Probably by using a popover, and bypassing the template_id() here
|
||||
# TODO: These buttons need some tidying up -
|
||||
# Probably by using a popover, and bypassing the template_id() here
|
||||
row = layout.row(align=True)
|
||||
row.operator("action.layer_prev", text="", icon='TRIA_DOWN')
|
||||
row.operator("action.layer_next", text="", icon='TRIA_UP')
|
||||
|
||||
@@ -444,7 +444,8 @@ class NODE_PT_active_node_properties(Panel):
|
||||
elif hasattr(node, "draw_buttons"):
|
||||
node.draw_buttons(context, layout)
|
||||
|
||||
# XXX this could be filtered further to exclude socket types which don't have meaningful input values (e.g. cycles shader)
|
||||
# XXX this could be filtered further to exclude socket types
|
||||
# which don't have meaningful input values (e.g. cycles shader)
|
||||
value_inputs = [socket for socket in node.inputs if socket.enabled and not socket.is_linked]
|
||||
if value_inputs:
|
||||
layout.separator()
|
||||
|
||||
@@ -451,9 +451,13 @@ class ToolSelectPanelHelper:
|
||||
column_count = 1
|
||||
|
||||
if column_count == 1:
|
||||
ui_gen = ToolSelectPanelHelper._layout_generator_single_column(layout, scale_y=scale_y)
|
||||
ui_gen = ToolSelectPanelHelper._layout_generator_single_column(
|
||||
layout, scale_y=scale_y,
|
||||
)
|
||||
else:
|
||||
ui_gen = ToolSelectPanelHelper._layout_generator_multi_columns(layout, column_count=column_count, scale_y=scale_y)
|
||||
ui_gen = ToolSelectPanelHelper._layout_generator_multi_columns(
|
||||
layout, column_count=column_count, scale_y=scale_y,
|
||||
)
|
||||
|
||||
return ui_gen, show_text
|
||||
|
||||
|
||||
@@ -4308,7 +4308,9 @@ class VIEW3D_PT_collections(Panel):
|
||||
subrow = sub.row()
|
||||
subrow.alignment = 'LEFT'
|
||||
subrow.active = has_visible_objects
|
||||
subrow.operator("object.hide_collection", text=child.name, icon=icon, emboss=False).collection_index = index
|
||||
subrow.operator(
|
||||
"object.hide_collection", text=child.name, icon=icon, emboss=False,
|
||||
).collection_index = index
|
||||
|
||||
sub = row.split()
|
||||
subrow = sub.row(align=True)
|
||||
|
||||
@@ -614,7 +614,10 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
|
||||
sub = row.row(align=True)
|
||||
sub.prop(brush, "cursor_overlay_alpha", text="Curve Alpha")
|
||||
sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
||||
row.prop(brush, "use_cursor_overlay", text="", toggle=True, icon='HIDE_OFF' if brush.use_cursor_overlay else 'HIDE_ON')
|
||||
row.prop(
|
||||
brush, "use_cursor_overlay", text="", toggle=True,
|
||||
icon='HIDE_OFF' if brush.use_cursor_overlay else 'HIDE_ON',
|
||||
)
|
||||
|
||||
col.active = brush.brush_capabilities.has_overlay
|
||||
|
||||
@@ -625,7 +628,10 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
|
||||
sub.prop(brush, "texture_overlay_alpha", text="Texture Alpha")
|
||||
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
||||
if tex_slot.map_mode != 'STENCIL':
|
||||
row.prop(brush, "use_primary_overlay", text="", toggle=True, icon='HIDE_OFF' if brush.use_primary_overlay else 'HIDE_ON')
|
||||
row.prop(
|
||||
brush, "use_primary_overlay", text="", toggle=True,
|
||||
icon='HIDE_OFF' if brush.use_primary_overlay else 'HIDE_ON',
|
||||
)
|
||||
|
||||
if context.image_paint_object:
|
||||
row = col.row(align=True)
|
||||
@@ -634,7 +640,10 @@ class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
|
||||
sub.prop(brush, "mask_overlay_alpha", text="Mask Texture Alpha")
|
||||
sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
||||
if tex_slot_mask.map_mode != 'STENCIL':
|
||||
row.prop(brush, "use_secondary_overlay", text="", toggle=True, icon='HIDE_OFF' if brush.use_secondary_overlay else 'HIDE_ON')
|
||||
row.prop(
|
||||
brush, "use_secondary_overlay", text="", toggle=True,
|
||||
icon='HIDE_OFF' if brush.use_secondary_overlay else 'HIDE_ON',
|
||||
)
|
||||
|
||||
|
||||
# TODO, move to space_view3d.py
|
||||
|
||||
@@ -53,7 +53,8 @@ class UIListPanelExample(bpy.types.Panel):
|
||||
# with no custom draw code, use "UI_UL_list").
|
||||
layout.template_list("MATERIAL_UL_matslots_example", "", obj, "material_slots", obj, "active_material_index")
|
||||
|
||||
# The second one can usually be left as an empty string. It's an additional ID used to distinguish lists in case you
|
||||
# The second one can usually be left as an empty string.
|
||||
# It's an additional ID used to distinguish lists in case you
|
||||
# use the same list several times in a given area.
|
||||
layout.template_list("MATERIAL_UL_matslots_example", "compact", obj, "material_slots",
|
||||
obj, "active_material_index", type='COMPACT')
|
||||
|
||||
Reference in New Issue
Block a user