fake-bpy-module 20241229__py3-none-any.whl → 20250102__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/props/__init__.pyi CHANGED
@@ -111,9 +111,10 @@ def BoolProperty(
111
111
  override: bpy.typing.PropertyOverrideFlagItems = set(),
112
112
  tags=set(),
113
113
  subtype: bpy.typing.PropertySubtypeNumberItems = "NONE",
114
- update: collections.abc.Callable | None = None,
115
- get: collections.abc.Callable | None = None,
116
- set: collections.abc.Callable | None = None,
114
+ update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None]
115
+ | None = None,
116
+ get: collections.abc.Callable[[bpy.types.bpy_struct], bool] | None = None,
117
+ set: collections.abc.Callable[[bpy.types.bpy_struct, bool], None] | None = None,
117
118
  ):
118
119
  """Returns a new boolean property definition.
119
120
 
@@ -133,13 +134,13 @@ def BoolProperty(
133
134
  :param update: Function to be called when this value is modified,
134
135
  This function must take 2 values (self, context) and return None.
135
136
  Warning there are no safety checks to avoid infinite recursion.
136
- :type update: collections.abc.Callable | None
137
+ :type update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None] | None
137
138
  :param get: Function to be called when this value is 'read',
138
139
  This function must take 1 value (self) and return the value of the property.
139
- :type get: collections.abc.Callable | None
140
+ :type get: collections.abc.Callable[[bpy.types.bpy_struct], bool] | None
140
141
  :param set: Function to be called when this value is 'written',
141
142
  This function must take 2 values (self, value) and return None.
142
- :type set: collections.abc.Callable | None
143
+ :type set: collections.abc.Callable[[bpy.types.bpy_struct, bool], None] | None
143
144
  """
144
145
 
145
146
  def BoolVectorProperty(
@@ -147,15 +148,20 @@ def BoolVectorProperty(
147
148
  name: str | None = "",
148
149
  description: str | None = "",
149
150
  translation_context: str | None = "*",
150
- default=(False, False, False),
151
+ default: collections.abc.Sequence[bool] | None = (False, False, False),
151
152
  options: bpy.typing.PropertyFlagItems = {"ANIMATABLE"},
152
153
  override: bpy.typing.PropertyOverrideFlagItems = set(),
153
154
  tags=set(),
154
155
  subtype: bpy.typing.PropertySubtypeNumberArrayItems = "NONE",
155
- size: int | None = 3,
156
- update: collections.abc.Callable | None = None,
157
- get: collections.abc.Callable | None = None,
158
- set: collections.abc.Callable | None = None,
156
+ size: collections.abc.Sequence[int] | int | None = 3,
157
+ update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None]
158
+ | None = None,
159
+ get: collections.abc.Callable[
160
+ [bpy.types.bpy_struct], collections.abc.Sequence[bool]
161
+ ]
162
+ | None = None,
163
+ set: collections.abc.Callable[[bpy.types.bpy_struct, tuple[bool, int]], None]
164
+ | None = None,
159
165
  ):
160
166
  """Returns a new vector boolean property definition.
161
167
 
@@ -166,6 +172,7 @@ def BoolVectorProperty(
166
172
  :param translation_context: Text used as context to disambiguate translations.
167
173
  :type translation_context: str | None
168
174
  :param default: sequence of booleans the length of size.
175
+ :type default: collections.abc.Sequence[bool] | None
169
176
  :param options: Enumerator in `rna_enum_property_flag_items`.
170
177
  :type options: bpy.typing.PropertyFlagItems
171
178
  :param override: Enumerator in `rna_enum_property_override_flag_items`.
@@ -174,17 +181,17 @@ def BoolVectorProperty(
174
181
  :param subtype: Enumerator in `rna_enum_property_subtype_number_array_items`.
175
182
  :type subtype: bpy.typing.PropertySubtypeNumberArrayItems
176
183
  :param size: Vector dimensions in [1, 32]. An int sequence can be used to define multi-dimension arrays.
177
- :type size: int | None
184
+ :type size: collections.abc.Sequence[int] | int | None
178
185
  :param update: Function to be called when this value is modified,
179
186
  This function must take 2 values (self, context) and return None.
180
187
  Warning there are no safety checks to avoid infinite recursion.
181
- :type update: collections.abc.Callable | None
188
+ :type update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None] | None
182
189
  :param get: Function to be called when this value is 'read',
183
190
  This function must take 1 value (self) and return the value of the property.
184
- :type get: collections.abc.Callable | None
191
+ :type get: collections.abc.Callable[[bpy.types.bpy_struct], collections.abc.Sequence[bool]] | None
185
192
  :param set: Function to be called when this value is 'written',
186
193
  This function must take 2 values (self, value) and return None.
187
- :type set: collections.abc.Callable | None
194
+ :type set: collections.abc.Callable[[bpy.types.bpy_struct, tuple[bool, int]], None] | None
188
195
  """
