fake-bpy-module 20250828__py3-none-any.whl → 20260119__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.
- {bl_console_utils → _bl_console_utils}/autocomplete/complete_calltip/__init__.pyi +0 -13
- {bl_console_utils → _bl_console_utils}/autocomplete/complete_import/__init__.pyi +0 -5
- {bl_console_utils → _bl_console_utils}/autocomplete/complete_namespace/__init__.pyi +0 -11
- {bl_console_utils → _bl_console_utils}/autocomplete/intellisense/__init__.pyi +0 -10
- {bl_i18n_utils → _bl_i18n_utils}/__init__.pyi +1 -0
- {bl_i18n_utils → _bl_i18n_utils}/bl_extract_messages/__init__.pyi +1 -0
- {bl_i18n_utils → _bl_i18n_utils}/settings/__init__.pyi +2 -0
- _bl_i18n_utils/utils_spell_check/__init__.pyi +22 -0
- {bl_ui_utils → _bl_ui_utils}/__init__.pyi +1 -0
- _bpy_internal/__init__.pyi +3 -1
- _bpy_internal/disk_file_hash_service/__init__.pyi +19 -0
- _bpy_internal/disk_file_hash_service/backend_sqlite/__init__.pyi +48 -0
- _bpy_internal/disk_file_hash_service/hash_service/__init__.pyi +64 -0
- _bpy_internal/disk_file_hash_service/types/__init__.pyi +53 -0
- _bpy_internal/filesystem/__init__.pyi +5 -0
- _bpy_internal/filesystem/locking/__init__.pyi +28 -0
- _bpy_internal/platform/__init__.pyi +5 -0
- _bpy_types/__init__.pyi +115 -117
- {rna_info → _rna_info}/__init__.pyi +0 -1
- addon_utils/__init__.pyi +0 -13
- aud/__init__.pyi +66 -142
- bl_app_templates_system/Storyboarding/__init__.pyi +11 -0
- bl_app_templates_system/__init__.pyi +5 -0
- bl_app_templates_system/py.typed +0 -0
- bl_math/__init__.pyi +2 -12
- bl_operators/__init__.pyi +1 -0
- bl_operators/add_mesh_torus/__init__.pyi +0 -2
- bl_operators/anim/__init__.pyi +47 -24
- bl_operators/assets/__init__.pyi +0 -6
- bl_operators/bone_selection_sets/__init__.pyi +0 -28
- bl_operators/clip/__init__.pyi +0 -20
- bl_operators/connect_to_output/__init__.pyi +0 -2
- bl_operators/console/__init__.pyi +0 -10
- bl_operators/constraint/__init__.pyi +0 -8
- bl_operators/copy_global_transform/__init__.pyi +261 -0
- bl_operators/file/__init__.pyi +0 -6
- bl_operators/freestyle/__init__.pyi +0 -8
- bl_operators/geometry_nodes/__init__.pyi +0 -8
- bl_operators/grease_pencil/__init__.pyi +0 -2
- bl_operators/image/__init__.pyi +0 -10
- bl_operators/image_as_planes/__init__.pyi +0 -4
- bl_operators/mesh/__init__.pyi +0 -47
- bl_operators/node/__init__.pyi +277 -57
- bl_operators/object/__init__.pyi +0 -37
- bl_operators/object_align/__init__.pyi +0 -2
- bl_operators/object_quick_effects/__init__.pyi +0 -8
- bl_operators/object_randomize_transform/__init__.pyi +0 -2
- bl_operators/presets/__init__.pyi +1 -51
- bl_operators/rigidbody/__init__.pyi +0 -6
- bl_operators/screen_play_rendered_anim/__init__.pyi +0 -2
- bl_operators/sequencer/__init__.pyi +0 -16
- bl_operators/spreadsheet/__init__.pyi +0 -2
- bl_operators/userpref/__init__.pyi +0 -50
- bl_operators/uvcalc_follow_active/__init__.pyi +1 -3
- bl_operators/uvcalc_lightmap/__init__.pyi +0 -2
- bl_operators/uvcalc_transform/__init__.pyi +21 -12
- bl_operators/vertexpaint_dirt/__init__.pyi +0 -2
- bl_operators/view3d/__init__.pyi +0 -16
- bl_operators/wm/__init__.pyi +0 -92
- bl_operators/world/__init__.pyi +0 -2
- bl_ui/__init__.pyi +3 -4
- bl_ui/anim/__init__.pyi +0 -2
- bl_ui/asset_shelf/__init__.pyi +0 -2
- bl_ui/generic_ui_list/__init__.pyi +1 -17
- bl_ui/node_add_menu/__init__.pyi +261 -6
- bl_ui/node_add_menu_compositor/__init__.pyi +96 -80
- bl_ui/node_add_menu_geometry/__init__.pyi +266 -306
- bl_ui/node_add_menu_shader/__init__.pyi +49 -50
- bl_ui/node_add_menu_texture/__init__.pyi +16 -62
- bl_ui/properties_collection/__init__.pyi +0 -14
- bl_ui/properties_constraint/__init__.pyi +55 -209
- bl_ui/properties_data_armature/__init__.pyi +0 -36
- bl_ui/properties_data_bone/__init__.pyi +0 -20
- bl_ui/properties_data_camera/__init__.pyi +0 -30
- bl_ui/properties_data_curve/__init__.pyi +0 -30
- bl_ui/properties_data_curves/__init__.pyi +0 -16
- bl_ui/properties_data_empty/__init__.pyi +0 -4
- bl_ui/properties_data_grease_pencil/__init__.pyi +0 -40
- bl_ui/properties_data_lattice/__init__.pyi +0 -8
- bl_ui/properties_data_light/__init__.pyi +0 -20
- bl_ui/properties_data_lightprobe/__init__.pyi +0 -28
- bl_ui/properties_data_mesh/__init__.pyi +1 -42
- bl_ui/properties_data_metaball/__init__.pyi +0 -12
- bl_ui/properties_data_modifier/__init__.pyi +12 -19
- bl_ui/properties_data_pointcloud/__init__.pyi +0 -12
- bl_ui/properties_data_shaderfx/__init__.pyi +0 -2
- bl_ui/properties_data_speaker/__init__.pyi +0 -12
- bl_ui/properties_data_volume/__init__.pyi +0 -18
- bl_ui/properties_freestyle/__init__.pyi +0 -50
- bl_ui/properties_grease_pencil_common/__init__.pyi +0 -159
- bl_ui/properties_mask_common/__init__.pyi +0 -14
- bl_ui/properties_material/__init__.pyi +0 -32
- bl_ui/properties_material_gpencil/__init__.pyi +23 -45
- bl_ui/properties_object/__init__.pyi +35 -42
- bl_ui/properties_output/__init__.pyi +0 -40
- bl_ui/properties_paint_common/__init__.pyi +23 -19
- bl_ui/properties_particle/__init__.pyi +0 -106
- bl_ui/properties_physics_cloth/__init__.pyi +0 -28
- bl_ui/properties_physics_common/__init__.pyi +0 -2
- bl_ui/properties_physics_dynamicpaint/__init__.pyi +0 -44
- bl_ui/properties_physics_field/__init__.pyi +0 -20
- bl_ui/properties_physics_fluid/__init__.pyi +0 -56
- bl_ui/properties_physics_geometry_nodes/__init__.pyi +0 -2
- bl_ui/properties_physics_rigidbody/__init__.pyi +0 -16
- bl_ui/properties_physics_rigidbody_constraint/__init__.pyi +0 -26
- bl_ui/properties_physics_softbody/__init__.pyi +0 -30
- bl_ui/properties_render/__init__.pyi +58 -86
- bl_ui/properties_scene/__init__.pyi +0 -34
- bl_ui/properties_strip/__init__.pyi +744 -0
- bl_ui/properties_strip_modifier/__init__.pyi +45 -0
- bl_ui/properties_texture/__init__.pyi +0 -54
- bl_ui/properties_view_layer/__init__.pyi +7 -28
- bl_ui/properties_workspace/__init__.pyi +0 -8
- bl_ui/properties_world/__init__.pyi +0 -22
- bl_ui/space_clip/__init__.pyi +82 -166
- bl_ui/space_console/__init__.pyi +0 -12
- bl_ui/space_dopesheet/__init__.pyi +67 -76
- bl_ui/space_filebrowser/__init__.pyi +0 -60
- bl_ui/space_graph/__init__.pyi +0 -66
- bl_ui/space_image/__init__.pyi +28 -162
- bl_ui/space_info/__init__.pyi +0 -12
- bl_ui/space_nla/__init__.pyi +0 -58
- bl_ui/space_node/__init__.pyi +99 -132
- bl_ui/space_outliner/__init__.pyi +0 -30
- bl_ui/space_properties/__init__.pyi +29 -6
- bl_ui/space_sequencer/__init__.pyi +159 -987
- bl_ui/space_spreadsheet/__init__.pyi +0 -6
- bl_ui/space_statusbar/__init__.pyi +0 -2
- bl_ui/space_text/__init__.pyi +0 -32
- bl_ui/space_time/__init__.pyi +29 -22
- bl_ui/space_toolsystem_toolbar/__init__.pyi +7 -2
- bl_ui/space_topbar/__init__.pyi +7 -52
- bl_ui/space_userpref/__init__.pyi +77 -225
- bl_ui/space_view3d/__init__.pyi +69 -551
- bl_ui/space_view3d_sidebar/__init__.pyi +127 -0
- bl_ui/space_view3d_toolbar/__init__.pyi +22 -799
- bl_ui/utils/__init__.pyi +0 -17
- blf/__init__.pyi +6 -50
- bmesh/__init__.pyi +0 -7
- bmesh/geometry/__init__.pyi +0 -3
- bmesh/ops/__init__.pyi +5 -450
- bmesh/types/__init__.pyi +298 -639
- bmesh/utils/__init__.pyi +16 -43
- bpy/app/__init__.pyi +66 -58
- bpy/app/icons/__init__.pyi +0 -6
- bpy/app/timers/__init__.pyi +0 -6
- bpy/app/translations/__init__.pyi +1 -16
- bpy/msgbus/__init__.pyi +1 -4
- bpy/ops/action/__init__.pyi +17 -186
- bpy/ops/anim/__init__.pyi +38 -279
- bpy/ops/armature/__init__.pyi +20 -191
- bpy/ops/asset/__init__.pyi +11 -97
- bpy/ops/boid/__init__.pyi +7 -38
- bpy/ops/brush/__init__.pyi +3 -104
- bpy/ops/buttons/__init__.pyi +4 -71
- bpy/ops/cachefile/__init__.pyi +2 -63
- bpy/ops/camera/__init__.pyi +0 -11
- bpy/ops/clip/__init__.pyi +43 -427
- bpy/ops/cloth/__init__.pyi +0 -5
- bpy/ops/collection/__init__.pyi +3 -35
- bpy/ops/console/__init__.pyi +10 -88
- bpy/ops/constraint/__init__.pyi +3 -80
- bpy/ops/curve/__init__.pyi +23 -254
- bpy/ops/curves/__init__.pyi +54 -149
- bpy/ops/cycles/__init__.pyi +1 -14
- bpy/ops/dpaint/__init__.pyi +3 -21
- bpy/ops/ed/__init__.pyi +10 -82
- bpy/ops/export_anim/__init__.pyi +2 -10
- bpy/ops/export_scene/__init__.pyi +1 -155
- bpy/ops/extensions/__init__.pyi +15 -150
- bpy/ops/file/__init__.pyi +29 -216
- bpy/ops/fluid/__init__.pyi +13 -70
- bpy/ops/font/__init__.pyi +10 -134
- bpy/ops/geometry/__init__.pyi +3 -124
- bpy/ops/gizmogroup/__init__.pyi +1 -12
- bpy/ops/gpencil/__init__.pyi +5 -49
- bpy/ops/graph/__init__.pyi +20 -315
- bpy/ops/grease_pencil/__init__.pyi +62 -523
- bpy/ops/image/__init__.pyi +19 -379
- bpy/ops/import_anim/__init__.pyi +2 -16
- bpy/ops/import_curve/__init__.pyi +0 -6
- bpy/ops/import_scene/__init__.pyi +0 -50
- bpy/ops/info/__init__.pyi +4 -35
- bpy/ops/lattice/__init__.pyi +3 -33
- bpy/ops/marker/__init__.pyi +4 -49
- bpy/ops/mask/__init__.pyi +17 -176
- bpy/ops/material/__init__.pyi +3 -15
- bpy/ops/mball/__init__.pyi +1 -30
- bpy/ops/mesh/__init__.pyi +34 -932
- bpy/ops/nla/__init__.pyi +22 -183
- bpy/ops/node/__init__.pyi +420 -625
- bpy/ops/object/__init__.pyi +197 -1239
- bpy/ops/outliner/__init__.pyi +47 -327
- bpy/ops/paint/__init__.pyi +29 -282
- bpy/ops/paintcurve/__init__.pyi +4 -36
- bpy/ops/palette/__init__.pyi +3 -27
- bpy/ops/particle/__init__.pyi +20 -160
- bpy/ops/pointcloud/__init__.pyi +3 -35
- bpy/ops/pose/__init__.pyi +29 -234
- bpy/ops/poselib/__init__.pyi +19 -66
- bpy/ops/preferences/__init__.pyi +9 -177
- bpy/ops/ptcache/__init__.pyi +5 -31
- bpy/ops/render/__init__.pyi +10 -68
- bpy/ops/rigidbody/__init__.pyi +6 -56
- bpy/ops/scene/__init__.pyi +23 -168
- bpy/ops/screen/__init__.pyi +36 -202
- bpy/ops/script/__init__.pyi +1 -12
- bpy/ops/sculpt/__init__.pyi +42 -313
- bpy/ops/sculpt_curves/__init__.pyi +6 -21
- bpy/ops/sequencer/__init__.pyi +187 -644
- bpy/ops/sound/__init__.pyi +3 -109
- bpy/ops/spreadsheet/__init__.pyi +5 -32
- bpy/ops/surface/__init__.pyi +0 -48
- bpy/ops/text/__init__.pyi +27 -225
- bpy/ops/text_editor/__init__.pyi +0 -5
- bpy/ops/texture/__init__.pyi +3 -18
- bpy/ops/transform/__init__.pyi +10 -382
- bpy/ops/ui/__init__.pyi +29 -154
- bpy/ops/uilist/__init__.pyi +0 -13
- bpy/ops/uv/__init__.pyi +195 -288
- bpy/ops/view2d/__init__.pyi +3 -73
- bpy/ops/view3d/__init__.pyi +37 -339
- bpy/ops/wm/__init__.pyi +129 -1317
- bpy/ops/workspace/__init__.pyi +7 -39
- bpy/ops/world/__init__.pyi +2 -10
- bpy/path/__init__.pyi +0 -34
- bpy/props/__init__.pyi +332 -203
- bpy/stub_internal/rna_enums/__init__.pyi +102 -82
- bpy/types/__init__.pyi +51712 -89245
- bpy/utils/__init__.pyi +4 -75
- bpy/utils/previews/__init__.pyi +1 -10
- bpy/utils/units/__init__.pyi +0 -12
- bpy_extras/anim_utils/__init__.pyi +24 -16
- bpy_extras/bmesh_utils/__init__.pyi +0 -1
- bpy_extras/id_map_utils/__init__.pyi +14 -6
- bpy_extras/image_utils/__init__.pyi +0 -9
- bpy_extras/io_utils/__init__.pyi +4 -23
- bpy_extras/keyconfig_utils/__init__.pyi +1 -1
- bpy_extras/mesh_utils/__init__.pyi +0 -12
- bpy_extras/node_shader_utils/__init__.pyi +0 -8
- bpy_extras/object_utils/__init__.pyi +0 -14
- bpy_extras/view3d_utils/__init__.pyi +0 -18
- {fake_bpy_module-20250828.dist-info → fake_bpy_module-20260119.dist-info}/METADATA +4 -1
- fake_bpy_module-20260119.dist-info/RECORD +385 -0
- {fake_bpy_module-20250828.dist-info → fake_bpy_module-20260119.dist-info}/top_level.txt +15 -14
- freestyle/chainingiterators/__init__.pyi +0 -22
- freestyle/functions/__init__.pyi +0 -139
- freestyle/predicates/__init__.pyi +0 -51
- freestyle/shaders/__init__.pyi +0 -65
- freestyle/types/__init__.pyi +139 -777
- freestyle/utils/ContextFunctions/__init__.pyi +0 -23
- freestyle/utils/__init__.pyi +0 -6
- gpu/capabilities/__init__.pyi +0 -21
- gpu/matrix/__init__.pyi +1 -10
- gpu/platform/__init__.pyi +0 -5
- gpu/shader/__init__.pyi +22 -6
- gpu/state/__init__.pyi +59 -38
- gpu/texture/__init__.pyi +0 -2
- gpu/types/__init__.pyi +84 -152
- gpu_extras/batch/__init__.pyi +0 -4
- gpu_extras/presets/__init__.pyi +6 -8
- idprop/types/__init__.pyi +6 -6
- imbuf/__init__.pyi +2 -9
- imbuf/types/__init__.pyi +5 -25
- keyingsets_builtins/__init__.pyi +1 -45
- mathutils/__init__.pyi +106 -2168
- mathutils/bvhtree/__init__.pyi +3 -25
- mathutils/geometry/__init__.pyi +41 -133
- mathutils/interpolate/__init__.pyi +3 -4
- mathutils/kdtree/__init__.pyi +0 -11
- mathutils/noise/__init__.pyi +0 -62
- fake_bpy_module-20250828.dist-info/RECORD +0 -370
- {animsys_refactor → _animsys_refactor}/__init__.pyi +0 -0
- {animsys_refactor → _animsys_refactor}/py.typed +0 -0
- {bl_console_utils → _bl_console_utils}/__init__.pyi +0 -0
- {bl_console_utils → _bl_console_utils}/autocomplete/__init__.pyi +0 -0
- {bl_console_utils → _bl_console_utils}/py.typed +0 -0
- {bl_i18n_utils → _bl_i18n_utils}/merge_po/__init__.pyi +0 -0
- {bl_i18n_utils → _bl_i18n_utils}/py.typed +0 -0
- {bl_i18n_utils → _bl_i18n_utils}/utils/__init__.pyi +0 -0
- {bl_i18n_utils → _bl_i18n_utils}/utils_cli/__init__.pyi +0 -0
- {bl_i18n_utils → _bl_i18n_utils}/utils_languages_menu/__init__.pyi +0 -0
- {bl_i18n_utils → _bl_i18n_utils}/utils_rtl/__init__.pyi +0 -0
- {bl_previews_utils → _bl_previews_utils}/__init__.pyi +0 -0
- {bl_previews_utils → _bl_previews_utils}/bl_previews_render/__init__.pyi +0 -0
- {bl_previews_utils → _bl_previews_utils}/py.typed +0 -0
- {bl_rna_utils → _bl_rna_utils}/__init__.pyi +0 -0
- {bl_rna_utils → _bl_rna_utils}/data_path/__init__.pyi +0 -0
- {bl_rna_utils → _bl_rna_utils}/py.typed +0 -0
- {bl_text_utils → _bl_text_utils}/__init__.pyi +0 -0
- {bl_text_utils → _bl_text_utils}/external_editor/__init__.pyi +0 -0
- {bl_text_utils → _bl_text_utils}/py.typed +0 -0
- {bl_ui_utils → _bl_ui_utils}/layout/__init__.pyi +0 -0
- {bl_ui_utils → _bl_ui_utils}/py.typed +0 -0
- /_bpy_internal/{freedesktop → platform/freedesktop}/__init__.pyi +0 -0
- {bpy_restrict_state → _bpy_restrict_state}/__init__.pyi +0 -0
- {bpy_restrict_state → _bpy_restrict_state}/py.typed +0 -0
- {console_python → _console_python}/__init__.pyi +0 -0
- {console_python → _console_python}/py.typed +0 -0
- {console_shell → _console_shell}/__init__.pyi +0 -0
- {console_shell → _console_shell}/py.typed +0 -0
- {graphviz_export → _graphviz_export}/__init__.pyi +0 -0
- {graphviz_export → _graphviz_export}/py.typed +0 -0
- {keyingsets_utils → _keyingsets_utils}/__init__.pyi +0 -0
- {keyingsets_utils → _keyingsets_utils}/py.typed +0 -0
- {rna_info → _rna_info}/py.typed +0 -0
- {rna_xml → _rna_xml}/__init__.pyi +0 -0
- {rna_xml → _rna_xml}/py.typed +0 -0
- {fake_bpy_module-20250828.dist-info → fake_bpy_module-20260119.dist-info}/WHEEL +0 -0
bpy/props/__init__.pyi
CHANGED
|
@@ -69,30 +69,77 @@ of the operator, only its other properties.
|
|
|
69
69
|
|
|
70
70
|
--------------------
|
|
71
71
|
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
Accessor functions can be used for boolean, int, float, string and enum properties.
|
|
73
|
+
|
|
74
|
+
If get
|
|
75
|
+
|
|
76
|
+
or set
|
|
77
|
+
|
|
78
|
+
callbacks are defined, the property will not be stored in the ID properties
|
|
74
79
|
automatically. Instead, the get
|
|
75
80
|
|
|
76
81
|
and set
|
|
77
82
|
|
|
78
83
|
functions will be called when the property
|
|
79
|
-
is respectively read or written from the API.
|
|
84
|
+
is respectively read or written from the API, and are responsible to handle the data storage.
|
|
85
|
+
|
|
86
|
+
Note that:
|
|
87
|
+
|
|
88
|
+
* It is illegal to define a set
|
|
89
|
+
|
|
90
|
+
callback without a matching get
|
|
91
|
+
|
|
92
|
+
one.
|
|
93
|
+
* When a get
|
|
94
|
+
|
|
95
|
+
callback is defined but no set
|
|
96
|
+
|
|
97
|
+
one, the property is read-only.
|
|
98
|
+
|
|
99
|
+
get_transform
|
|
100
|
+
|
|
101
|
+
and set_transform
|
|
102
|
+
|
|
103
|
+
can be used when the returned value needs to be modified,
|
|
104
|
+
but the default internal storage is still used. They can only transform the value before it is
|
|
105
|
+
set or returned, but do not control how/where that data is stored.
|
|
106
|
+
|
|
107
|
+
[NOTE]
|
|
108
|
+
It is possible to define both get
|
|
109
|
+
|
|
110
|
+
/set
|
|
111
|
+
|
|
112
|
+
and get_transform
|
|
113
|
+
|
|
114
|
+
/set_transform
|
|
115
|
+
|
|
116
|
+
callbacks
|
|
117
|
+
for a same property. In practice however, this should rarely be needed, as most 'transform'
|
|
118
|
+
operation can also happen within a get
|
|
119
|
+
|
|
120
|
+
/set
|
|
121
|
+
|
|
122
|
+
callback.
|
|
80
123
|
|
|
81
124
|
[WARNING]
|
|
82
125
|
Remember that these callbacks may be executed in threaded context.
|
|
83
126
|
|
|
127
|
+
[WARNING]
|
|
128
|
+
Take care when accessing other properties in these callbacks, as it can easily trigger
|
|
129
|
+
complex issues, such as infinite loops (if e.g. two properties try to also set the other
|
|
130
|
+
property's value in their own set
|
|
131
|
+
|
|
132
|
+
callback), or unexpected side effects due to changes
|
|
133
|
+
in data, caused e.g. by an update
|
|
134
|
+
|
|
135
|
+
callback.
|
|
136
|
+
|
|
84
137
|
```../examples/bpy.props.5.py```
|
|
85
138
|
|
|
86
139
|
[NOTE]
|
|
87
140
|
Pointer properties do not support storing references to embedded IDs (e.g. bpy.types.Scene.collection, bpy.types.Material.node_tree).
|
|
88
141
|
These should exclusively be referenced and accessed through their owner ID (e.g. the scene or material).
|
|
89
142
|
|
|
90
|
-
[NOTE]
|
|
91
|
-
Typically this function doesn't need to be accessed directly.
|
|
92
|
-
Instead use del cls.attr
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
143
|
"""
|
|
97
144
|
|
|
98
145
|
import typing
|
|
@@ -102,7 +149,7 @@ import numpy.typing as npt
|
|
|
102
149
|
import bpy.stub_internal.rna_enums
|
|
103
150
|
import bpy.types
|
|
104
151
|
|
|
105
|
-
def BoolProperty(
|
|
152
|
+
def BoolProperty[_GenericType1: bpy.types.bpy_struct](
|
|
106
153
|
*,
|
|
107
154
|
name: str | None = "",
|
|
108
155
|
description: str | None = "",
|
|
@@ -110,41 +157,59 @@ def BoolProperty(
|
|
|
110
157
|
default=False,
|
|
111
158
|
options: set[bpy.stub_internal.rna_enums.PropertyFlagItems] = {"ANIMATABLE"},
|
|
112
159
|
override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems] = set(),
|
|
113
|
-
tags=set(),
|
|
160
|
+
tags: set[str] | None = set(),
|
|
114
161
|
subtype: bpy.stub_internal.rna_enums.PropertySubtypeNumberItems = "NONE",
|
|
115
|
-
update: collections.abc.Callable[[
|
|
162
|
+
update: collections.abc.Callable[[_GenericType1, bpy.types.Context], None]
|
|
163
|
+
| None = None,
|
|
164
|
+
get: collections.abc.Callable[[_GenericType1], bool] | None = None,
|
|
165
|
+
set: collections.abc.Callable[[_GenericType1, bool], None] | None = None,
|
|
166
|
+
get_transform: collections.abc.Callable[[bpy.types.bpy_struct, bool, bool], bool]
|
|
167
|
+
| None = None,
|
|
168
|
+
set_transform: collections.abc.Callable[
|
|
169
|
+
[bpy.types.bpy_struct, bool, bool, bool], bool
|
|
170
|
+
]
|
|
116
171
|
| None = None,
|
|
117
|
-
get: collections.abc.Callable[[bpy.types.bpy_struct], bool] | None = None,
|
|
118
|
-
set: collections.abc.Callable[[bpy.types.bpy_struct, bool], None] | None = None,
|
|
119
172
|
) -> None:
|
|
120
173
|
"""Returns a new boolean property definition.
|
|
121
174
|
|
|
122
175
|
:param name: Name used in the user interface.
|
|
123
|
-
:type name: str | None
|
|
124
176
|
:param description: Text used for the tooltip and api documentation.
|
|
125
|
-
:type description: str | None
|
|
126
177
|
:param translation_context: Text used as context to disambiguate translations.
|
|
127
|
-
:type translation_context: str | None
|
|
128
178
|
:param options: Enumerator in `rna_enum_property_flag_items`.
|
|
129
|
-
:type options: set[bpy.stub_internal.rna_enums.PropertyFlagItems]
|
|
130
179
|
:param override: Enumerator in `rna_enum_property_override_flag_items`.
|
|
131
|
-
:type override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems]
|
|
132
180
|
:param tags: Enumerator of tags that are defined by parent class.
|
|
133
181
|
:param subtype: Enumerator in `rna_enum_property_subtype_number_items`.
|
|
134
|
-
:type subtype: bpy.stub_internal.rna_enums.PropertySubtypeNumberItems
|
|
135
182
|
:param update: Function to be called when this value is modified,
|
|
136
183
|
This function must take 2 values (self, context) and return None.
|
|
137
184
|
Warning there are no safety checks to avoid infinite recursion.
|
|
138
|
-
:
|
|
139
|
-
|
|
185
|
+
:param get: Function to be called when this value is read, and the default,
|
|
186
|
+
system-defined storage is not used for this property.
|
|
140
187
|
This function must take 1 value (self) and return the value of the property.
|
|
141
|
-
|
|
142
|
-
|
|
188
|
+
|
|
189
|
+
Defining this callback without a matching set one will make the property read-only (even if READ_ONLY option is not set).
|
|
190
|
+
:param set: Function to be called when this value is written, and the default,
|
|
191
|
+
system-defined storage is not used for this property.
|
|
143
192
|
This function must take 2 values (self, value) and return None.
|
|
144
|
-
|
|
193
|
+
|
|
194
|
+
Defining this callback without a matching get one is invalid.
|
|
195
|
+
:param get_transform: Function to be called when this value is read,
|
|
196
|
+
if some additional processing must be performed on the stored value.
|
|
197
|
+
This function must take three arguments (self, the stored value,
|
|
198
|
+
and a boolean indicating if the property is currently set),
|
|
199
|
+
and return the final, transformed value of the property.
|
|
200
|
+
|
|
201
|
+
The callback is responsible to ensure that value limits of the property (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
202
|
+
:param set_transform: Function to be called when this value is written,
|
|
203
|
+
if some additional processing must be performed on the given value before storing it.
|
|
204
|
+
This function must take four arguments (self, the given value to store,
|
|
205
|
+
the currently stored value (raw value, without any get_transform applied to it),
|
|
206
|
+
and a boolean indicating if the property is currently set),
|
|
207
|
+
and return the final, transformed value of the property.
|
|
208
|
+
|
|
209
|
+
The callback is responsible to ensure that value limits (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
145
210
|
"""
|
|
146
211
|
|
|
147
|
-
def BoolVectorProperty(
|
|
212
|
+
def BoolVectorProperty[_GenericType1: bpy.types.bpy_struct](
|
|
148
213
|
*,
|
|
149
214
|
name: str | None = "",
|
|
150
215
|
description: str | None = "",
|
|
@@ -152,47 +217,70 @@ def BoolVectorProperty(
|
|
|
152
217
|
default: collections.abc.Sequence[bool] | None = (False, False, False),
|
|
153
218
|
options: set[bpy.stub_internal.rna_enums.PropertyFlagItems] = {"ANIMATABLE"},
|
|
154
219
|
override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems] = set(),
|
|
155
|
-
tags=set(),
|
|
220
|
+
tags: set[str] | None = set(),
|
|
156
221
|
subtype: bpy.stub_internal.rna_enums.PropertySubtypeNumberArrayItems = "NONE",
|
|
157
222
|
size: collections.abc.Sequence[int] | int | None = 3,
|
|
158
|
-
update: collections.abc.Callable[[
|
|
223
|
+
update: collections.abc.Callable[[_GenericType1, bpy.types.Context], None]
|
|
224
|
+
| None = None,
|
|
225
|
+
get: collections.abc.Callable[[_GenericType1], collections.abc.Sequence[bool]]
|
|
159
226
|
| None = None,
|
|
160
|
-
|
|
161
|
-
|
|
227
|
+
set: collections.abc.Callable[[_GenericType1, collections.abc.Sequence[bool]], None]
|
|
228
|
+
| None = None,
|
|
229
|
+
get_transform: collections.abc.Callable[
|
|
230
|
+
[bpy.types.bpy_struct, collections.abc.Sequence[bool], bool],
|
|
231
|
+
collections.abc.Sequence[bool],
|
|
162
232
|
]
|
|
163
233
|
| None = None,
|
|
164
|
-
|
|
234
|
+
set_transform: collections.abc.Callable[
|
|
235
|
+
[
|
|
236
|
+
bpy.types.bpy_struct,
|
|
237
|
+
collections.abc.Sequence[bool],
|
|
238
|
+
collections.abc.Sequence[bool],
|
|
239
|
+
bool,
|
|
240
|
+
],
|
|
241
|
+
collections.abc.Sequence[bool],
|
|
242
|
+
]
|
|
165
243
|
| None = None,
|
|
166
244
|
) -> None:
|
|
167
245
|
"""Returns a new vector boolean property definition.
|
|
168
246
|
|
|
169
247
|
:param name: Name used in the user interface.
|
|
170
|
-
:type name: str | None
|
|
171
248
|
:param description: Text used for the tooltip and api documentation.
|
|
172
|
-
:type description: str | None
|
|
173
249
|
:param translation_context: Text used as context to disambiguate translations.
|
|
174
|
-
:type translation_context: str | None
|
|
175
250
|
:param default: sequence of booleans the length of size.
|
|
176
|
-
:type default: collections.abc.Sequence[bool] | None
|
|
177
251
|
:param options: Enumerator in `rna_enum_property_flag_items`.
|
|
178
|
-
:type options: set[bpy.stub_internal.rna_enums.PropertyFlagItems]
|
|
179
252
|
:param override: Enumerator in `rna_enum_property_override_flag_items`.
|
|
180
|
-
:type override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems]
|
|
181
253
|
:param tags: Enumerator of tags that are defined by parent class.
|
|
182
254
|
:param subtype: Enumerator in `rna_enum_property_subtype_number_array_items`.
|
|
183
|
-
:type subtype: bpy.stub_internal.rna_enums.PropertySubtypeNumberArrayItems
|
|
184
255
|
:param size: Vector dimensions in [1, 32]. An int sequence can be used to define multi-dimension arrays.
|
|
185
|
-
:type size: collections.abc.Sequence[int] | int | None
|
|
186
256
|
:param update: Function to be called when this value is modified,
|
|
187
257
|
This function must take 2 values (self, context) and return None.
|
|
188
258
|
Warning there are no safety checks to avoid infinite recursion.
|
|
189
|
-
:
|
|
190
|
-
|
|
259
|
+
:param get: Function to be called when this value is read, and the default,
|
|
260
|
+
system-defined storage is not used for this property.
|
|
191
261
|
This function must take 1 value (self) and return the value of the property.
|
|
192
|
-
|
|
193
|
-
|
|
262
|
+
|
|
263
|
+
Defining this callback without a matching set one will make the property read-only (even if READ_ONLY option is not set).
|
|
264
|
+
:param set: Function to be called when this value is written, and the default,
|
|
265
|
+
system-defined storage is not used for this property.
|
|
194
266
|
This function must take 2 values (self, value) and return None.
|
|
195
|
-
|
|
267
|
+
|
|
268
|
+
Defining this callback without a matching get one is invalid.
|
|
269
|
+
:param get_transform: Function to be called when this value is read,
|
|
270
|
+
if some additional processing must be performed on the stored value.
|
|
271
|
+
This function must take three arguments (self, the stored value,
|
|
272
|
+
and a boolean indicating if the property is currently set),
|
|
273
|
+
and return the final, transformed value of the property.
|
|
274
|
+
|
|
275
|
+
The callback is responsible to ensure that value limits of the property (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
276
|
+
:param set_transform: Function to be called when this value is written,
|
|
277
|
+
if some additional processing must be performed on the given value before storing it.
|
|
278
|
+
This function must take four arguments (self, the given value to store,
|
|
279
|
+
the currently stored value (raw value, without any get_transform applied to it),
|
|
280
|
+
and a boolean indicating if the property is currently set),
|
|
281
|
+
and return the final, transformed value of the property.
|
|
282
|
+
|
|
283
|
+
The callback is responsible to ensure that value limits (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
196
284
|
"""
|
|
197
285
|
|
|
198
286
|
def CollectionProperty(
|
|
@@ -205,26 +293,20 @@ def CollectionProperty(
|
|
|
205
293
|
override: set[
|
|
206
294
|
bpy.stub_internal.rna_enums.PropertyOverrideFlagCollectionItems
|
|
207
295
|
] = set(),
|
|
208
|
-
tags=set(),
|
|
296
|
+
tags: set[str] | None = set(),
|
|
209
297
|
) -> None:
|
|
210
298
|
"""Returns a new collection property definition.
|
|
211
299
|
|
|
212
300
|
:param type: A subclass of a property group.
|
|
213
|
-
:type type: type[bpy.types.PropertyGroup] | None
|
|
214
301
|
:param name: Name used in the user interface.
|
|
215
|
-
:type name: str | None
|
|
216
302
|
:param description: Text used for the tooltip and api documentation.
|
|
217
|
-
:type description: str | None
|
|
218
303
|
:param translation_context: Text used as context to disambiguate translations.
|
|
219
|
-
:type translation_context: str | None
|
|
220
304
|
:param options: Enumerator in `rna_enum_property_flag_items`.
|
|
221
|
-
:type options: set[bpy.stub_internal.rna_enums.PropertyFlagItems]
|
|
222
305
|
:param override: Enumerator in `rna_enum_property_override_flag_collection_items`.
|
|
223
|
-
:type override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagCollectionItems]
|
|
224
306
|
:param tags: Enumerator of tags that are defined by parent class.
|
|
225
307
|
"""
|
|
226
308
|
|
|
227
|
-
def EnumProperty(
|
|
309
|
+
def EnumProperty[_GenericType1: bpy.types.bpy_struct](
|
|
228
310
|
*,
|
|
229
311
|
items: collections.abc.Iterable[
|
|
230
312
|
tuple[str, str, str]
|
|
@@ -233,7 +315,7 @@ def EnumProperty(
|
|
|
233
315
|
| None
|
|
234
316
|
]
|
|
235
317
|
| collections.abc.Callable[
|
|
236
|
-
[
|
|
318
|
+
[_GenericType1, bpy.types.Context | None],
|
|
237
319
|
collections.abc.Iterable[
|
|
238
320
|
tuple[str, str, str]
|
|
239
321
|
| tuple[str, str, str, int]
|
|
@@ -244,14 +326,18 @@ def EnumProperty(
|
|
|
244
326
|
name: str | None = "",
|
|
245
327
|
description: str | None = "",
|
|
246
328
|
translation_context: str | None = "*",
|
|
247
|
-
default: int | str | None = None,
|
|
329
|
+
default: int | set[str] | str | None = None,
|
|
248
330
|
options: set[bpy.stub_internal.rna_enums.PropertyFlagEnumItems] = {"ANIMATABLE"},
|
|
249
331
|
override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems] = set(),
|
|
250
|
-
tags=set(),
|
|
251
|
-
update: collections.abc.Callable[[
|
|
332
|
+
tags: set[str] | None = set(),
|
|
333
|
+
update: collections.abc.Callable[[_GenericType1, bpy.types.Context], None]
|
|
334
|
+
| None = None,
|
|
335
|
+
get: collections.abc.Callable[[_GenericType1], int] | None = None,
|
|
336
|
+
set: collections.abc.Callable[[_GenericType1, int], None] | None = None,
|
|
337
|
+
get_transform: collections.abc.Callable[[bpy.types.bpy_struct, int, bool], int]
|
|
338
|
+
| None = None,
|
|
339
|
+
set_transform: collections.abc.Callable[[bpy.types.bpy_struct, int, int, bool], int]
|
|
252
340
|
| None = None,
|
|
253
|
-
get: collections.abc.Callable[[bpy.types.bpy_struct], int] | None = None,
|
|
254
|
-
set: collections.abc.Callable[[bpy.types.bpy_struct, int], None] | None = None,
|
|
255
341
|
) -> None:
|
|
256
342
|
"""Returns a new enumerator property definition.
|
|
257
343
|
|
|
@@ -296,36 +382,47 @@ def EnumProperty(
|
|
|
296
382
|
There is a known bug with using a callback,
|
|
297
383
|
Python must keep a reference to the strings returned by the callback or Blender
|
|
298
384
|
will misbehave or even crash.
|
|
299
|
-
:type items: collections.abc.Iterable[tuple[str, str, str] | tuple[str, str, str, int] | tuple[str, str, str, str, int] | None] | collections.abc.Callable[[typing.Any, bpy.types.Context | None], collections.abc.Iterable[tuple[str, str, str] | tuple[str, str, str, int] | tuple[str, str, str, str, int] | None]]
|
|
300
385
|
:param name: Name used in the user interface.
|
|
301
|
-
:type name: str | None
|
|
302
386
|
:param description: Text used for the tooltip and api documentation.
|
|
303
|
-
:type description: str | None
|
|
304
387
|
:param translation_context: Text used as context to disambiguate translations.
|
|
305
|
-
:type translation_context: str | None
|
|
306
388
|
:param default: The default value for this enum, a string from the identifiers used in items, or integer matching an item number.
|
|
307
389
|
If the ENUM_FLAG option is used this must be a set of such string identifiers instead.
|
|
308
390
|
WARNING: Strings cannot be specified for dynamic enums
|
|
309
391
|
(i.e. if a callback function is given as items parameter).
|
|
310
|
-
:type default: int | str | None
|
|
311
392
|
:param options: Enumerator in `rna_enum_property_flag_enum_items`.
|
|
312
|
-
:type options: set[bpy.stub_internal.rna_enums.PropertyFlagEnumItems]
|
|
313
393
|
:param override: Enumerator in `rna_enum_property_override_flag_items`.
|
|
314
|
-
:type override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems]
|
|
315
394
|
:param tags: Enumerator of tags that are defined by parent class.
|
|
316
395
|
:param update: Function to be called when this value is modified,
|
|
317
396
|
This function must take 2 values (self, context) and return None.
|
|
318
397
|
Warning there are no safety checks to avoid infinite recursion.
|
|
319
|
-
:
|
|
320
|
-
|
|
398
|
+
:param get: Function to be called when this value is read, and the default,
|
|
399
|
+
system-defined storage is not used for this property.
|
|
321
400
|
This function must take 1 value (self) and return the value of the property.
|
|
322
|
-
|
|
323
|
-
|
|
401
|
+
|
|
402
|
+
Defining this callback without a matching set one will make the property read-only (even if READ_ONLY option is not set).
|
|
403
|
+
:param set: Function to be called when this value is written, and the default,
|
|
404
|
+
system-defined storage is not used for this property.
|
|
324
405
|
This function must take 2 values (self, value) and return None.
|
|
325
|
-
|
|
406
|
+
|
|
407
|
+
Defining this callback without a matching get one is invalid.
|
|
408
|
+
:param get_transform: Function to be called when this value is read,
|
|
409
|
+
if some additional processing must be performed on the stored value.
|
|
410
|
+
This function must take three arguments (self, the stored value,
|
|
411
|
+
and a boolean indicating if the property is currently set),
|
|
412
|
+
and return the final, transformed value of the property.
|
|
413
|
+
|
|
414
|
+
The callback is responsible to ensure that value limits of the property (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
415
|
+
:param set_transform: Function to be called when this value is written,
|
|
416
|
+
if some additional processing must be performed on the given value before storing it.
|
|
417
|
+
This function must take four arguments (self, the given value to store,
|
|
418
|
+
the currently stored value (raw value, without any get_transform applied to it),
|
|
419
|
+
and a boolean indicating if the property is currently set),
|
|
420
|
+
and return the final, transformed value of the property.
|
|
421
|
+
|
|
422
|
+
The callback is responsible to ensure that value limits (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
326
423
|
"""
|
|
327
424
|
|
|
328
|
-
def FloatProperty(
|
|
425
|
+
def FloatProperty[_GenericType1: bpy.types.bpy_struct](
|
|
329
426
|
*,
|
|
330
427
|
name: str | None = "",
|
|
331
428
|
description: str | None = "",
|
|
@@ -335,60 +432,71 @@ def FloatProperty(
|
|
|
335
432
|
max: float | None = 3.402823e38,
|
|
336
433
|
soft_min: float | None = -3.402823e38,
|
|
337
434
|
soft_max: float | None = 3.402823e38,
|
|
338
|
-
step:
|
|
435
|
+
step: float | None = 3,
|
|
339
436
|
precision: int | None = 2,
|
|
340
437
|
options: set[bpy.stub_internal.rna_enums.PropertyFlagItems] = {"ANIMATABLE"},
|
|
341
438
|
override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems] = set(),
|
|
342
|
-
tags=set(),
|
|
439
|
+
tags: set[str] | None = set(),
|
|
343
440
|
subtype: bpy.stub_internal.rna_enums.PropertySubtypeNumberItems = "NONE",
|
|
344
441
|
unit: bpy.stub_internal.rna_enums.PropertyUnitItems = "NONE",
|
|
345
|
-
update: collections.abc.Callable[[
|
|
442
|
+
update: collections.abc.Callable[[_GenericType1, bpy.types.Context], None]
|
|
443
|
+
| None = None,
|
|
444
|
+
get: collections.abc.Callable[[_GenericType1], float] | None = None,
|
|
445
|
+
set: collections.abc.Callable[[_GenericType1, float], None] | None = None,
|
|
446
|
+
get_transform: collections.abc.Callable[[bpy.types.bpy_struct, float, bool], float]
|
|
447
|
+
| None = None,
|
|
448
|
+
set_transform: collections.abc.Callable[
|
|
449
|
+
[bpy.types.bpy_struct, float, float, bool], float
|
|
450
|
+
]
|
|
346
451
|
| None = None,
|
|
347
|
-
get: collections.abc.Callable[[bpy.types.bpy_struct], float] | None = None,
|
|
348
|
-
set: collections.abc.Callable[[bpy.types.bpy_struct, float], None] | None = None,
|
|
349
452
|
) -> None:
|
|
350
453
|
"""Returns a new float (single precision) property definition.
|
|
351
454
|
|
|
352
455
|
:param name: Name used in the user interface.
|
|
353
|
-
:type name: str | None
|
|
354
456
|
:param description: Text used for the tooltip and api documentation.
|
|
355
|
-
:type description: str | None
|
|
356
457
|
:param translation_context: Text used as context to disambiguate translations.
|
|
357
|
-
:type translation_context: str | None
|
|
358
458
|
:param min: Hard minimum, trying to assign a value below will silently assign this minimum instead.
|
|
359
|
-
:type min: float | None
|
|
360
459
|
:param max: Hard maximum, trying to assign a value above will silently assign this maximum instead.
|
|
361
|
-
:type max: float | None
|
|
362
460
|
:param soft_min: Soft minimum (>= min), user wont be able to drag the widget below this value in the UI.
|
|
363
|
-
:type soft_min: float | None
|
|
364
461
|
:param soft_max: Soft maximum (<= max), user wont be able to drag the widget above this value in the UI.
|
|
365
|
-
:type soft_max: float | None
|
|
366
462
|
:param step: Step of increment/decrement in UI, in [1, 100], defaults to 3 (WARNING: actual value is /100).
|
|
367
|
-
:type step: int | None
|
|
368
463
|
:param precision: Maximum number of decimal digits to display, in [0, 6]. Fraction is automatically hidden for exact integer values of fields with unit NONE or TIME (frame count) and step divisible by 100.
|
|
369
|
-
:type precision: int | None
|
|
370
464
|
:param options: Enumerator in `rna_enum_property_flag_items`.
|
|
371
|
-
:type options: set[bpy.stub_internal.rna_enums.PropertyFlagItems]
|
|
372
465
|
:param override: Enumerator in `rna_enum_property_override_flag_items`.
|
|
373
|
-
:type override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems]
|
|
374
466
|
:param tags: Enumerator of tags that are defined by parent class.
|
|
375
467
|
:param subtype: Enumerator in `rna_enum_property_subtype_number_items`.
|
|
376
|
-
:type subtype: bpy.stub_internal.rna_enums.PropertySubtypeNumberItems
|
|
377
468
|
:param unit: Enumerator in `rna_enum_property_unit_items`.
|
|
378
|
-
:type unit: bpy.stub_internal.rna_enums.PropertyUnitItems
|
|
379
469
|
:param update: Function to be called when this value is modified,
|
|
380
470
|
This function must take 2 values (self, context) and return None.
|
|
381
471
|
Warning there are no safety checks to avoid infinite recursion.
|
|
382
|
-
:
|
|
383
|
-
|
|
472
|
+
:param get: Function to be called when this value is read, and the default,
|
|
473
|
+
system-defined storage is not used for this property.
|
|
384
474
|
This function must take 1 value (self) and return the value of the property.
|
|
385
|
-
|
|
386
|
-
|
|
475
|
+
|
|
476
|
+
Defining this callback without a matching set one will make the property read-only (even if READ_ONLY option is not set).
|
|
477
|
+
:param set: Function to be called when this value is written, and the default,
|
|
478
|
+
system-defined storage is not used for this property.
|
|
387
479
|
This function must take 2 values (self, value) and return None.
|
|
388
|
-
|
|
480
|
+
|
|
481
|
+
Defining this callback without a matching get one is invalid.
|
|
482
|
+
:param get_transform: Function to be called when this value is read,
|
|
483
|
+
if some additional processing must be performed on the stored value.
|
|
484
|
+
This function must take three arguments (self, the stored value,
|
|
485
|
+
and a boolean indicating if the property is currently set),
|
|
486
|
+
and return the final, transformed value of the property.
|
|
487
|
+
|
|
488
|
+
The callback is responsible to ensure that value limits of the property (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
489
|
+
:param set_transform: Function to be called when this value is written,
|
|
490
|
+
if some additional processing must be performed on the given value before storing it.
|
|
491
|
+
This function must take four arguments (self, the given value to store,
|
|
492
|
+
the currently stored value (raw value, without any get_transform applied to it),
|
|
493
|
+
and a boolean indicating if the property is currently set),
|
|
494
|
+
and return the final, transformed value of the property.
|
|
495
|
+
|
|
496
|
+
The callback is responsible to ensure that value limits (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
389
497
|
"""
|
|
390
498
|
|
|
391
|
-
def FloatVectorProperty(
|
|
499
|
+
def FloatVectorProperty[_GenericType1: bpy.types.bpy_struct](
|
|
392
500
|
*,
|
|
393
501
|
name: str | None = "",
|
|
394
502
|
description: str | None = "",
|
|
@@ -398,69 +506,57 @@ def FloatVectorProperty(
|
|
|
398
506
|
max: float | None = sys.float_info.max,
|
|
399
507
|
soft_min: float | None = sys.float_info.min,
|
|
400
508
|
soft_max: float | None = sys.float_info.max,
|
|
401
|
-
step:
|
|
509
|
+
step: float | None = 3,
|
|
402
510
|
precision: int | None = 2,
|
|
403
511
|
options: set[bpy.stub_internal.rna_enums.PropertyFlagItems] = {"ANIMATABLE"},
|
|
404
512
|
override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems] = set(),
|
|
405
|
-
tags=set(),
|
|
513
|
+
tags: set[str] | None = set(),
|
|
406
514
|
subtype: bpy.stub_internal.rna_enums.PropertySubtypeNumberArrayItems = "NONE",
|
|
407
515
|
unit: bpy.stub_internal.rna_enums.PropertyUnitItems = "NONE",
|
|
408
516
|
size: collections.abc.Sequence[int] | int | None = 3,
|
|
409
|
-
update: collections.abc.Callable[[
|
|
517
|
+
update: collections.abc.Callable[[_GenericType1, bpy.types.Context], None]
|
|
410
518
|
| None = None,
|
|
411
|
-
get: collections.abc.Callable[
|
|
412
|
-
[bpy.types.bpy_struct], collections.abc.Sequence[float]
|
|
413
|
-
]
|
|
519
|
+
get: collections.abc.Callable[[_GenericType1], collections.abc.Sequence[float]]
|
|
414
520
|
| None = None,
|
|
415
|
-
set: collections.abc.Callable[
|
|
521
|
+
set: collections.abc.Callable[
|
|
522
|
+
[_GenericType1, collections.abc.Sequence[float]], None
|
|
523
|
+
]
|
|
416
524
|
| None = None,
|
|
417
525
|
) -> None:
|
|
418
526
|
"""Returns a new vector float property definition.
|
|
419
527
|
|
|
420
528
|
:param name: Name used in the user interface.
|
|
421
|
-
:type name: str | None
|
|
422
529
|
:param description: Text used for the tooltip and api documentation.
|
|
423
|
-
:type description: str | None
|
|
424
530
|
:param translation_context: Text used as context to disambiguate translations.
|
|
425
|
-
:type translation_context: str | None
|
|
426
531
|
:param default: Sequence of floats the length of size.
|
|
427
|
-
:type default: collections.abc.Sequence[float] | None
|
|
428
532
|
:param min: Hard minimum, trying to assign a value below will silently assign this minimum instead.
|
|
429
|
-
:type min: float | None
|
|
430
533
|
:param max: Hard maximum, trying to assign a value above will silently assign this maximum instead.
|
|
431
|
-
:type max: float | None
|
|
432
534
|
:param soft_min: Soft minimum (>= min), user wont be able to drag the widget below this value in the UI.
|
|
433
|
-
:type soft_min: float | None
|
|
434
535
|
:param soft_max: Soft maximum (<= max), user wont be able to drag the widget above this value in the UI.
|
|
435
|
-
:type soft_max: float | None
|
|
436
536
|
:param step: Step of increment/decrement in UI, in [1, 100], defaults to 3 (WARNING: actual value is /100).
|
|
437
|
-
:type step: int | None
|
|
438
537
|
:param precision: Maximum number of decimal digits to display, in [0, 6]. Fraction is automatically hidden for exact integer values of fields with unit NONE or TIME (frame count) and step divisible by 100.
|
|
439
|
-
:type precision: int | None
|
|
440
538
|
:param options: Enumerator in `rna_enum_property_flag_items`.
|
|
441
|
-
:type options: set[bpy.stub_internal.rna_enums.PropertyFlagItems]
|
|
442
539
|
:param override: Enumerator in `rna_enum_property_override_flag_items`.
|
|
443
|
-
:type override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems]
|
|
444
540
|
:param tags: Enumerator of tags that are defined by parent class.
|
|
445
541
|
:param subtype: Enumerator in `rna_enum_property_subtype_number_array_items`.
|
|
446
|
-
:type subtype: bpy.stub_internal.rna_enums.PropertySubtypeNumberArrayItems
|
|
447
542
|
:param unit: Enumerator in `rna_enum_property_unit_items`.
|
|
448
|
-
:type unit: bpy.stub_internal.rna_enums.PropertyUnitItems
|
|
449
543
|
:param size: Vector dimensions in [1, 32]. An int sequence can be used to define multi-dimension arrays.
|
|
450
|
-
:type size: collections.abc.Sequence[int] | int | None
|
|
451
544
|
:param update: Function to be called when this value is modified,
|
|
452
545
|
This function must take 2 values (self, context) and return None.
|
|
453
546
|
Warning there are no safety checks to avoid infinite recursion.
|
|
454
|
-
:
|
|
455
|
-
|
|
547
|
+
:param get: Function to be called when this value is read, and the default,
|
|
548
|
+
system-defined storage is not used for this property.
|
|
456
549
|
This function must take 1 value (self) and return the value of the property.
|
|
457
|
-
|
|
458
|
-
|
|
550
|
+
|
|
551
|
+
Defining this callback without a matching set one will make the property read-only (even if READ_ONLY option is not set).
|
|
552
|
+
:param set: Function to be called when this value is written, and the default,
|
|
553
|
+
system-defined storage is not used for this property.
|
|
459
554
|
This function must take 2 values (self, value) and return None.
|
|
460
|
-
|
|
555
|
+
|
|
556
|
+
Defining this callback without a matching get one is invalid.
|
|
461
557
|
"""
|
|
462
558
|
|
|
463
|
-
def IntProperty(
|
|
559
|
+
def IntProperty[_GenericType1: bpy.types.bpy_struct](
|
|
464
560
|
*,
|
|
465
561
|
name: str | None = "",
|
|
466
562
|
description: str | None = "",
|
|
@@ -473,51 +569,62 @@ def IntProperty(
|
|
|
473
569
|
step: int | None = 1,
|
|
474
570
|
options: set[bpy.stub_internal.rna_enums.PropertyFlagItems] = {"ANIMATABLE"},
|
|
475
571
|
override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems] = set(),
|
|
476
|
-
tags=set(),
|
|
572
|
+
tags: set[str] | None = set(),
|
|
477
573
|
subtype: bpy.stub_internal.rna_enums.PropertySubtypeNumberItems = "NONE",
|
|
478
|
-
update: collections.abc.Callable[[
|
|
574
|
+
update: collections.abc.Callable[[_GenericType1, bpy.types.Context], None]
|
|
575
|
+
| None = None,
|
|
576
|
+
get: collections.abc.Callable[[_GenericType1], int] | None = None,
|
|
577
|
+
set: collections.abc.Callable[[_GenericType1, int], None] | None = None,
|
|
578
|
+
get_transform: collections.abc.Callable[[bpy.types.bpy_struct, int, bool], int]
|
|
579
|
+
| None = None,
|
|
580
|
+
set_transform: collections.abc.Callable[[bpy.types.bpy_struct, int, int, bool], int]
|
|
479
581
|
| None = None,
|
|
480
|
-
get: collections.abc.Callable[[bpy.types.bpy_struct], int] | None = None,
|
|
481
|
-
set: collections.abc.Callable[[bpy.types.bpy_struct, int], None] | None = None,
|
|
482
582
|
) -> None:
|
|
483
583
|
"""Returns a new int property definition.
|
|
484
584
|
|
|
485
585
|
:param name: Name used in the user interface.
|
|
486
|
-
:type name: str | None
|
|
487
586
|
:param description: Text used for the tooltip and api documentation.
|
|
488
|
-
:type description: str | None
|
|
489
587
|
:param translation_context: Text used as context to disambiguate translations.
|
|
490
|
-
:type translation_context: str | None
|
|
491
588
|
:param min: Hard minimum, trying to assign a value below will silently assign this minimum instead.
|
|
492
|
-
:type min: int | None
|
|
493
589
|
:param max: Hard maximum, trying to assign a value above will silently assign this maximum instead.
|
|
494
|
-
:type max: int | None
|
|
495
590
|
:param soft_min: Soft minimum (>= min), user wont be able to drag the widget below this value in the UI.
|
|
496
|
-
:type soft_min: int | None
|
|
497
591
|
:param soft_max: Soft maximum (<= max), user wont be able to drag the widget above this value in the UI.
|
|
498
|
-
:type soft_max: int | None
|
|
499
592
|
:param step: Step of increment/decrement in UI, in [1, 100], defaults to 1 (WARNING: unused currently!).
|
|
500
|
-
:type step: int | None
|
|
501
593
|
:param options: Enumerator in `rna_enum_property_flag_items`.
|
|
502
|
-
:type options: set[bpy.stub_internal.rna_enums.PropertyFlagItems]
|
|
503
594
|
:param override: Enumerator in `rna_enum_property_override_flag_items`.
|
|
504
|
-
:type override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems]
|
|
505
595
|
:param tags: Enumerator of tags that are defined by parent class.
|
|
506
596
|
:param subtype: Enumerator in `rna_enum_property_subtype_number_items`.
|
|
507
|
-
:type subtype: bpy.stub_internal.rna_enums.PropertySubtypeNumberItems
|
|
508
597
|
:param update: Function to be called when this value is modified,
|
|
509
598
|
This function must take 2 values (self, context) and return None.
|
|
510
599
|
Warning there are no safety checks to avoid infinite recursion.
|
|
511
|
-
:
|
|
512
|
-
|
|
600
|
+
:param get: Function to be called when this value is read, and the default,
|
|
601
|
+
system-defined storage is not used for this property.
|
|
513
602
|
This function must take 1 value (self) and return the value of the property.
|
|
514
|
-
|
|
515
|
-
|
|
603
|
+
|
|
604
|
+
Defining this callback without a matching set one will make the property read-only (even if READ_ONLY option is not set).
|
|
605
|
+
:param set: Function to be called when this value is written, and the default,
|
|
606
|
+
system-defined storage is not used for this property.
|
|
516
607
|
This function must take 2 values (self, value) and return None.
|
|
517
|
-
|
|
608
|
+
|
|
609
|
+
Defining this callback without a matching get one is invalid.
|
|
610
|
+
:param get_transform: Function to be called when this value is read,
|
|
611
|
+
if some additional processing must be performed on the stored value.
|
|
612
|
+
This function must take three arguments (self, the stored value,
|
|
613
|
+
and a boolean indicating if the property is currently set),
|
|
614
|
+
and return the final, transformed value of the property.
|
|
615
|
+
|
|
616
|
+
The callback is responsible to ensure that value limits of the property (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
617
|
+
:param set_transform: Function to be called when this value is written,
|
|
618
|
+
if some additional processing must be performed on the given value before storing it.
|
|
619
|
+
This function must take four arguments (self, the given value to store,
|
|
620
|
+
the currently stored value (raw value, without any get_transform applied to it),
|
|
621
|
+
and a boolean indicating if the property is currently set),
|
|
622
|
+
and return the final, transformed value of the property.
|
|
623
|
+
|
|
624
|
+
The callback is responsible to ensure that value limits (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
518
625
|
"""
|
|
519
626
|
|
|
520
|
-
def IntVectorProperty(
|
|
627
|
+
def IntVectorProperty[_GenericType1: bpy.types.bpy_struct](
|
|
521
628
|
*,
|
|
522
629
|
name: str | None = "",
|
|
523
630
|
description: str | None = "",
|
|
@@ -530,58 +637,78 @@ def IntVectorProperty(
|
|
|
530
637
|
step: int | None = 1,
|
|
531
638
|
options: set[bpy.stub_internal.rna_enums.PropertyFlagItems] = {"ANIMATABLE"},
|
|
532
639
|
override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems] = set(),
|
|
533
|
-
tags=set(),
|
|
640
|
+
tags: set[str] | None = set(),
|
|
534
641
|
subtype: bpy.stub_internal.rna_enums.PropertySubtypeNumberArrayItems = "NONE",
|
|
535
642
|
size: collections.abc.Sequence[int] | int | None = 3,
|
|
536
|
-
update: collections.abc.Callable[[
|
|
643
|
+
update: collections.abc.Callable[[_GenericType1, bpy.types.Context], None]
|
|
537
644
|
| None = None,
|
|
538
|
-
get: collections.abc.Callable[[
|
|
645
|
+
get: collections.abc.Callable[[_GenericType1], collections.abc.Sequence[int]]
|
|
539
646
|
| None = None,
|
|
540
|
-
set: collections.abc.Callable[[
|
|
647
|
+
set: collections.abc.Callable[[_GenericType1, collections.abc.Sequence[int]], None]
|
|
648
|
+
| None = None,
|
|
649
|
+
get_transform: collections.abc.Callable[
|
|
650
|
+
[bpy.types.bpy_struct, collections.abc.Sequence[int], bool],
|
|
651
|
+
collections.abc.Sequence[int],
|
|
652
|
+
]
|
|
653
|
+
| None = None,
|
|
654
|
+
set_transform: collections.abc.Callable[
|
|
655
|
+
[
|
|
656
|
+
bpy.types.bpy_struct,
|
|
657
|
+
collections.abc.Sequence[int],
|
|
658
|
+
collections.abc.Sequence[int],
|
|
659
|
+
bool,
|
|
660
|
+
],
|
|
661
|
+
collections.abc.Sequence[int],
|
|
662
|
+
]
|
|
541
663
|
| None = None,
|
|
542
664
|
) -> None:
|
|
543
665
|
"""Returns a new vector int property definition.
|
|
544
666
|
|
|
545
667
|
:param name: Name used in the user interface.
|
|
546
|
-
:type name: str | None
|
|
547
668
|
:param description: Text used for the tooltip and api documentation.
|
|
548
|
-
:type description: str | None
|
|
549
669
|
:param translation_context: Text used as context to disambiguate translations.
|
|
550
|
-
:type translation_context: str | None
|
|
551
670
|
:param default: sequence of ints the length of size.
|
|
552
|
-
:type default: collections.abc.Sequence[int] | None
|
|
553
671
|
:param min: Hard minimum, trying to assign a value below will silently assign this minimum instead.
|
|
554
|
-
:type min: int | None
|
|
555
672
|
:param max: Hard maximum, trying to assign a value above will silently assign this maximum instead.
|
|
556
|
-
:type max: int | None
|
|
557
673
|
:param soft_min: Soft minimum (>= min), user wont be able to drag the widget below this value in the UI.
|
|
558
|
-
:type soft_min: int | None
|
|
559
674
|
:param soft_max: Soft maximum (<= max), user wont be able to drag the widget above this value in the UI.
|
|
560
|
-
:type soft_max: int | None
|
|
561
675
|
:param step: Step of increment/decrement in UI, in [1, 100], defaults to 1 (WARNING: unused currently!).
|
|
562
|
-
:type step: int | None
|
|
563
676
|
:param options: Enumerator in `rna_enum_property_flag_items`.
|
|
564
|
-
:type options: set[bpy.stub_internal.rna_enums.PropertyFlagItems]
|
|
565
677
|
:param override: Enumerator in `rna_enum_property_override_flag_items`.
|
|
566
|
-
:type override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems]
|
|
567
678
|
:param tags: Enumerator of tags that are defined by parent class.
|
|
568
679
|
:param subtype: Enumerator in `rna_enum_property_subtype_number_array_items`.
|
|
569
|
-
:type subtype: bpy.stub_internal.rna_enums.PropertySubtypeNumberArrayItems
|
|
570
680
|
:param size: Vector dimensions in [1, 32]. An int sequence can be used to define multi-dimension arrays.
|
|
571
|
-
:type size: collections.abc.Sequence[int] | int | None
|
|
572
681
|
:param update: Function to be called when this value is modified,
|
|
573
682
|
This function must take 2 values (self, context) and return None.
|
|
574
683
|
Warning there are no safety checks to avoid infinite recursion.
|
|
575
|
-
:
|
|
576
|
-
|
|
684
|
+
:param get: Function to be called when this value is read, and the default,
|
|
685
|
+
system-defined storage is not used for this property.
|
|
577
686
|
This function must take 1 value (self) and return the value of the property.
|
|
578
|
-
|
|
579
|
-
|
|
687
|
+
|
|
688
|
+
Defining this callback without a matching set one will make the property read-only (even if READ_ONLY option is not set).
|
|
689
|
+
:param set: Function to be called when this value is written, and the default,
|
|
690
|
+
system-defined storage is not used for this property.
|
|
580
691
|
This function must take 2 values (self, value) and return None.
|
|
581
|
-
|
|
692
|
+
|
|
693
|
+
Defining this callback without a matching get one is invalid.
|
|
694
|
+
:param get_transform: Function to be called when this value is read,
|
|
695
|
+
if some additional processing must be performed on the stored value.
|
|
696
|
+
This function must take three arguments (self, the stored value,
|
|
697
|
+
and a boolean indicating if the property is currently set),
|
|
698
|
+
and return the final, transformed value of the property.
|
|
699
|
+
|
|
700
|
+
The callback is responsible to ensure that value limits of the property (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
701
|
+
:param set_transform: Function to be called when this value is written,
|
|
702
|
+
if some additional processing must be performed on the given value before storing it.
|
|
703
|
+
This function must take four arguments (self, the given value to store,
|
|
704
|
+
the currently stored value (raw value, without any get_transform applied to it),
|
|
705
|
+
and a boolean indicating if the property is currently set),
|
|
706
|
+
and return the final, transformed value of the property.
|
|
707
|
+
|
|
708
|
+
The callback is responsible to ensure that value limits (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
582
709
|
"""
|
|
583
710
|
|
|
584
|
-
def PointerProperty(
|
|
711
|
+
def PointerProperty[_GenericType1: bpy.types.bpy_struct, _GenericType2: bpy.types.ID](
|
|
585
712
|
*,
|
|
586
713
|
type: type[bpy.types.PropertyGroup | bpy.types.ID] | None,
|
|
587
714
|
name: str | None = "",
|
|
@@ -589,48 +716,37 @@ def PointerProperty(
|
|
|
589
716
|
translation_context: str | None = "*",
|
|
590
717
|
options: set[bpy.stub_internal.rna_enums.PropertyFlagItems] = {"ANIMATABLE"},
|
|
591
718
|
override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems] = set(),
|
|
592
|
-
tags=set(),
|
|
593
|
-
poll: collections.abc.Callable[[
|
|
594
|
-
|
|
595
|
-
update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None]
|
|
719
|
+
tags: set[str] | None = set(),
|
|
720
|
+
poll: collections.abc.Callable[[_GenericType1, _GenericType2], bool] | None = None,
|
|
721
|
+
update: collections.abc.Callable[[_GenericType1, bpy.types.Context], None]
|
|
596
722
|
| None = None,
|
|
597
723
|
) -> None:
|
|
598
724
|
"""Returns a new pointer property definition.
|
|
599
725
|
|
|
600
|
-
:param type: A subclass of
|
|
601
|
-
:type type: type[bpy.types.PropertyGroup | bpy.types.ID] | None
|
|
726
|
+
:param type: A subclass of PropertyGroup or ID.
|
|
602
727
|
:param name: Name used in the user interface.
|
|
603
|
-
:type name: str | None
|
|
604
728
|
:param description: Text used for the tooltip and api documentation.
|
|
605
|
-
:type description: str | None
|
|
606
729
|
:param translation_context: Text used as context to disambiguate translations.
|
|
607
|
-
:type translation_context: str | None
|
|
608
730
|
:param options: Enumerator in `rna_enum_property_flag_items`.
|
|
609
|
-
:type options: set[bpy.stub_internal.rna_enums.PropertyFlagItems]
|
|
610
731
|
:param override: Enumerator in `rna_enum_property_override_flag_items`.
|
|
611
|
-
:type override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems]
|
|
612
732
|
:param tags: Enumerator of tags that are defined by parent class.
|
|
613
733
|
:param poll: Function that determines whether an item is valid for this property.
|
|
614
734
|
The function must take 2 values (self, object) and return a boolean.
|
|
615
735
|
|
|
616
736
|
The 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.
|
|
617
|
-
:type poll: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.ID], bool] | None
|
|
618
737
|
:param update: Function to be called when this value is modified,
|
|
619
738
|
This function must take 2 values (self, context) and return None.
|
|
620
739
|
Warning there are no safety checks to avoid infinite recursion.
|
|
621
|
-
:type update: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context], None] | None
|
|
622
740
|
"""
|
|
623
741
|
|
|
624
742
|
def RemoveProperty(*, cls: typing.Any | None, attr: str | None) -> None:
|
|
625
743
|
"""Removes a dynamically defined property.
|
|
626
744
|
|
|
627
745
|
:param cls: The class containing the property (must be a positional argument).
|
|
628
|
-
:type cls: typing.Any | None
|
|
629
746
|
:param attr: Property name (must be passed as a keyword).
|
|
630
|
-
:type attr: str | None
|
|
631
747
|
"""
|
|
632
748
|
|
|
633
|
-
def StringProperty(
|
|
749
|
+
def StringProperty[_GenericType1: bpy.types.bpy_struct](
|
|
634
750
|
*,
|
|
635
751
|
name: str | None = "",
|
|
636
752
|
description: str | None = "",
|
|
@@ -639,48 +755,62 @@ def StringProperty(
|
|
|
639
755
|
maxlen: int | None = 0,
|
|
640
756
|
options: set[bpy.stub_internal.rna_enums.PropertyFlagItems] = {"ANIMATABLE"},
|
|
641
757
|
override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems] = set(),
|
|
642
|
-
tags=set(),
|
|
758
|
+
tags: set[str] | None = set(),
|
|
643
759
|
subtype: bpy.stub_internal.rna_enums.PropertySubtypeStringItems = "NONE",
|
|
644
|
-
update: collections.abc.Callable[[
|
|
760
|
+
update: collections.abc.Callable[[_GenericType1, bpy.types.Context], None]
|
|
761
|
+
| None = None,
|
|
762
|
+
get: collections.abc.Callable[[_GenericType1], str] | None = None,
|
|
763
|
+
set: collections.abc.Callable[[_GenericType1, str], None] | None = None,
|
|
764
|
+
get_transform: collections.abc.Callable[[bpy.types.bpy_struct, str, bool], str]
|
|
765
|
+
| None = None,
|
|
766
|
+
set_transform: collections.abc.Callable[[bpy.types.bpy_struct, str, str, bool], str]
|
|
645
767
|
| None = None,
|
|
646
|
-
get: collections.abc.Callable[[bpy.types.bpy_struct], str] | None = None,
|
|
647
|
-
set: collections.abc.Callable[[bpy.types.bpy_struct, str], None] | None = None,
|
|
648
768
|
search: collections.abc.Callable[
|
|
649
|
-
[
|
|
769
|
+
[_GenericType1, bpy.types.Context, str],
|
|
650
770
|
collections.abc.Iterable[str | tuple[str, str]],
|
|
651
771
|
]
|
|
652
772
|
| None = None,
|
|
653
|
-
search_options={"SUGGESTION"},
|
|
773
|
+
search_options: set[str] | None = {"SUGGESTION"},
|
|
654
774
|
) -> None:
|
|
655
775
|
"""Returns a new string property definition.
|
|
656
776
|
|
|
657
777
|
:param name: Name used in the user interface.
|
|
658
|
-
:type name: str | None
|
|
659
778
|
:param description: Text used for the tooltip and api documentation.
|
|
660
|
-
:type description: str | None
|
|
661
779
|
:param translation_context: Text used as context to disambiguate translations.
|
|
662
|
-
:type translation_context: str | None
|
|
663
780
|
:param default: initializer string.
|
|
664
|
-
:type default: str | None
|
|
665
781
|
:param maxlen: maximum length of the string.
|
|
666
|
-
:type maxlen: int | None
|
|
667
782
|
:param options: Enumerator in `rna_enum_property_flag_items`.
|
|
668
|
-
:type options: set[bpy.stub_internal.rna_enums.PropertyFlagItems]
|
|
669
783
|
:param override: Enumerator in `rna_enum_property_override_flag_items`.
|
|
670
|
-
:type override: set[bpy.stub_internal.rna_enums.PropertyOverrideFlagItems]
|
|
671
784
|
:param tags: Enumerator of tags that are defined by parent class.
|
|
672
785
|
:param subtype: Enumerator in `rna_enum_property_subtype_string_items`.
|
|
673
|
-
:type subtype: bpy.stub_internal.rna_enums.PropertySubtypeStringItems
|
|
674
786
|
:param update: Function to be called when this value is modified,
|
|
675
787
|
This function must take 2 values (self, context) and return None.
|
|
676
788
|
Warning there are no safety checks to avoid infinite recursion.
|
|
677
|
-
:
|
|
678
|
-
|
|
789
|
+
:param get: Function to be called when this value is read, and the default,
|
|
790
|
+
system-defined storage is not used for this property.
|
|
679
791
|
This function must take 1 value (self) and return the value of the property.
|
|
680
|
-
|
|
681
|
-
|
|
792
|
+
|
|
793
|
+
Defining this callback without a matching set one will make the property read-only (even if READ_ONLY option is not set).
|
|
794
|
+
:param set: Function to be called when this value is written, and the default,
|
|
795
|
+
system-defined storage is not used for this property.
|
|
682
796
|
This function must take 2 values (self, value) and return None.
|
|
683
|
-
|
|
797
|
+
|
|
798
|
+
Defining this callback without a matching get one is invalid.
|
|
799
|
+
:param get_transform: Function to be called when this value is read,
|
|
800
|
+
if some additional processing must be performed on the stored value.
|
|
801
|
+
This function must take three arguments (self, the stored value,
|
|
802
|
+
and a boolean indicating if the property is currently set),
|
|
803
|
+
and return the final, transformed value of the property.
|
|
804
|
+
|
|
805
|
+
The callback is responsible to ensure that value limits of the property (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
806
|
+
:param set_transform: Function to be called when this value is written,
|
|
807
|
+
if some additional processing must be performed on the given value before storing it.
|
|
808
|
+
This function must take four arguments (self, the given value to store,
|
|
809
|
+
the currently stored value (raw value, without any get_transform applied to it),
|
|
810
|
+
and a boolean indicating if the property is currently set),
|
|
811
|
+
and return the final, transformed value of the property.
|
|
812
|
+
|
|
813
|
+
The callback is responsible to ensure that value limits (min/max, length...) are respected. Otherwise a ValueError exception is raised.
|
|
684
814
|
:param search: Function to be called to show candidates for this string (shown in the UI).
|
|
685
815
|
This function must take 3 values (self, context, edit_text)
|
|
686
816
|
and return a sequence, iterator or generator where each item must be:
|
|
@@ -689,7 +819,6 @@ def StringProperty(
|
|
|
689
819
|
|
|
690
820
|
A tuple-pair of strings, where the first is a candidate and the second
|
|
691
821
|
is additional information about the candidate.
|
|
692
|
-
:type search: collections.abc.Callable[[bpy.types.bpy_struct, bpy.types.Context, str], collections.abc.Iterable[str | tuple[str, str]]] | None
|
|
693
822
|
:param search_options: Set of strings in:
|
|
694
823
|
|
|
695
824
|
SORT sorts the resulting items.
|