Cleanup: pep8, remove redundant parenthesis
This commit is contained in:
@@ -147,8 +147,8 @@ class BakeToKeyframes(Operator):
|
||||
scene.frame_set(f)
|
||||
for j, obj in enumerate(objects):
|
||||
mat = bake[i][j]
|
||||
# convert world space transform to parent space, so parented objects don't get offset after baking
|
||||
if (obj.parent):
|
||||
# Convert world space transform to parent space, so parented objects don't get offset after baking.
|
||||
if obj.parent:
|
||||
mat = obj.matrix_parent_inverse.inverted() @ obj.parent.matrix_world.inverted() @ mat
|
||||
|
||||
obj.location = mat.to_translation()
|
||||
|
||||
@@ -348,7 +348,6 @@ class DATA_PT_font(CurveButtonsPanelText, Panel):
|
||||
row.label(text="Bold & Italic")
|
||||
row.template_ID(text, "font_bold_italic", open="font.open", unlink="font.unlink")
|
||||
|
||||
|
||||
if mode == 'EDIT_TEXT':
|
||||
layout.separator()
|
||||
|
||||
|
||||
@@ -46,7 +46,11 @@ class MESH_MT_vertex_group_context_menu(Menu):
|
||||
layout.operator("object.vertex_group_mirror", icon='ARROW_LEFTRIGHT').use_topology = False
|
||||
layout.operator("object.vertex_group_mirror", text="Mirror Vertex Group (Topology)").use_topology = True
|
||||
layout.separator()
|
||||
layout.operator("object.vertex_group_remove_from", icon='X', text="Remove from All Groups").use_all_groups = True
|
||||
layout.operator(
|
||||
"object.vertex_group_remove_from",
|
||||
icon='X',
|
||||
text="Remove from All Groups",
|
||||
).use_all_groups = True
|
||||
layout.operator("object.vertex_group_remove_from", text="Clear Active Group").use_all_verts = True
|
||||
layout.operator("object.vertex_group_remove", text="Delete All Unlocked Groups").all_unlocked = True
|
||||
layout.operator("object.vertex_group_remove", text="Delete All Groups").all = True
|
||||
@@ -474,7 +478,7 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel):
|
||||
mesh = context.mesh
|
||||
row.prop(mesh, "remesh_mode", text="Mode", expand=True)
|
||||
col = layout.column()
|
||||
if (mesh.remesh_mode == 'VOXEL'):
|
||||
if mesh.remesh_mode == 'VOXEL':
|
||||
col.prop(mesh, "remesh_voxel_size")
|
||||
col.prop(mesh, "remesh_voxel_adaptivity")
|
||||
col.prop(mesh, "use_remesh_fix_poles")
|
||||
@@ -485,6 +489,7 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel):
|
||||
else:
|
||||
col.operator("object.quadriflow_remesh", text="QuadriFlow Remesh")
|
||||
|
||||
|
||||
class DATA_PT_customdata(MeshButtonsPanel, Panel):
|
||||
bl_label = "Geometry Data"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@@ -57,7 +57,7 @@ class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel):
|
||||
|
||||
layout.prop(rd, "line_thickness_mode", expand=True)
|
||||
|
||||
if (rd.line_thickness_mode == 'ABSOLUTE'):
|
||||
if rd.line_thickness_mode == 'ABSOLUTE':
|
||||
layout.prop(rd, "line_thickness")
|
||||
|
||||
|
||||
|
||||
@@ -950,6 +950,7 @@ class GPENCIL_UL_layer(UIList):
|
||||
icon_value=icon,
|
||||
)
|
||||
|
||||
|
||||
class GreasePencilSimplifyPanel:
|
||||
|
||||
def draw_header(self, context):
|
||||
@@ -977,6 +978,7 @@ class GreasePencilSimplifyPanel:
|
||||
sub.active = rd.simplify_gpencil_view_fill
|
||||
sub.prop(rd, "simplify_gpencil_remove_lines", text="Lines")
|
||||
|
||||
|
||||
classes = (
|
||||
GPENCIL_MT_pie_tool_palette,
|
||||
GPENCIL_MT_pie_settings_palette,
|
||||
|
||||
@@ -86,7 +86,7 @@ class DopesheetFilterPopoverBase:
|
||||
row = col.row(align=True)
|
||||
row.prop(dopesheet, "filter_text", text="")
|
||||
|
||||
if (not generic_filters_only) and (bpy.data.collections):
|
||||
if (not generic_filters_only) and bpy.data.collections:
|
||||
col = layout.column(align=True)
|
||||
col.prop(dopesheet, "filter_collection", text="")
|
||||
|
||||
|
||||
@@ -156,7 +156,8 @@ class FILEBROWSER_PT_filter(Panel):
|
||||
|
||||
|
||||
def panel_poll_is_upper_region(region):
|
||||
# The upper region is left-aligned, the lower is split into it then. Note that after "Flip Regions" it's right-aligned.
|
||||
# The upper region is left-aligned, the lower is split into it then.
|
||||
# Note that after "Flip Regions" it's right-aligned.
|
||||
return region.alignment in {'LEFT', 'RIGHT'}
|
||||
|
||||
|
||||
|
||||
@@ -717,7 +717,7 @@ def _activate_by_item(context, space_type, item, index):
|
||||
|
||||
handle_map = _activate_by_item._cursor_draw_handle
|
||||
handle = handle_map.pop(space_type, None)
|
||||
if (handle is not None):
|
||||
if handle is not None:
|
||||
WindowManager.draw_cursor_remove(handle)
|
||||
if item.draw_cursor is not None:
|
||||
def handle_fn(context, item, tool, xy):
|
||||
|
||||
@@ -5087,7 +5087,7 @@ class VIEW3D_PT_collections(Panel):
|
||||
subrow.active = collection.is_visible # Parent collection runtime visibility
|
||||
subrow.prop(child, "hide_viewport", text="", emboss=False)
|
||||
else:
|
||||
subrow.active = collection.visible_get() # Parent collection runtime visibility
|
||||
subrow.active = collection.visible_get() # Parent collection runtime visibility
|
||||
icon = 'HIDE_OFF' if child.visible_get() else 'HIDE_ON'
|
||||
props = subrow.operator("object.hide_collection", text="", icon=icon, emboss=False)
|
||||
props.collection_index = index
|
||||
|
||||
@@ -453,7 +453,7 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
||||
# crease_pinch_factor
|
||||
if capabilities.has_pinch_factor:
|
||||
row = col.row(align=True)
|
||||
if (brush.sculpt_tool in ('BLOB', 'SNAKE_HOOK')):
|
||||
if brush.sculpt_tool in {'BLOB', 'SNAKE_HOOK'}:
|
||||
row.prop(brush, "crease_pinch_factor", slider=True, text="Magnify")
|
||||
else:
|
||||
row.prop(brush, "crease_pinch_factor", slider=True, text="Pinch")
|
||||
|
||||
Reference in New Issue
Block a user