189
196
 
190
197
  def CollectionProperty(
@@ -238,9 +245,10 @@ def EnumProperty(
238
245
  options: bpy.typing.PropertyFlagEnumItems = {"ANIMATABLE"},
239
246
  override: bpy.typing.PropertyOverrideFlagItems = set(),
240
247
  tags=set(),
241
- update: collections.abc.Callable | None = None,
242
- get: collections.abc.Callable | None = None,
243
- set: collections.abc.Callable | None = None,
248
+ update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None]
249
+ | None = None,
250
+ get: collections.abc.Callable[[bpy.types.bpy_struct], int] | None = None,
251
+ set: collections.abc.Callable[[bpy.types.bpy_struct, int], None] | None = None,
244
252
  ):
245
253
  """Returns a new enumerator property definition.
246
254
 
@@ -305,13 +313,13 @@ def EnumProperty(
305
313
  :param update: Function to be called when this value is modified,
306
314
  This function must take 2 values (self, context) and return None.
307
315
  Warning there are no safety checks to avoid infinite recursion.
308
- :type update: collections.abc.Callable | None
316
+ :type update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None] | None
309
317
  :param get: Function to be called when this value is 'read',
310
318
  This function must take 1 value (self) and return the value of the property.
311
- :type get: collections.abc.Callable | None
319
+ :type get: collections.abc.Callable[[bpy.types.bpy_struct], int] | None
312
320
  :param set: Function to be called when this value is 'written',
313
321
  This function must take 2 values (self, value) and return None.
314
- :type set: collections.abc.Callable | None
322
+ :type set: collections.abc.Callable[[bpy.types.bpy_struct, int], None] | None
315
323
  """
316
324
 
317
325
  def FloatProperty(
@@ -331,9 +339,10 @@ def FloatProperty(
331
339
  tags=set(),
332
340
  subtype: bpy.typing.PropertySubtypeNumberItems = "NONE",
333
341
  unit: bpy.typing.PropertyUnitItems = "NONE",
334
- update: collections.abc.Callable | None = None,
335
- get: collections.abc.Callable | None = None,
336
- set: collections.abc.Callable | None = None,
342
+ update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None]
343
+ | None = None,
344
+ get: collections.abc.Callable[[bpy.types.bpy_struct], float] | None = None,
345
+ set: collections.abc.Callable[[bpy.types.bpy_struct, float], None] | None = None,
337
346
  ):
338
347
  """Returns a new float (single precision) property definition.
339
348
 
@@ -367,13 +376,13 @@ def FloatProperty(
367
376
  :param update: Function to be called when this value is modified,
368
377
  This function must take 2 values (self, context) and return None.
369
378
  Warning there are no safety checks to avoid infinite recursion.
370
- :type update: collections.abc.Callable | None
379
+ :type update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None] | None
371
380
  :param get: Function to be called when this value is 'read',
372
381
  This function must take 1 value (self) and return the value of the property.
373
- :type get: collections.abc.Callable | None
382
+ :type get: collections.abc.Callable[[bpy.types.bpy_struct], float] | None
374
383
  :param set: Function to be called when this value is 'written',
375
384
  This function must take 2 values (self, value) and return None.
376
- :type set: collections.abc.Callable | None
385
+ :type set: collections.abc.Callable[[bpy.types.bpy_struct, float], None] | None
377
386
  """
