fake-bpy-module 20241229__py3-none-any.whl → 20241230__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of fake-bpy-module might be problematic. Click here for more details.

bpy/types/__init__.pyi CHANGED
@@ -116995,11 +116995,12 @@ class BlendData(bpy_struct):
116995
116995
  :type: BlendDataWorlds
116996
116996
  """
116997
116997
 
116998
- def batch_remove(self, ids):
116998
+ def batch_remove(self, ids: collections.abc.Sequence[ID] | None):
116999
116999
  """Remove (delete) several IDs at once.WARNING: Considered experimental feature currently.Note that this function is quicker than individual calls to `remove()` (from `bpy.types.BlendData`
117000
117000
  ID collections), but less safe/versatile (it can break Blender, e.g. by removing all scenes...).
117001
117001
 
117002
117002
  :param ids: Sequence of IDs (types can be mixed).
117003
+ :type ids: collections.abc.Sequence[ID] | None
117003
117004
  """
117004
117005
 
117005
117006
  @classmethod
@@ -117030,19 +117031,24 @@ class BlendData(bpy_struct):
117030
117031
  :return: The number of deleted IDs.
117031
117032
  """
117032
117033
 
117033
- def temp_data(self, filepath: bytes | str | None = None) -> typing_extensions.Self:
117034
+ def temp_data(
117035
+ self, filepath: None | bytes | str | None = None
117036
+ ) -> typing_extensions.Self:
117034
117037
  """A context manager that temporarily creates blender file data.
117035
117038
 
117036
117039
  :param filepath: The file path for the newly temporary data. When None, the path of the currently open file is used.
117037
- :type filepath: bytes | str | None
117040
+ :type filepath: None | bytes | str | None
117038
117041
  :return: Blend file data which is freed once the context exists.
117039
117042
  :rtype: typing_extensions.Self
117040
117043
  """
117041
117044
 
117042
- def user_map(self, subset, key_types, value_types) -> dict[ID]:
117045
+ def user_map(
117046
+ self, subset: collections.abc.Sequence[ID] | None, key_types, value_types
117047
+ ) -> dict[ID]:
117043
117048
  """Returns a mapping of all ID data-blocks in current bpy.data to a set of all data-blocks using them.For list of valid set members for key_types & value_types, see: `bpy.types.KeyingSetPath.id_type`.
117044
117049
 
117045
117050
  :param subset: When passed, only these data-blocks and their users will be included as keys/values in the map.
117051
+ :type subset: collections.abc.Sequence[ID] | None
117046
117052
  :param key_types: Filter the keys mapped by ID types.
117047
117053
  :param value_types: Filter the values in the set by ID types.
117048
117054
  :return: dictionary that maps data-blocks ID's to their users.
@@ -157866,12 +157872,16 @@ class Gizmo(bpy_struct):
157866
157872
  """
157867
157873
 
157868
157874
  @staticmethod
157869
- def new_custom_shape(type: str | None, verts) -> typing.Any:
157875
+ def new_custom_shape(
157876
+ type: str | None,
157877
+ verts: collections.abc.Sequence[collections.abc.Sequence[float]] | None,
157878
+ ) -> typing.Any:
157870
157879
  """Create a new shape that can be passed to `Gizmo.draw_custom_shape`.
157871
157880
 
157872
157881
  :param type: The type of shape to create in (POINTS, LINES, TRIS, LINE_STRIP).
157873
157882
  :type type: str | None
157874
157883
  :param verts: Sequence of 2D or 3D coordinates.
157884
+ :type verts: collections.abc.Sequence[collections.abc.Sequence[float]] | None
157875
157885
  :return: The newly created shape (the return type make change).
157876
157886
  :rtype: typing.Any
157877
157887
  """
@@ -157918,8 +157928,8 @@ class Gizmo(bpy_struct):
157918
157928
  def target_set_handler(
157919
157929
  self,
157920
157930
  target: str | None,
157921
- get: collections.abc.Callable | None,
157922
- set: collections.abc.Callable | None,
157931
+ get: collections.abc.Callable[float | collections.abc.Sequence[float]] | None,
157932
+ set: collections.abc.Callable[[tuple[float, int]], typing.Any] | None,
157923
157933
  range: collections.abc.Callable | None = None,
157924
157934
  ):
