fake-bpy-module 20241111__py3-none-any.whl → 20241112__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 +53 -11
- bpy/typing/__init__.pyi +1 -1
- {fake_bpy_module-20241111.dist-info → fake_bpy_module-20241112.dist-info}/METADATA +1 -1
- {fake_bpy_module-20241111.dist-info → fake_bpy_module-20241112.dist-info}/RECORD +6 -6
- {fake_bpy_module-20241111.dist-info → fake_bpy_module-20241112.dist-info}/WHEEL +1 -1
- {fake_bpy_module-20241111.dist-info → fake_bpy_module-20241112.dist-info}/top_level.txt +0 -0
bpy/types/__init__.pyi
CHANGED
|
@@ -80869,11 +80869,7 @@ The function should return {'FINISHED'}
|
|
|
80869
80869
|
|
|
80870
80870
|
, the latter
|
|
80871
80871
|
meaning that operator execution was aborted without making any changes, and
|
|
80872
|
-
|
|
80873
|
-
have already been made, use the {'FINISHED'}
|
|
80874
|
-
|
|
80875
|
-
return code, or the behavior
|
|
80876
|
-
of undo will be confusing for the user.
|
|
80872
|
+
that no undo step will created (see next example for more info about undo).
|
|
80877
80873
|
|
|
80878
80874
|
[NOTE]
|
|
80879
80875
|
Operator subclasses must be registered before accessing them from blender.
|
|
@@ -80881,6 +80877,52 @@ Operator subclasses must be registered before accessing them from blender.
|
|
|
80881
80877
|
```../examples/bpy.types.Operator.py```
|
|
80882
80878
|
|
|
80883
80879
|
|
|
80880
|
+
--------------------
|
|
80881
|
+
|
|
80882
|
+
Any operator modifying Blender data should enable the 'UNDO'
|
|
80883
|
+
|
|
80884
|
+
option.
|
|
80885
|
+
This will make Blender automatically create an undo step when the operator
|
|
80886
|
+
finishes its execute
|
|
80887
|
+
|
|
80888
|
+
(or invoke
|
|
80889
|
+
|
|
80890
|
+
, see below) functions, and returns
|
|
80891
|
+
{'FINISHED'}
|
|
80892
|
+
|
|
80893
|
+
.
|
|
80894
|
+
|
|
80895
|
+
Otherwise, no undo step will be created, which will at best corrupt the
|
|
80896
|
+
undo stack and confuse the user (since modifications done by the operator
|
|
80897
|
+
may either not be undoable, or be undone together with other edits done
|
|
80898
|
+
before). In many cases, this can even lead to data corruption and crashes.
|
|
80899
|
+
|
|
80900
|
+
Note that when an operator returns {'CANCELLED'}
|
|
80901
|
+
|
|
80902
|
+
, no undo step will be
|
|
80903
|
+
created. This means that if an error occurs *after* modifying some data
|
|
80904
|
+
already, it is better to return {'FINISHED'}
|
|
80905
|
+
|
|
80906
|
+
, unless it is possible to
|
|
80907
|
+
fully undo the changes before returning.
|
|
80908
|
+
|
|
80909
|
+
[NOTE]
|
|
80910
|
+
Most examples in this page do not do any edit to Blender data, which is
|
|
80911
|
+
why it is safe to keep the default bl_options
|
|
80912
|
+
|
|
80913
|
+
value for these operators.
|
|
80914
|
+
|
|
80915
|
+
[NOTE]
|
|
80916
|
+
In some complex cases, the automatic undo step created on operator exit may
|
|
80917
|
+
not be enough. For example, if the operator does mode switching, or calls
|
|
80918
|
+
other operators that should create an extra undo step, etc.
|
|
80919
|
+
Such manual undo push is possible using the bpy.ops.ed.undo_push
|
|
80920
|
+
function. Be careful though, this is considered an advanced feature and
|
|
80921
|
+
requires some understanding of the actual undo system in Blender code.
|
|
80922
|
+
|
|
80923
|
+
```../examples/bpy.types.Operator.1.py```
|
|
80924
|
+
|
|
80925
|
+
|
|
80884
80926
|
--------------------
|
|
80885
80927
|
|
|
80886
80928
|
Operator.invoke is used to initialize the operator from the context
|
|
@@ -80899,7 +80941,7 @@ to typical class properties because blender registers them with the
|
|
|
80899
80941
|
operator, to use as arguments when called, saved for operator undo/redo and
|
|
80900
80942
|
automatically added into the user interface.
|
|
80901
80943
|
|
|
80902
|
-
```../examples/bpy.types.Operator.
|
|
80944
|
+
```../examples/bpy.types.Operator.2.py```
|
|
80903
80945
|
|
|
80904
80946
|
|
|
80905
80947
|
--------------------
|
|
@@ -80918,14 +80960,14 @@ user confirms.
|
|
|
80918
80960
|
The Operator.poll function is optional, used to check if the operator
|
|
80919
80961
|
can run.
|
|
80920
80962
|
|
|
80921
|
-
```../examples/bpy.types.Operator.
|
|
80963
|
+
```../examples/bpy.types.Operator.3.py```
|
|
80922
80964
|
|
|
80923
80965
|
|
|
80924
80966
|
--------------------
|
|
80925
80967
|
|
|
80926
80968
|
This operator uses its Operator.invoke function to call a popup.
|
|
80927
80969
|
|
|
80928
|
-
```../examples/bpy.types.Operator.
|
|
80970
|
+
```../examples/bpy.types.Operator.4.py```
|
|
80929
80971
|
|
|
80930
80972
|
|
|
80931
80973
|
--------------------
|
|
@@ -80937,7 +80979,7 @@ Operator.draw function.
|
|
|
80937
80979
|
This works like the Panel and Menu draw functions, its used
|
|
80938
80980
|
for dialogs and file selectors.
|
|
80939
80981
|
|
|
80940
|
-
```../examples/bpy.types.Operator.
|
|
80982
|
+
```../examples/bpy.types.Operator.5.py```
|
|
80941
80983
|
|
|
80942
80984
|
|
|
80943
80985
|
--------------------
|
|
@@ -80968,7 +81010,7 @@ Notice __init__()
|
|
|
80968
81010
|
For other operator types they are not useful but for modal operators they will
|
|
80969
81011
|
be called before the Operator.invoke and after the operator finishes.
|
|
80970
81012
|
|
|
80971
|
-
```../examples/bpy.types.Operator.
|
|
81013
|
+
```../examples/bpy.types.Operator.6.py```
|
|
80972
81014
|
|
|
80973
81015
|
|
|
80974
81016
|
--------------------
|
|
@@ -80976,7 +81018,7 @@ be called before the Operator.invoke and after the operator finishes.
|
|
|
80976
81018
|
You may want to have an operator prompt the user to select an item
|
|
80977
81019
|
from a search field, this can be done using bpy.types.Operator.invoke_search_popup.
|
|
80978
81020
|
|
|
80979
|
-
```../examples/bpy.types.Operator.
|
|
81021
|
+
```../examples/bpy.types.Operator.7.py```
|
|
80980
81022
|
|
|
80981
81023
|
|
|
80982
81024
|
--------------------
|
bpy/typing/__init__.pyi
CHANGED
|
@@ -2425,7 +2425,7 @@ type OperatorReturnItems = typing.Literal[
|
|
|
2425
2425
|
]
|
|
2426
2426
|
type OperatorTypeFlagItems = typing.Literal[
|
|
2427
2427
|
"REGISTER", # Register.Display in the info window and support the redo toolbar panel.
|
|
2428
|
-
"UNDO", # Undo.Push an undo event (needed for operator redo).
|
|
2428
|
+
"UNDO", # Undo.Push an undo event when the operator returns `FINISHED` (needed for operator redo, mandatory if the operator modifies Blender data).
|
|
2429
2429
|
"UNDO_GROUPED", # Grouped Undo.Push a single undo event for repeated instances of this operator.
|
|
2430
2430
|
"BLOCKING", # Blocking.Block anything else from using the cursor.
|
|
2431
2431
|
"MACRO", # Macro.Use to check if an operator is a macro.
|
|
@@ -275,8 +275,8 @@ bpy/ops/workspace/__init__.pyi,sha256=4qG0-HkVfaGfdBe9QvBCKUox03nb1ZfeV1fz-0b3KJ
|
|
|
275
275
|
bpy/ops/world/__init__.pyi,sha256=ytaDhwJ-K4SbWylChL1za6lvMNM2-RX1S0BR7892Afg,946
|
|
276
276
|
bpy/path/__init__.pyi,sha256=b_M-IUy-VEWMDZJH0bP9P-HHcLLcQo59S1dARRQrP9E,5064
|
|
277
277
|
bpy/props/__init__.pyi,sha256=3sLdRLi978cZRz7xJRc1MachtPUAo0Ddl9RejShVb-g,30492
|
|
278
|
-
bpy/types/__init__.pyi,sha256=
|
|
279
|
-
bpy/typing/__init__.pyi,sha256=
|
|
278
|
+
bpy/types/__init__.pyi,sha256=VKXJJCdWYVCeiECjupa60j8zlGHZTARRtGAXx2iDrHs,5362946
|
|
279
|
+
bpy/typing/__init__.pyi,sha256=gsUFQbZl7Gutj4Syr6Pqk3uZfsSsTa-vqvr2Mvq3AeY,138837
|
|
280
280
|
bpy/utils/__init__.pyi,sha256=XXoE6J8aW13NQ-2FvnFORXyNVUFfO8hSno-xfgJ6ZNI,13078
|
|
281
281
|
bpy/utils/previews/__init__.pyi,sha256=XEThA7jxMWet1sPTJ3mmngM6LdAdKiIVSZOKbCsbvzw,2217
|
|
282
282
|
bpy/utils/units/__init__.pyi,sha256=-NsCsGdfcIsC2lnZwzUrQFe1CXdnSjA80MCWSSxwbbk,2578
|
|
@@ -358,7 +358,7 @@ rna_prop_ui/__init__.pyi,sha256=lShhkbbeJ_ANi2dy4J4HIkyp1HZrMqCfhcf8QpAQsj0,1281
|
|
|
358
358
|
rna_prop_ui/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
359
359
|
rna_xml/__init__.pyi,sha256=idYsAZj-_egBKMA2pQl2P9IoNhZxXIkBSALFuq-ylO8,577
|
|
360
360
|
rna_xml/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
361
|
-
fake_bpy_module-
|
|
362
|
-
fake_bpy_module-
|
|
363
|
-
fake_bpy_module-
|
|
364
|
-
fake_bpy_module-
|
|
361
|
+
fake_bpy_module-20241112.dist-info/METADATA,sha256=czNsJMLUgw8tpPOhnq-k08cHQibI-5OEOK7odun4I88,7289
|
|
362
|
+
fake_bpy_module-20241112.dist-info/WHEEL,sha256=a7TGlA-5DaHMRrarXjVbQagU3Man_dCnGIWMJr5kRWo,91
|
|
363
|
+
fake_bpy_module-20241112.dist-info/top_level.txt,sha256=SZm3DVRKif7dFSjYKiIIg3_7uqjIwRAwOnCIcT4hRNM,500
|
|
364
|
+
fake_bpy_module-20241112.dist-info/RECORD,,
|
|
File without changes
|