378
387
 
379
388
  def FloatVectorProperty(
@@ -381,7 +390,7 @@ def FloatVectorProperty(
381
390
  name: str | None = "",
382
391
  description: str | None = "",
383
392
  translation_context: str | None = "*",
384
- default=(0.0, 0.0, 0.0),
393
+ default: collections.abc.Sequence[float] | None = (0.0, 0.0, 0.0),
385
394
  min: float | None = sys.float_info.min,
386
395
  max: float | None = sys.float_info.max,
387
396
  soft_min: float | None = sys.float_info.min,
@@ -393,10 +402,15 @@ def FloatVectorProperty(
393
402
  tags=set(),
394
403
  subtype: bpy.typing.PropertySubtypeNumberArrayItems = "NONE",
395
404
  unit: bpy.typing.PropertyUnitItems = "NONE",
396
- size: int | None = 3,
397
- update: collections.abc.Callable | None = None,
398
- get: collections.abc.Callable | None = None,
399
- set: collections.abc.Callable | None = None,
405
+ size: collections.abc.Sequence[int] | int | None = 3,
406
+ update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None]
407
+ | None = None,
408
+ get: collections.abc.Callable[
409
+ [bpy.types.bpy_struct], collections.abc.Sequence[float]
410
+ ]
411
+ | None = None,
412
+ set: collections.abc.Callable[[bpy.types.bpy_struct, tuple[float, int]], None]
413
+ | None = None,
400
414
  ):
401
415
  """Returns a new vector float property definition.
402
416
 
@@ -407,6 +421,7 @@ def FloatVectorProperty(
407
421
  :param translation_context: Text used as context to disambiguate translations.
408
422
  :type translation_context: str | None
409
423
  :param default: Sequence of floats the length of size.
424
+ :type default: collections.abc.Sequence[float] | None
410
425
  :param min: Hard minimum, trying to assign a value below will silently assign this minimum instead.
411
426
  :type min: float | None
412
427
  :param max: Hard maximum, trying to assign a value above will silently assign this maximum instead.
@@ -429,17 +444,17 @@ def FloatVectorProperty(
429
444
  :param unit: Enumerator in `rna_enum_property_unit_items`.
430
445
  :type unit: bpy.typing.PropertyUnitItems
431
446
  :param size: Vector dimensions in [1, 32]. An int sequence can be used to define multi-dimension arrays.
432
- :type size: int | None
447
+ :type size: collections.abc.Sequence[int] | int | None
433
448
  :param update: Function to be called when this value is modified,
434
449
  This function must take 2 values (self, context) and return None.
435
450
  Warning there are no safety checks to avoid infinite recursion.
436
- :type update: collections.abc.Callable | None
451
+ :type update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None] | None
437
452
  :param get: Function to be called when this value is 'read',
438
453
  This function must take 1 value (self) and return the value of the property.
439
- :type get: collections.abc.Callable | None
454
+ :type get: collections.abc.Callable[[bpy.types.bpy_struct], collections.abc.Sequence[float]] | None
440
455
  :param set: Function to be called when this value is 'written',
441
456
  This function must take 2 values (self, value) and return None.
442
- :type set: collections.abc.Callable | None
457
+ :type set: collections.abc.Callable[[bpy.types.bpy_struct, tuple[float, int]], None] | None
443
458
  """
444
459
 
445
460
  def IntProperty(
@@ -457,9 +472,10 @@ def IntProperty(
457
472
  override: bpy.typing.PropertyOverrideFlagItems = set(),
458
473
  tags=set(),
459
474
  subtype: bpy.typing.PropertySubtypeNumberItems = "NONE",
460
- update: collections.abc.Callable | None = None,
461
- get: collections.abc.Callable | None = None,
462
- set: collections.abc.Callable | None = None,
475
+ update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None]
476
+ | None = None,
477
+ get: collections.abc.Callable[[bpy.types.bpy_struct], int] | None = None,
478
+ set: collections.abc.Callable[[bpy.types.bpy_struct, int], None] | None = None,
463
479
  ):
464
480
  """Returns a new int property definition.
465
481
 
@@ -489,13 +505,13 @@ def IntProperty(
489
505
  :param update: Function to be called when this value is modified,
490
506
  This function must take 2 values (self, context) and return None.
491
507
  Warning there are no safety checks to avoid infinite recursion.
492
- :type update: collections.abc.Callable | None
508
+ :type update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None] | None
493
509
  :param get: Function to be called when this value is 'read',
494
510
  This function must take 1 value (self) and return the value of the property.
495
- :type get: collections.abc.Callable | None
511
+ :type get: collections.abc.Callable[[bpy.types.bpy_struct], int] | None
496
512
  :param set: Function to be called when this value is 'written',
497
513
  This function must take 2 values (self, value) and return None.
498
- :type set: collections.abc.Callable | None
514
+ :type set: collections.abc.Callable[[bpy.types.bpy_struct, int], None] | None
499
515
  """
500
516
 
501
517
  def IntVectorProperty(
@@ -503,7 +519,7 @@ def IntVectorProperty(
503
519
  name: str | None = "",
504
520
  description: str | None = "",
505
521
  translation_context: str | None = "*",
506
- default=(0, 0, 0),
522
+ default: collections.abc.Sequence[int] | None = (0, 0, 0),
507
523
  min: int | None = None,
508
524
  max: int | None = None,
509
525
  soft_min: int | None = None,
@@ -513,10 +529,13 @@ def IntVectorProperty(
513
529
  override: bpy.typing.PropertyOverrideFlagItems = set(),
514
530
  tags=set(),
515
531
  subtype: bpy.typing.PropertySubtypeNumberArrayItems = "NONE",
516
- size: int | None = 3,
517
- update: collections.abc.Callable | None = None,
518
- get: collections.abc.Callable | None = None,
519
- set: collections.abc.Callable | None = None,
532
+ size: collections.abc.Sequence[int] | int | None = 3,
533
+ update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None]
534
+ | None = None,
535
+ get: collections.abc.Callable[[bpy.types.bpy_struct], collections.abc.Sequence[int]]
536
+ | None = None,
537
+ set: collections.abc.Callable[[bpy.types.bpy_struct, tuple[int, int]], None]
538
+ | None = None,
520
539
  ):
521
540
  """Returns a new vector int property definition.
522
541
 
@@ -527,6 +546,7 @@ def IntVectorProperty(
527
546
  :param translation_context: Text used as context to disambiguate translations.
528
547
  :type translation_context: str | None
529
548
  :param default: sequence of ints the length of size.
549
+ :type default: collections.abc.Sequence[int] | None
530
550
  :param min: Hard minimum, trying to assign a value below will silently assign this minimum instead.
531
551
  :type min: int | None
532
552
  :param max: Hard maximum, trying to assign a value above will silently assign this maximum instead.
@@ -545,17 +565,17 @@ def IntVectorProperty(
545
565
  :param subtype: Enumerator in `rna_enum_property_subtype_number_array_items`.
546
566
  :type subtype: bpy.typing.PropertySubtypeNumberArrayItems
547
567
  :param size: Vector dimensions in [1, 32]. An int sequence can be used to define multi-dimension arrays.
548
- :type size: int | None
568
+ :type size: collections.abc.Sequence[int] | int | None
549
569
  :param update: Function to be called when this value is modified,
550
570
  This function must take 2 values (self, context) and return None.
551
571
  Warning there are no safety checks to avoid infinite recursion.
552
- :type update: collections.abc.Callable | None
572
+ :type update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None] | None
553
573
  :param get: Function to be called when this value is 'read',
554
574
  This function must take 1 value (self) and return the value of the property.
555
- :type get: collections.abc.Callable | None
575
+ :type get: collections.abc.Callable[[bpy.types.bpy_struct], collections.abc.Sequence[int]] | None
556
576
  :param set: Function to be called when this value is 'written',
557
577
  This function must take 2 values (self, value) and return None.
558
- :type set: collections.abc.Callable | None
578
+ :type set: collections.abc.Callable[[bpy.types.bpy_struct, tuple[int, int]], None] | None
559
579
  """
560
580
 
561
581
  def PointerProperty(
@@ -567,8 +587,10 @@ def PointerProperty(
567
587
  options: bpy.typing.PropertyFlagItems = {"ANIMATABLE"},
568
588
  override: bpy.typing.PropertyOverrideFlagItems = set(),
569
589
  tags=set(),
570
- poll: collections.abc.Callable | None = None,
571
- update: collections.abc.Callable | None = None,
590
+ poll: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.ID], bool]
591
+ | None = None,
592
+ update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None]
593
+ | None = None,
572
594
  ):
