diff options
Diffstat (limited to 'release/scripts/startup/bl_operators')
-rw-r--r-- | release/scripts/startup/bl_operators/__init__.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/add_mesh_torus.py | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/anim.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/assets.py | 3 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/console.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/constraint.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/node.py | 3 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 9 |
8 files changed, 18 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_operators/__init__.py b/release/scripts/startup/bl_operators/__init__.py index e91d3b3ce60..7e6f14a0a51 100644 --- a/release/scripts/startup/bl_operators/__init__.py +++ b/release/scripts/startup/bl_operators/__init__.py @@ -17,6 +17,7 @@ # ##### END GPL LICENSE BLOCK ##### # <pep8 compliant> +from __future__ import annotations # support reloading sub-modules if "bpy" in locals(): diff --git a/release/scripts/startup/bl_operators/add_mesh_torus.py b/release/scripts/startup/bl_operators/add_mesh_torus.py index c2f9a4189cf..0ebb6ae27e1 100644 --- a/release/scripts/startup/bl_operators/add_mesh_torus.py +++ b/release/scripts/startup/bl_operators/add_mesh_torus.py @@ -17,6 +17,8 @@ # ##### END GPL LICENSE BLOCK ##### # <pep8-80 compliant> +from __future__ import annotations + import bpy from bpy.types import Operator @@ -156,7 +158,7 @@ class AddTorus(Operator, object_utils.AddObjectHelper): ('EXT_INT', "Exterior/Interior", "Use the exterior/interior radii for torus dimensions"), ), - update=mode_update_callback, + update=AddTorus.mode_update_callback, ) major_radius: FloatProperty( name="Major Radius", diff --git a/release/scripts/startup/bl_operators/anim.py b/release/scripts/startup/bl_operators/anim.py index 279b66a0833..85290bfe3f0 100644 --- a/release/scripts/startup/bl_operators/anim.py +++ b/release/scripts/startup/bl_operators/anim.py @@ -17,6 +17,7 @@ # ##### END GPL LICENSE BLOCK ##### # <pep8-80 compliant> +from __future__ import annotations if "bpy" in locals(): from importlib import reload diff --git a/release/scripts/startup/bl_operators/assets.py b/release/scripts/startup/bl_operators/assets.py index 317555280e5..e7fbb155b2f 100644 --- a/release/scripts/startup/bl_operators/assets.py +++ b/release/scripts/startup/bl_operators/assets.py @@ -16,6 +16,9 @@ # # ##### END GPL LICENSE BLOCK ##### +# <pep8 compliant> +from __future__ import annotations + import bpy from bpy_extras.asset_utils import ( diff --git a/release/scripts/startup/bl_operators/console.py b/release/scripts/startup/bl_operators/console.py index bffac4eef55..231dade820d 100644 --- a/release/scripts/startup/bl_operators/console.py +++ b/release/scripts/startup/bl_operators/console.py @@ -17,6 +17,7 @@ # ##### END GPL LICENSE BLOCK ##### # <pep8-80 compliant> +from __future__ import annotations import bpy from bpy.types import Operator diff --git a/release/scripts/startup/bl_operators/constraint.py b/release/scripts/startup/bl_operators/constraint.py index 213122952ae..49fc6a04112 100644 --- a/release/scripts/startup/bl_operators/constraint.py +++ b/release/scripts/startup/bl_operators/constraint.py @@ -17,6 +17,7 @@ # ##### END GPL LICENSE BLOCK ##### # <pep8-80 compliant> +from __future__ import annotations from bpy.types import ( Operator, diff --git a/release/scripts/startup/bl_operators/node.py b/release/scripts/startup/bl_operators/node.py index 1c5ebb4fa17..7884a7287b7 100644 --- a/release/scripts/startup/bl_operators/node.py +++ b/release/scripts/startup/bl_operators/node.py @@ -17,6 +17,7 @@ # ##### END GPL LICENSE BLOCK ##### # <pep8-80 compliant> +from __future__ import annotations import bpy import nodeitems_utils @@ -218,7 +219,7 @@ class NODE_OT_add_search(NodeAddOperator, Operator): node_item: EnumProperty( name="Node Type", description="Node type", - items=node_enum_items, + items=NODE_OT_add_search.node_enum_items, ) def execute(self, context): diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index c5457713d36..db15f4597bf 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -17,6 +17,7 @@ # ##### END GPL LICENSE BLOCK ##### # <pep8 compliant> +from __future__ import annotations import bpy from bpy.types import ( @@ -859,9 +860,7 @@ class WM_OT_url_open_preset(Operator): type: EnumProperty( name="Site", - items=lambda self, _context: ( - item for (item, _) in WM_OT_url_open_preset.preset_items - ), + items=WM_OT_url_open_preset._preset_items, ) id: StringProperty( @@ -916,6 +915,10 @@ class WM_OT_url_open_preset(Operator): "https://www.blender.org/about/credits/"), ] + @staticmethod + def _preset_items(_self, _context): + return (item for (item, _) in WM_OT_url_open_preset.preset_items) + def execute(self, context): url = None type = self.type |