157925
157935
  """Assigns callbacks to a gizmos property.
@@ -157927,9 +157937,9 @@ class Gizmo(bpy_struct):
157927
157937
  :param target: Target property name.
157928
157938
  :type target: str | None
157929
157939
  :param get: Function that returns the value for this property (single value or sequence).
157930
- :type get: collections.abc.Callable | None
157940
+ :type get: collections.abc.Callable[float | collections.abc.Sequence[float]] | None
157931
157941
  :param set: Function that takes a single value argument and applies it.
157932
- :type set: collections.abc.Callable | None
157942
+ :type set: collections.abc.Callable[[tuple[float, int]], typing.Any] | None
157933
157943
  :param range: Function that returns a (min, max) tuple for gizmos that use a range. The returned value is not used.
157934
157944
  :type range: collections.abc.Callable | None
157935
157945
  """
@@ -173773,20 +173783,21 @@ class Menu(bpy_struct):
173773
173783
  def is_extended(cls): ...
173774
173784
  def path_menu(
173775
173785
  self,
173776
- searchpaths,
173786
+ searchpaths: collections.abc.Sequence[str] | None,
173777
173787
  operator: str | None,
173778
173788
  *,
173779
173789
  props_default: dict[str, typing.Any] | None = None,
173780
173790
  prop_filepath: str | None = "filepath",
173781
- filter_ext: collections.abc.Callable | None = None,
173791
+ filter_ext: None | collections.abc.Callable[str, bool] | None = None,
173782
173792
  filter_path=None,
173783
- display_name: collections.abc.Callable | None = None,
173793
+ display_name: collections.abc.Callable[str, str] | None = None,
173784
173794
  add_operator=None,
173785
173795
  add_operator_props=None,
173786
173796
  ):
173787
173797
  """Populate a menu from a list of paths.
173788
173798
 
173789
173799
  :param searchpaths: Paths to scan.
173800
+ :type searchpaths: collections.abc.Sequence[str] | None
173790
173801
  :param operator: The operator id to use with each file.
173791
173802
  :type operator: str | None
173792
173803
  :param props_default: Properties to assign to each operator.
@@ -173796,10 +173807,10 @@ class Menu(bpy_struct):
173796
173807
  :param filter_ext: Optional callback that takes the file extensions.
173797
173808
 
173798
173809
  Returning false excludes the file from the list.
173799
- :type filter_ext: collections.abc.Callable | None
173810
+ :type filter_ext: None | collections.abc.Callable[str, bool] | None
173800
173811
  :param filter_path:
173801
173812
  :param display_name: Optional callback that takes the full path, returns the name to display.
173802
- :type display_name: collections.abc.Callable | None
173813
+ :type display_name: collections.abc.Callable[str, str] | None
173803
173814
  :param add_operator:
173804
173815
  :param add_operator_props:
173805
173816
  """
@@ -186691,11 +186702,15 @@ expanding an operator into a menu.
186691
186702
  """
186692
186703
 
186693
186704
  @classmethod
186694
- def poll_message_set(cls, message: collections.abc.Callable | str | None, *args):
186705
+ def poll_message_set(
186706
+ cls,
186707
+ message: collections.abc.Callable[[typing.Any, int], str | None] | str | None,
186708
+ *args,
186709
+ ):
186695
186710
  """Set the message to show in the tool-tip when poll fails.When message is callable, additional user defined positional arguments are passed to the message function.
186696
186711
 
186697
186712
  :param message: The message or a function that returns the message.
186698
- :type message: collections.abc.Callable | str | None
186713
+ :type message: collections.abc.Callable[[typing.Any, int], str | None] | str | None
186699
186714
  :param args:
186700
186715
  """
186701
186716
 
@@ -208679,7 +208694,7 @@ class Space(bpy_struct):
208679
208694
  @classmethod
208680
208695
  def draw_handler_add(
208681
208696
  cls,
208682
- callback: collections.abc.Callable | None,
208697
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
208683
208698
  args: tuple[typing.Any, int] | None,
208684
208699
  region_type: str | None,
208685
208700
  draw_type: str | None,
@@ -208690,7 +208705,7 @@ class Space(bpy_struct):
208690
208705
 
208691
208706
  :param callback: A function that will be called when the region is drawn.
208692
208707
  It gets the specified arguments as input, it's return value is ignored.
208693
- :type callback: collections.abc.Callable | None
208708
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
208694
208709
  :param args: Arguments that will be passed to the callback.
208695
208710
  :type args: tuple[typing.Any, int] | None
208696
208711
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -209023,7 +209038,7 @@ class SpaceClipEditor(Space, bpy_struct):
209023
209038
  @classmethod
209024
209039
  def draw_handler_add(
209025
209040
  cls,
209026
- callback: collections.abc.Callable | None,
209041
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
209027
209042
  args: tuple[typing.Any, int] | None,
209028
209043
  region_type: str | None,
209029
209044
  draw_type: str | None,
@@ -209034,7 +209049,7 @@ class SpaceClipEditor(Space, bpy_struct):
209034
209049
 
209035
209050
  :param callback: A function that will be called when the region is drawn.
209036
209051
  It gets the specified arguments as input, it's return value is ignored.
209037
- :type callback: collections.abc.Callable | None
209052
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
209038
209053
  :param args: Arguments that will be passed to the callback.
209039
209054
  :type args: tuple[typing.Any, int] | None
209040
209055
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -209125,7 +209140,7 @@ class SpaceConsole(Space, bpy_struct):
209125
209140
  @classmethod
209126
209141
  def draw_handler_add(
209127
209142
  cls,
209128
- callback: collections.abc.Callable | None,
209143
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
209129
209144
  args: tuple[typing.Any, int] | None,
209130
209145
  region_type: str | None,
209131
209146
  draw_type: str | None,
@@ -209136,7 +209151,7 @@ class SpaceConsole(Space, bpy_struct):
209136
209151
 
209137
209152
  :param callback: A function that will be called when the region is drawn.
209138
209153
  It gets the specified arguments as input, it's return value is ignored.
209139
- :type callback: collections.abc.Callable | None
209154
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
209140
209155
  :param args: Arguments that will be passed to the callback.
209141
209156
  :type args: tuple[typing.Any, int] | None
209142
209157
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -209333,7 +209348,7 @@ class SpaceDopeSheetEditor(Space, bpy_struct):
209333
209348
  @classmethod
209334
209349
  def draw_handler_add(
209335
209350
  cls,
209336
- callback: collections.abc.Callable | None,
209351
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
209337
209352
  args: tuple[typing.Any, int] | None,
209338
209353
  region_type: str | None,
209339
209354
  draw_type: str | None,
@@ -209344,7 +209359,7 @@ class SpaceDopeSheetEditor(Space, bpy_struct):
209344
209359
 
209345
209360
  :param callback: A function that will be called when the region is drawn.
209346
209361
  It gets the specified arguments as input, it's return value is ignored.
209347
- :type callback: collections.abc.Callable | None
209362
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
209348
209363
  :param args: Arguments that will be passed to the callback.
209349
209364
  :type args: tuple[typing.Any, int] | None
209350
209365
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -209504,7 +209519,7 @@ class SpaceFileBrowser(Space, bpy_struct):
209504
209519
  @classmethod
209505
209520
  def draw_handler_add(
209506
209521
  cls,
209507
- callback: collections.abc.Callable | None,
209522
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
209508
209523
  args: tuple[typing.Any, int] | None,
209509
209524
  region_type: str | None,
209510
209525
  draw_type: str | None,
@@ -209515,7 +209530,7 @@ class SpaceFileBrowser(Space, bpy_struct):
209515
209530
 
209516
209531
  :param callback: A function that will be called when the region is drawn.
209517
209532
  It gets the specified arguments as input, it's return value is ignored.
209518
- :type callback: collections.abc.Callable | None
209533
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
209519
209534
  :param args: Arguments that will be passed to the callback.
209520
209535
  :type args: tuple[typing.Any, int] | None
209521
209536
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -209690,7 +209705,7 @@ class SpaceGraphEditor(Space, bpy_struct):
209690
209705
  @classmethod
209691
209706
  def draw_handler_add(
209692
209707
  cls,
209693
- callback: collections.abc.Callable | None,
209708
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
209694
209709
  args: tuple[typing.Any, int] | None,
209695
209710
  region_type: str | None,
209696
209711
  draw_type: str | None,
@@ -209701,7 +209716,7 @@ class SpaceGraphEditor(Space, bpy_struct):
209701
209716
 
209702
209717
  :param callback: A function that will be called when the region is drawn.
209703
209718
  It gets the specified arguments as input, it's return value is ignored.
209704
- :type callback: collections.abc.Callable | None
209719
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
209705
209720
  :param args: Arguments that will be passed to the callback.
209706
209721
  :type args: tuple[typing.Any, int] | None
209707
209722
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -209974,7 +209989,7 @@ class SpaceImageEditor(Space, bpy_struct):
209974
209989
  @classmethod
209975
209990
  def draw_handler_add(
209976
209991
  cls,
209977
- callback: collections.abc.Callable | None,
209992
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
209978
209993
  args: tuple[typing.Any, int] | None,
209979
209994
  region_type: str | None,
209980
209995
  draw_type: str | None,
@@ -209985,7 +210000,7 @@ class SpaceImageEditor(Space, bpy_struct):
209985
210000
 
209986
210001
  :param callback: A function that will be called when the region is drawn.
209987
210002
  It gets the specified arguments as input, it's return value is ignored.
209988
- :type callback: collections.abc.Callable | None
210003
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
209989
210004
  :param args: Arguments that will be passed to the callback.
209990
210005
  :type args: tuple[typing.Any, int] | None
209991
210006
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -210101,7 +210116,7 @@ class SpaceInfo(Space, bpy_struct):
210101
210116
  @classmethod
210102
210117
  def draw_handler_add(
210103
210118
  cls,
210104
- callback: collections.abc.Callable | None,
210119
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
210105
210120
  args: tuple[typing.Any, int] | None,
210106
210121
  region_type: str | None,
210107
210122
  draw_type: str | None,
@@ -210112,7 +210127,7 @@ class SpaceInfo(Space, bpy_struct):
210112
210127
 
210113
210128
  :param callback: A function that will be called when the region is drawn.
210114
210129
  It gets the specified arguments as input, it's return value is ignored.
210115
- :type callback: collections.abc.Callable | None
210130
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
210116
210131
  :param args: Arguments that will be passed to the callback.
210117
210132
  :type args: tuple[typing.Any, int] | None
210118
210133
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -210215,7 +210230,7 @@ class SpaceNLA(Space, bpy_struct):
210215
210230
  @classmethod
210216
210231
  def draw_handler_add(
210217
210232
  cls,
210218
- callback: collections.abc.Callable | None,
210233
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
210219
210234
  args: tuple[typing.Any, int] | None,
210220
210235
  region_type: str | None,
210221
210236
  draw_type: str | None,
@@ -210226,7 +210241,7 @@ class SpaceNLA(Space, bpy_struct):
210226
210241
 
210227
210242
  :param callback: A function that will be called when the region is drawn.
210228
210243
  It gets the specified arguments as input, it's return value is ignored.
210229
- :type callback: collections.abc.Callable | None
210244
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
210230
210245
  :param args: Arguments that will be passed to the callback.
210231
210246
  :type args: tuple[typing.Any, int] | None
210232
210247
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -210418,7 +210433,7 @@ class SpaceNodeEditor(Space, bpy_struct):
210418
210433
  @classmethod
210419
210434
  def draw_handler_add(
210420
210435
  cls,
210421
- callback: collections.abc.Callable | None,
210436
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
210422
210437
  args: tuple[typing.Any, int] | None,
210423
210438
  region_type: str | None,
210424
210439
  draw_type: str | None,
@@ -210429,7 +210444,7 @@ class SpaceNodeEditor(Space, bpy_struct):
210429
210444
 
210430
210445
  :param callback: A function that will be called when the region is drawn.
210431
210446
  It gets the specified arguments as input, it's return value is ignored.
210432
- :type callback: collections.abc.Callable | None
210447
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
210433
210448
  :param args: Arguments that will be passed to the callback.
210434
210449
  :type args: tuple[typing.Any, int] | None
210435
210450
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -210751,7 +210766,7 @@ class SpaceOutliner(Space, bpy_struct):
210751
210766
  @classmethod
210752
210767
  def draw_handler_add(
210753
210768
  cls,
210754
- callback: collections.abc.Callable | None,
210769
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
210755
210770
  args: tuple[typing.Any, int] | None,
210756
210771
  region_type: str | None,
210757
210772
  draw_type: str | None,
@@ -210762,7 +210777,7 @@ class SpaceOutliner(Space, bpy_struct):
210762
210777
 
210763
210778
  :param callback: A function that will be called when the region is drawn.
210764
210779
  It gets the specified arguments as input, it's return value is ignored.
210765
- :type callback: collections.abc.Callable | None
210780
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
210766
210781
  :param args: Arguments that will be passed to the callback.
210767
210782
  :type args: tuple[typing.Any, int] | None
210768
210783
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -210823,7 +210838,7 @@ class SpacePreferences(Space, bpy_struct):
210823
210838
  @classmethod
210824
210839
  def draw_handler_add(
210825
210840
  cls,
210826
- callback: collections.abc.Callable | None,
210841
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
210827
210842
  args: tuple[typing.Any, int] | None,
210828
210843
  region_type: str | None,
210829
210844
  draw_type: str | None,
@@ -210834,7 +210849,7 @@ class SpacePreferences(Space, bpy_struct):
210834
210849
 
210835
210850
  :param callback: A function that will be called when the region is drawn.
210836
210851
  It gets the specified arguments as input, it's return value is ignored.
210837
- :type callback: collections.abc.Callable | None
210852
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
210838
210853
  :param args: Arguments that will be passed to the callback.
210839
210854
  :type args: tuple[typing.Any, int] | None
210840
210855
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -210938,7 +210953,7 @@ class SpaceProperties(Space, bpy_struct):
210938
210953
  @classmethod
210939
210954
  def draw_handler_add(
210940
210955
  cls,
210941
- callback: collections.abc.Callable | None,
210956
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
210942
210957
  args: tuple[typing.Any, int] | None,
210943
210958
  region_type: str | None,
210944
210959
  draw_type: str | None,
@@ -210949,7 +210964,7 @@ class SpaceProperties(Space, bpy_struct):
210949
210964
 
210950
210965
  :param callback: A function that will be called when the region is drawn.
210951
210966
  It gets the specified arguments as input, it's return value is ignored.
210952
- :type callback: collections.abc.Callable | None
210967
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
210953
210968
  :param args: Arguments that will be passed to the callback.
210954
210969
  :type args: tuple[typing.Any, int] | None
210955
210970
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -211194,7 +211209,7 @@ class SpaceSequenceEditor(Space, bpy_struct):
211194
211209
  @classmethod
211195
211210
  def draw_handler_add(
211196
211211
  cls,
211197
- callback: collections.abc.Callable | None,
211212
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
211198
211213
  args: tuple[typing.Any, int] | None,
211199
211214
  region_type: str | None,
211200
211215
  draw_type: str | None,
@@ -211205,7 +211220,7 @@ class SpaceSequenceEditor(Space, bpy_struct):
211205
211220
 
211206
211221
  :param callback: A function that will be called when the region is drawn.
211207
211222
  It gets the specified arguments as input, it's return value is ignored.
211208
- :type callback: collections.abc.Callable | None
211223
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
211209
211224
  :param args: Arguments that will be passed to the callback.
211210
211225
  :type args: tuple[typing.Any, int] | None
211211
211226
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -211338,7 +211353,7 @@ class SpaceSpreadsheet(Space, bpy_struct):
211338
211353
  @classmethod
211339
211354
  def draw_handler_add(
211340
211355
  cls,
211341
- callback: collections.abc.Callable | None,
211356
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
211342
211357
  args: tuple[typing.Any, int] | None,
211343
211358
  region_type: str | None,
211344
211359
  draw_type: str | None,
@@ -211349,7 +211364,7 @@ class SpaceSpreadsheet(Space, bpy_struct):
211349
211364
 
211350
211365
  :param callback: A function that will be called when the region is drawn.
211351
211366
  It gets the specified arguments as input, it's return value is ignored.
211352
- :type callback: collections.abc.Callable | None
211367
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
211353
211368
  :param args: Arguments that will be passed to the callback.
211354
211369
  :type args: tuple[typing.Any, int] | None
211355
211370
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -211538,7 +211553,7 @@ class SpaceTextEditor(Space, bpy_struct):
211538
211553
  @classmethod
211539
211554
  def draw_handler_add(
211540
211555
  cls,
211541
- callback: collections.abc.Callable | None,
211556
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
211542
211557
  args: tuple[typing.Any, int] | None,
211543
211558
  region_type: str | None,
211544
211559
  draw_type: str | None,
@@ -211549,7 +211564,7 @@ class SpaceTextEditor(Space, bpy_struct):
211549
211564
 
211550
211565
  :param callback: A function that will be called when the region is drawn.
211551
211566
  It gets the specified arguments as input, it's return value is ignored.
211552
- :type callback: collections.abc.Callable | None
211567
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
211553
211568
  :param args: Arguments that will be passed to the callback.
211554
211569
  :type args: tuple[typing.Any, int] | None
211555
211570
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -212243,7 +212258,7 @@ class SpaceView3D(Space, bpy_struct):
212243
212258
  @classmethod
212244
212259
  def draw_handler_add(
212245
212260
  cls,
212246
- callback: collections.abc.Callable | None,
212261
+ callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None,
212247
212262
  args: tuple[typing.Any, int] | None,
212248
212263
  region_type: str | None,
212249
212264
  draw_type: str | None,
@@ -212254,7 +212269,7 @@ class SpaceView3D(Space, bpy_struct):
212254
212269
 
212255
212270
  :param callback: A function that will be called when the region is drawn.
212256
212271
  It gets the specified arguments as input, it's return value is ignored.
212257
- :type callback: collections.abc.Callable | None
212272
+ :type callback: collections.abc.Callable[[typing.Any, int], typing.Any] | None
212258
212273
  :param args: Arguments that will be passed to the callback.
212259
212274
  :type args: tuple[typing.Any, int] | None
212260
212275
  :param region_type: The region type the callback draws in; usually WINDOW. (`bpy.types.Region.type`)
@@ -230381,7 +230396,10 @@ class WindowManager(ID, bpy_struct):
230381
230396
  @classmethod
230382
230397
  def draw_cursor_add(
230383
230398
  cls,
230384
- callback: collections.abc.Callable | None,
230399
+ callback: collections.abc.Callable[
230400
+ [typing.Any, int, tuple[int, int]], typing.Any
230401
+ ]
230402
+ | None,
230385
230403
  args: tuple[typing.Any, int] | None,
230386
230404
  space_type: str | None,
230387
230405
  region_type: str | None,
@@ -230392,7 +230410,7 @@ class WindowManager(ID, bpy_struct):
230392
230410
 
230393
230411
  :param callback: A function that will be called when the cursor is drawn.
230394
230412
  It gets the specified arguments as input with the mouse position (tuple) as last argument.
230395
- :type callback: collections.abc.Callable | None
230413
+ :type callback: collections.abc.Callable[[typing.Any, int, tuple[int, int]], typing.Any] | None
230396
230414
  :param args: Arguments that will be passed to the callback.
230397
230415
  :type args: tuple[typing.Any, int] | None
230398
230416
  :param space_type: The space type the callback draws in; for example VIEW_3D. (`bpy.types.Space.type`)
bpy/utils/__init__.pyi CHANGED
@@ -50,12 +50,13 @@ def escape_identifier(string: str) -> str:
50
50
  :rtype: str
51
51
  """