573
595
  """Returns a new pointer property definition.
574
596
 
@@ -588,11 +610,11 @@ def PointerProperty(
588
610
  :param poll: function to be called to determine whether an item is valid for this property.
589
611
  The function must take 2 values (self, object) and return Bool.
590
612
  Note that the poll return value will be checked only when assigning an item from the UI, but it is still possible to assign an "invalid" item to the property directly.
591
- :type poll: collections.abc.Callable | None
613
+ :type poll: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.ID], bool] | None
592
614
  :param update: Function to be called when this value is modified,
593
615
  This function must take 2 values (self, context) and return None.
594
616
  Warning there are no safety checks to avoid infinite recursion.
595
- :type update: collections.abc.Callable | None
617
+ :type update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None] | None
596
618
  """
597
619
 
598
620
  def RemoveProperty(*, cls: typing.Any | None, attr: str | None):
@@ -615,10 +637,12 @@ def StringProperty(
615
637
  override: bpy.typing.PropertyOverrideFlagItems = set(),
616
638
  tags=set(),
617
639
  subtype: bpy.typing.PropertySubtypeStringItems = "NONE",
618
- update: collections.abc.Callable | None = None,
619
- get: collections.abc.Callable | None = None,
620
- set: collections.abc.Callable | None = None,
621
- search: collections.abc.Callable | None = None,
640
+ update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None]
641
+ | None = None,
642
+ get: collections.abc.Callable[[bpy.types.bpy_struct], str] | None = None,
643
+ set: collections.abc.Callable[[bpy.types.bpy_struct, str], None] | None = None,
644
+ search: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context, str]]
645
+ | None = None,
622
646
  search_options={"SUGGESTION"},
