diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-24 11:12:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-24 13:04:04 +0300 |
commit | e288e392a8c3100cb60f6b7659323905e47c72b8 (patch) | |
tree | 18f760e31fcf597c080d691d62527ad7b3db2ee2 /release/scripts/startup | |
parent | dc2524eaaeb121aa48c5b81de67d3ede8a319123 (diff) |
Cleanup: line length in Python scripts
Diffstat (limited to 'release/scripts/startup')
5 files changed, 45 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index b011711d133..170b9f3ae44 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1327,7 +1327,10 @@ class WM_OT_properties_edit(Operator): use_soft_limits: BoolProperty( name="Use Soft Limits", - description="Limits the Property Value slider to a range, values outside the range must be inputted numerically", + description=( + "Limits the Property Value slider to a range, " + "values outside the range must be inputted numerically" + ), ) array_length: IntProperty( name="Array Length", diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 6408d4096fe..47f0b399b66 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -227,7 +227,12 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): split.enabled = note_flag and ob.mode == 'OBJECT' bake_incomplete = (domain.cache_frame_pause_data < domain.cache_frame_end) - if domain.cache_resumable and domain.has_cache_baked_data and not domain.is_cache_baking_data and bake_incomplete: + if ( + domain.cache_resumable and + domain.has_cache_baked_data and + not domain.is_cache_baking_data and + bake_incomplete + ): col = split.column() col.operator("fluid.bake_data", text="Resume") col = split.column() @@ -1249,7 +1254,12 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel): split.enabled = ob.mode == 'OBJECT' bake_incomplete = (domain.cache_frame_pause_data < domain.cache_frame_end) - if domain.cache_resumable and domain.has_cache_baked_data and not domain.is_cache_baking_data and bake_incomplete: + if ( + domain.cache_resumable and + domain.has_cache_baked_data and + not domain.is_cache_baking_data and + bake_incomplete + ): col = split.column() col.operator("fluid.bake_all", text="Resume") col = split.column() diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py index a55bd89ca18..26fe215b17d 100644 --- a/release/scripts/startup/bl_ui/properties_physics_rigidbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody.py @@ -109,7 +109,11 @@ class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel): @classmethod def poll(cls, context): obj = context.object - if obj.parent is not None and obj.parent.rigid_body is not None and not obj.parent.rigid_body.collision_shape == 'COMPOUND': + if ( + (obj.parent is not None) and + (obj.parent.rigid_body is not None) and + (not obj.parent.rigid_body.collision_shape == 'COMPOUND') + ): return False return (obj and obj.rigid_body and (context.engine in cls.COMPAT_ENGINES)) @@ -124,7 +128,11 @@ class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel): layout.prop(rbo, "collision_shape", text="Shape") if rbo.collision_shape == 'COMPOUND': - if parent is not None and parent.rigid_body is not None and parent.rigid_body.collision_shape == 'COMPOUND': + if ( + (parent is not None) and + (parent.rigid_body is not None) and + (parent.rigid_body.collision_shape == 'COMPOUND') + ): rigid_body_warning(layout, "Sub compound shapes are not allowed") else: found = False @@ -179,7 +187,11 @@ class PHYSICS_PT_rigid_body_collisions_sensitivity(PHYSICS_PT_rigidbody_panel, P @classmethod def poll(cls, context): obj = context.object - if obj.parent is not None and obj.parent.rigid_body is not None and not obj.parent.rigid_body.collision_shape == 'COMPOUND': + if ( + (obj.parent is not None) and + (obj.parent.rigid_body is not None) and + (not obj.parent.rigid_body.collision_shape == 'COMPOUND') + ): return False return (obj and obj.rigid_body and (context.engine in cls.COMPAT_ENGINES)) diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py index 62a9343f644..927a30f0ae0 100644 --- a/release/scripts/startup/bl_ui/space_filebrowser.py +++ b/release/scripts/startup/bl_ui/space_filebrowser.py @@ -614,7 +614,10 @@ class ASSETBROWSER_PT_filter(asset_utils.AssetBrowserPanel, Panel): filter_id = params.filter_asset_id for identifier in dir(filter_id): - if identifier.startswith("filter_") or (identifier.startswith("experimental_filter_") and use_extended_browser): + if ( + identifier.startswith("filter_") or + (identifier.startswith("experimental_filter_") and use_extended_browser) + ): row = col.row() row.label(icon=filter_id.bl_rna.properties[identifier].icon) row.prop(filter_id, identifier, toggle=False) diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index da3db48d962..2fda13184da 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -786,8 +786,16 @@ class NodeTreeInterfacePanel: if tree.type == 'GEOMETRY': layout.prop(active_socket, "description") field_socket_prefixes = { - "NodeSocketInt", "NodeSocketColor", "NodeSocketVector", "NodeSocketBool", "NodeSocketFloat"} - is_field_type = any(active_socket.bl_socket_idname.startswith(prefix) for prefix in field_socket_prefixes) + "NodeSocketInt", + "NodeSocketColor", + "NodeSocketVector", + "NodeSocketBool", + "NodeSocketFloat", + } + is_field_type = any( + active_socket.bl_socket_idname.startswith(prefix) + for prefix in field_socket_prefixes + ) if in_out == 'OUT' and is_field_type: layout.prop(active_socket, "attribute_domain") active_socket.draw(context, layout) |