52
52
 
53
- def execfile(filepath: str, *, mod=None):
53
+ def execfile(filepath: str, *, mod: None | None = None):
54
54
  """Execute a file path as a Python script.
55
55
 
56
56
  :param filepath: Path of the script to execute.
57
57
  :type filepath: str
58
58
  :param mod: Optional cached module, the result of a previous execution.
59
+ :type mod: None | None
59
60
  :return: The module which can be passed back in as mod.
60
61
  """
61
62
 
@@ -231,7 +232,7 @@ def register_preset_path(path: str) -> bool:
231
232
 
232
233
  def register_submodule_factory(
233
234
  module_name: str, submodule_names: list[str]
234
- ) -> tuple[collections.abc.Callable, collections.abc.Callable]:
235
+ ) -> tuple[collections.abc.Callable[None], collections.abc.Callable[None]]:
235
236
  """Utility function to create register and unregister functions
236
237
  which simply load submodules,
237
238
  calling their register & unregister functions.
@@ -241,13 +242,13 @@ def register_submodule_factory(
241
242
  :param submodule_names: List of submodule names to load and unload.
242
243
  :type submodule_names: list[str]
243
244
  :return: register and unregister functions.
244
- :rtype: tuple[collections.abc.Callable, collections.abc.Callable]
245
+ :rtype: tuple[collections.abc.Callable[None], collections.abc.Callable[None]]
245
246
  """