623
647
  ):
624
648
  """Returns a new string property definition.
@@ -643,13 +667,13 @@ def StringProperty(
643
667
  :param update: Function to be called when this value is modified,
644
668
  This function must take 2 values (self, context) and return None.
645
669
  Warning there are no safety checks to avoid infinite recursion.
646
- :type update: collections.abc.Callable | None
670
+ :type update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None] | None
647
671
  :param get: Function to be called when this value is 'read',
648
672
  This function must take 1 value (self) and return the value of the property.
649
- :type get: collections.abc.Callable | None
673
+ :type get: collections.abc.Callable[[bpy.types.bpy_struct], str] | None
650
674
  :param set: Function to be called when this value is 'written',
651
675
  This function must take 2 values (self, value) and return None.
652
- :type set: collections.abc.Callable | None
676
+ :type set: collections.abc.Callable[[bpy.types.bpy_struct, str], None] | None
653
677
  :param search: Function to be called to show candidates for this string (shown in the UI).
654
678
  This function must take 3 values (self, context, edit_text)
655
679
  and return a sequence, iterator or generator where each item must be:
@@ -658,7 +682,7 @@ def StringProperty(
658
682
 
659
683
  A tuple-pair of strings, where the first is a candidate and the second
660
684
  is additional information about the candidate.
661
- :type search: collections.abc.Callable | None
685
+ :type search: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context, str]] | None
662
686
  :param search_options: Set of strings in:
663
687
 
664
688
  'SORT' sorts the resulting items.