246
247
 
247
248
  def register_tool(
248
249
  tool_cls: bpy.types.WorkSpaceTool,
249
250
  *,
250
- after=None,
251
+ after: None | collections.abc.Sequence[str] | None = None,
251
252
  separator: bool = False,
252
253
  group: bool = False,
253
254
  ):
@@ -256,6 +257,7 @@ def register_tool(
256
257
  :param tool_cls: A tool subclass.
257
258
  :type tool_cls: bpy.types.WorkSpaceTool
258
259
  :param after: Optional identifiers this tool will be added after.
260
+ :type after: None | collections.abc.Sequence[str] | None
259
261
  :param separator: When true, add a separator before this tool.
260
262
  :type separator: bool
261
263
  :param group: When true, add a new nested group of tools.
@@ -38,7 +38,7 @@ def to_value(
38
38
  unit_system: str | None,
39
39
  unit_category: str | None,
40
40
  str_input: str | None,
41
- str_ref_unit: str | None = None,
41
+ str_ref_unit: None | str | None = None,
42
42
  ) -> float:
43
43
  """Convert a given input string into a float value.
44
44
 
@@ -50,7 +50,7 @@ def to_value(
50
50
  :param str_input: The string to convert to a float value.
51
51
  :type str_input: str | None
52
52
  :param str_ref_unit: A reference string from which to extract a default unit, if none is found in str_input.
53
- :type str_ref_unit: str | None
53
+ :type str_ref_unit: None | str | None
54
54
  :return: The converted/interpreted value.
55
55
  :rtype: float
56
56
  """
@@ -64,24 +64,24 @@ class KeyframesCo:
64
64
  """
65
65
 
66
66
  def bake_action(
67
- obj: bpy.types.Object, *, action: bpy.types.Action, frames: int, bake_options
68
- ) -> bpy.types.Action:
67
+ obj: bpy.types.Object, *, action: None | bpy.types.Action, frames: int, bake_options
68
+ ) -> None | bpy.types.Action:
69
69
  """
70
70
 
71
71
  :param obj: Object to bake.
72
72
  :type obj: bpy.types.Object
73
73
  :param action: An action to bake the data into, or None for a new action
74
74
  to be created.
75
- :type action: bpy.types.Action
75
+ :type action: None | bpy.types.Action
76
76
  :param frames: Frames to bake.
77
77
  :type frames: int
78
78
  :param bake_options: Options for baking.
79
79
  :return: Action or None.
80
- :rtype: bpy.types.Action
80
+ :rtype: None | bpy.types.Action
81
81
  """
82
82
 
83
83
  def bake_action_iter(
84
- obj: bpy.types.Object, *, action: bpy.types.Action, bake_options
84
+ obj: bpy.types.Object, *, action: None | bpy.types.Action, bake_options
85
85
  ) -> bpy.types.Action:
86
86
  """An coroutine that bakes action for a single object.
87
87
 
@@ -89,18 +89,21 @@ def bake_action_iter(
89
89
  :type obj: bpy.types.Object
90
90
  :param action: An action to bake the data into, or None for a new action
91
91
  to be created.
92
- :type action: bpy.types.Action
92
+ :type action: None | bpy.types.Action
93
93
  :param bake_options: Boolean options of what to include into the action bake.
94
94
  :return: an action or None
95
95
  :rtype: bpy.types.Action
96
96
  """
97
97
 
98
- def bake_action_objects(object_action_pairs, *, frames, bake_options):
98
+ def bake_action_objects(
99
+ object_action_pairs, *, frames, bake_options
100
+ ) -> collections.abc.Sequence[bpy.types.Action]:
99
101
  """A version of `bake_action_objects_iter` that takes frames and returns the output.
100
102
 
101
103
  :param frames: Frames to bake.
102
104
  :param bake_options: Options for baking.
103
105
  :return: A sequence of Action or None types (aligned with object_action_pairs)
106
+ :rtype: collections.abc.Sequence[bpy.types.Action]
104
107
  """
105
108
 
106
109
  def bake_action_objects_iter(object_action_pairs, bake_options):
@@ -11,10 +11,10 @@ def load_image(
11
11
  ncase_cmp: bool = True,
12
12
  convert_callback: typing.Any | None = None,
13
13
  verbose=False,
14
- relpath: str | None = None,
14
+ relpath: None | str | None = None,
15
15
  check_existing: bool = False,
16
16
  force_reload: bool = False,
17
- ) -> bpy.types.Image:
17
+ ) -> None | bpy.types.Image:
18
18
  """Return an image from the file path with options to search multiple paths
19
19
  and return a placeholder if its not found.
20
20
 
@@ -37,7 +37,7 @@ def load_image(
37
37
  For formats blender can read, simply return the path that is given.
38
38
  :type convert_callback: typing.Any | None
39
39
  :param relpath: If not None, make the file relative to this path.
40
- :type relpath: str | None
40
+ :type relpath: None | str | None
41
41
  :param check_existing: If true,
42
42
  returns already loaded image datablock if possible
43
43
  (based on file path).
@@ -47,5 +47,5 @@ def load_image(
47
47
  is also enabled).
48
48
  :type force_reload: bool
49
49
  :return: an image or None
50
- :rtype: bpy.types.Image
50
+ :rtype: None | bpy.types.Image
51
51
  """
@@ -62,13 +62,14 @@ def axis_conversion_ensure(
62
62
  """
63
63
 
64
64
  def create_derived_objects(
65
- depsgraph: bpy.types.Depsgraph, objects
65
+ depsgraph: bpy.types.Depsgraph, objects: collections.abc.Sequence[bpy.types.Object]
66
66
  ) -> dict[bpy.types.Object, list[tuple[bpy.types.Object, mathutils.Matrix]]]:
67
67
  """This function takes a sequence of objects, returning their instances.
68
68
 
69
69
  :param depsgraph: The evaluated depsgraph.
70
70
  :type depsgraph: bpy.types.Depsgraph
71
71
  :param objects: A sequencer of objects.
72
+ :type objects: collections.abc.Sequence[bpy.types.Object]
72
73
  :return: A dictionary where each key is an object from objects,
73
74
  values are lists of (object, matrix) tuples representing instances.
74
75
  :rtype: dict[bpy.types.Object, list[tuple[bpy.types.Object, mathutils.Matrix]]]
@@ -87,7 +88,7 @@ def path_reference(
87
88
  mode: str = "AUTO",
88
89
  copy_subdir: str = "",
89
90
  copy_set=None,
90
- library: bpy.types.Library | None = None,
91
+ library: None | bpy.types.Library | None = None,
91
92
  ) -> str:
92
93
  """Return a filepath relative to a destination directory, for use with
93
94
  exporters.
@@ -109,17 +110,17 @@ def path_reference(
109
110
  :param copy_set: collect from/to pairs when mode='COPY',
110
111
  pass to path_reference_copy when exporting is done.
111
112
  :param library: The library this path is relative to.
112
- :type library: bpy.types.Library | None
113
+ :type library: None | bpy.types.Library | None
113
114
  :return: the new filepath.
114
115
  :rtype: str
115
116
  """
116
117
 
117
- def path_reference_copy(copy_set, report: collections.abc.Callable = print):
118
+ def path_reference_copy(copy_set, report: collections.abc.Callable[str, None] = print):
118
119
  """Execute copying files of path_reference
119
120
 
120
121
  :param copy_set: set of (from, to) pairs to copy.
121
122
  :param report: function used for reporting warnings, takes a string argument.
122
- :type report: collections.abc.Callable
123
+ :type report: collections.abc.Callable[str, None]
123
124
  """
124
125
 
125
126
  def poll_file_object_drop(context):