fake-bpy-module 20240516__py3-none-any.whl → 20240517__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_internal/freedesktop/__init__.pyi +2 -2
- addon_utils/__init__.pyi +43 -12
- animsys_refactor/__init__.pyi +4 -4
- aud/__init__.pyi +7 -7
- bgl/__init__.pyi +121 -183
- bl_app_override/__init__.pyi +5 -5
- bl_app_override/helpers/__init__.pyi +3 -1
- bl_app_template_utils/__init__.pyi +5 -5
- bl_console_utils/autocomplete/complete_calltip/__init__.pyi +48 -10
- bl_console_utils/autocomplete/complete_import/__init__.pyi +27 -6
- bl_console_utils/autocomplete/complete_namespace/__init__.pyi +40 -8
- bl_console_utils/autocomplete/intellisense/__init__.pyi +31 -4
- bl_i18n_utils/bl_extract_messages/__init__.pyi +5 -5
- bl_i18n_utils/settings/__init__.pyi +4 -2
- bl_i18n_utils/utils/__init__.pyi +86 -58
- bl_i18n_utils/utils_rtl/__init__.pyi +8 -2
- bl_keymap_utils/io/__init__.pyi +4 -4
- bl_keymap_utils/keymap_from_toolbar/__init__.pyi +2 -2
- bl_keymap_utils/platform_helpers/__init__.pyi +2 -2
- bl_operators/add_mesh_torus/__init__.pyi +126 -41
- bl_operators/anim/__init__.pyi +1001 -328
- bl_operators/assets/__init__.pyi +376 -123
- bl_operators/bmesh/find_adjacent/__init__.pyi +3 -3
- bl_operators/clip/__init__.pyi +1250 -409
- bl_operators/console/__init__.pyi +626 -205
- bl_operators/constraint/__init__.pyi +502 -165
- bl_operators/file/__init__.pyi +376 -123
- bl_operators/freestyle/__init__.pyi +501 -164
- bl_operators/geometry_nodes/__init__.pyi +501 -164
- bl_operators/image/__init__.pyi +621 -200
- bl_operators/mesh/__init__.pyi +376 -123
- bl_operators/node/__init__.pyi +1243 -402
- bl_operators/object/__init__.pyi +1876 -615
- bl_operators/object_align/__init__.pyi +126 -41
- bl_operators/object_quick_effects/__init__.pyi +502 -165
- bl_operators/object_randomize_transform/__init__.pyi +126 -41
- bl_operators/presets/__init__.pyi +3069 -1027
- bl_operators/rigidbody/__init__.pyi +376 -123
- bl_operators/screen_play_rendered_anim/__init__.pyi +126 -41
- bl_operators/sequencer/__init__.pyi +1009 -331
- bl_operators/spreadsheet/__init__.pyi +126 -41
- bl_operators/userpref/__init__.pyi +3263 -1078
- bl_operators/uvcalc_follow_active/__init__.pyi +126 -41
- bl_operators/uvcalc_lightmap/__init__.pyi +137 -47
- bl_operators/uvcalc_transform/__init__.pyi +289 -90
- bl_operators/vertexpaint_dirt/__init__.pyi +126 -41
- bl_operators/view3d/__init__.pyi +868 -279
- bl_operators/wm/__init__.pyi +5777 -1934
- bl_operators/world/__init__.pyi +126 -41
- bl_previews_utils/bl_previews_render/__init__.pyi +1 -1
- bl_rna_utils/data_path/__init__.pyi +8 -3
- bl_ui/__init__.pyi +338 -131
- bl_ui/anim/__init__.pyi +164 -64
- bl_ui/asset_shelf/__init__.pyi +129 -42
- bl_ui/generic_ui_list/__init__.pyi +412 -135
- bl_ui/node_add_menu/__init__.pyi +168 -68
- bl_ui/node_add_menu_compositor/__init__.pyi +2921 -1138
- bl_ui/node_add_menu_geometry/__init__.pyi +7785 -3032
- bl_ui/node_add_menu_shader/__init__.pyi +1621 -630
- bl_ui/node_add_menu_texture/__init__.pyi +1459 -567
- bl_ui/properties_animviz/__init__.pyi +2 -2
- bl_ui/properties_collection/__init__.pyi +806 -274
- bl_ui/properties_constraint/__init__.pyi +10253 -3458
- bl_ui/properties_data_armature/__init__.pyi +1615 -552
- bl_ui/properties_data_bone/__init__.pyi +1288 -425
- bl_ui/properties_data_camera/__init__.pyi +1854 -631
- bl_ui/properties_data_curve/__init__.pyi +1929 -636
- bl_ui/properties_data_curves/__init__.pyi +806 -274
- bl_ui/properties_data_empty/__init__.pyi +257 -84
- bl_ui/properties_data_gpencil/__init__.pyi +2380 -803
- bl_ui/properties_data_grease_pencil/__init__.pyi +1902 -656
- bl_ui/properties_data_lattice/__init__.pyi +388 -127
- bl_ui/properties_data_light/__init__.pyi +1541 -506
- bl_ui/properties_data_lightprobe/__init__.pyi +1667 -548
- bl_ui/properties_data_mesh/__init__.pyi +2704 -929
- bl_ui/properties_data_metaball/__init__.pyi +644 -211
- bl_ui/properties_data_modifier/__init__.pyi +1353 -502
- bl_ui/properties_data_pointcloud/__init__.pyi +679 -233
- bl_ui/properties_data_shaderfx/__init__.pyi +129 -42
- bl_ui/properties_data_speaker/__init__.pyi +644 -211
- bl_ui/properties_data_volume/__init__.pyi +1030 -339
- bl_ui/properties_freestyle/__init__.pyi +3113 -1035
- bl_ui/properties_grease_pencil_common/__init__.pyi +2464 -933
- bl_ui/properties_mask_common/__init__.pyi +1101 -420
- bl_ui/properties_material/__init__.pyi +2091 -699
- bl_ui/properties_material_gpencil/__init__.pyi +1350 -466
- bl_ui/properties_object/__init__.pyi +1838 -618
- bl_ui/properties_output/__init__.pyi +2414 -831
- bl_ui/properties_paint_common/__init__.pyi +412 -289
- bl_ui/properties_particle/__init__.pyi +6737 -2241
- bl_ui/properties_physics_cloth/__init__.pyi +1825 -612
- bl_ui/properties_physics_common/__init__.pyi +129 -42
- bl_ui/properties_physics_dynamicpaint/__init__.pyi +2821 -928
- bl_ui/properties_physics_field/__init__.pyi +1283 -422
- bl_ui/properties_physics_fluid/__init__.pyi +3620 -1203
- bl_ui/properties_physics_geometry_nodes/__init__.pyi +129 -42
- bl_ui/properties_physics_rigidbody/__init__.pyi +1027 -338
- bl_ui/properties_physics_rigidbody_constraint/__init__.pyi +1667 -548
- bl_ui/properties_physics_softbody/__init__.pyi +1924 -633
- bl_ui/properties_render/__init__.pyi +6830 -2263
- bl_ui/properties_scene/__init__.pyi +1929 -636
- bl_ui/properties_texture/__init__.pyi +3370 -1118
- bl_ui/properties_view_layer/__init__.pyi +2346 -782
- bl_ui/properties_workspace/__init__.pyi +516 -169
- bl_ui/properties_world/__init__.pyi +1284 -421
- bl_ui/space_clip/__init__.pyi +10134 -3639
- bl_ui/space_console/__init__.pyi +939 -357
- bl_ui/space_dopesheet/__init__.pyi +4327 -1562
- bl_ui/space_filebrowser/__init__.pyi +4164 -1499
- bl_ui/space_graph/__init__.pyi +3108 -1179
- bl_ui/space_image/__init__.pyi +9766 -3596
- bl_ui/space_info/__init__.pyi +939 -357
- bl_ui/space_nla/__init__.pyi +2620 -988
- bl_ui/space_node/__init__.pyi +3994 -1434
- bl_ui/space_outliner/__init__.pyi +2203 -842
- bl_ui/space_properties/__init__.pyi +386 -127
- bl_ui/space_sequencer/__init__.pyi +10773 -3878
- bl_ui/space_spreadsheet/__init__.pyi +130 -43
- bl_ui/space_statusbar/__init__.pyi +129 -42
- bl_ui/space_text/__init__.pyi +2458 -925
- bl_ui/space_time/__init__.pyi +1033 -378
- bl_ui/space_toolsystem_common/__init__.pyi +20 -16
- bl_ui/space_toolsystem_toolbar/__init__.pyi +37 -21
- bl_ui/space_topbar/__init__.pyi +3980 -1496
- bl_ui/space_userpref/__init__.pyi +11373 -3797
- bl_ui/space_view3d/__init__.pyi +40865 -15356
- bl_ui/space_view3d_toolbar/__init__.pyi +12520 -4647
- bl_ui/temp_anim_layers/__init__.pyi +129 -42
- bl_ui/utils/__init__.pyi +28 -20
- bl_ui_utils/bug_report_url/__init__.pyi +1 -1
- bl_ui_utils/layout/__init__.pyi +1 -1
- blend_render_info/__init__.pyi +1 -1
- blf/__init__.pyi +4 -4
- bmesh/geometry/__init__.pyi +2 -3
- bmesh/ops/__init__.pyi +372 -419
- bmesh/types/__init__.pyi +38 -38
- bmesh/utils/__init__.pyi +10 -13
- bpy/app/__init__.pyi +4 -4
- bpy/app/handlers/__init__.pyi +36 -36
- bpy/app/icons/__init__.pyi +8 -8
- bpy/app/timers/__init__.pyi +10 -10
- bpy/app/translations/__init__.pyi +20 -22
- bpy/msgbus/__init__.pyi +2 -4
- bpy/ops/action/__init__.pyi +316 -394
- bpy/ops/anim/__init__.pyi +442 -548
- bpy/ops/armature/__init__.pyi +374 -470
- bpy/ops/asset/__init__.pyi +152 -184
- bpy/ops/bl_pkg/__init__.pyi +221 -272
- bpy/ops/boid/__init__.pyi +50 -66
- bpy/ops/brush/__init__.pyi +72 -90
- bpy/ops/buttons/__init__.pyi +132 -144
- bpy/ops/cachefile/__init__.pyi +128 -138
- bpy/ops/camera/__init__.pyi +26 -30
- bpy/ops/clip/__init__.pyi +777 -964
- bpy/ops/cloth/__init__.pyi +12 -14
- bpy/ops/collection/__init__.pyi +68 -86
- bpy/ops/console/__init__.pyi +158 -200
- bpy/ops/constraint/__init__.pyi +178 -214
- bpy/ops/curve/__init__.pyi +473 -576
- bpy/ops/curves/__init__.pyi +247 -302
- bpy/ops/cycles/__init__.pyi +28 -34
- bpy/ops/dpaint/__init__.pyi +34 -44
- bpy/ops/ed/__init__.pyi +126 -150
- bpy/ops/export_anim/__init__.pyi +22 -24
- bpy/ops/export_scene/__init__.pyi +302 -336
- bpy/ops/file/__init__.pyi +352 -432
- bpy/ops/fluid/__init__.pyi +90 -118
- bpy/ops/font/__init__.pyi +258 -304
- bpy/ops/geometry/__init__.pyi +100 -120
- bpy/ops/gizmogroup/__init__.pyi +22 -26
- bpy/ops/gpencil/__init__.pyi +1469 -1778
- bpy/ops/graph/__init__.pyi +644 -776
- bpy/ops/grease_pencil/__init__.pyi +597 -748
- bpy/ops/image/__init__.pyi +648 -744
- bpy/ops/import_anim/__init__.pyi +30 -32
- bpy/ops/import_curve/__init__.pyi +10 -12
- bpy/ops/import_scene/__init__.pyi +88 -96
- bpy/ops/info/__init__.pyi +60 -74
- bpy/ops/lattice/__init__.pyi +64 -80
- bpy/ops/marker/__init__.pyi +108 -130
- bpy/ops/mask/__init__.pyi +322 -402
- bpy/ops/material/__init__.pyi +18 -24
- bpy/ops/mball/__init__.pyi +70 -86
- bpy/ops/mesh/__init__.pyi +1986 -2322
- bpy/ops/nla/__init__.pyi +333 -411
- bpy/ops/node/__init__.pyi +886 -1100
- bpy/ops/object/__init__.pyi +2585 -3078
- bpy/ops/outliner/__init__.pyi +498 -636
- bpy/ops/paint/__init__.pyi +565 -680
- bpy/ops/paintcurve/__init__.pyi +64 -80
- bpy/ops/palette/__init__.pyi +50 -64
- bpy/ops/particle/__init__.pyi +267 -340
- bpy/ops/pose/__init__.pyi +336 -414
- bpy/ops/poselib/__init__.pyi +72 -90
- bpy/ops/preferences/__init__.pyi +386 -463
- bpy/ops/ptcache/__init__.pyi +46 -60
- bpy/ops/render/__init__.pyi +130 -154
- bpy/ops/rigidbody/__init__.pyi +102 -128
- bpy/ops/scene/__init__.pyi +280 -358
- bpy/ops/screen/__init__.pyi +382 -460
- bpy/ops/script/__init__.pyi +24 -30
- bpy/ops/sculpt/__init__.pyi +458 -532
- bpy/ops/sculpt_curves/__init__.pyi +41 -50
- bpy/ops/sequencer/__init__.pyi +1066 -1244
- bpy/ops/sound/__init__.pyi +216 -230
- bpy/ops/spreadsheet/__init__.pyi +30 -38
- bpy/ops/surface/__init__.pyi +108 -120
- bpy/ops/text/__init__.pyi +390 -476
- bpy/ops/text_editor/__init__.pyi +12 -14
- bpy/ops/texture/__init__.pyi +26 -34
- bpy/ops/transform/__init__.pyi +792 -878
- bpy/ops/ui/__init__.pyi +228 -294
- bpy/ops/uilist/__init__.pyi +32 -38
- bpy/ops/uv/__init__.pyi +602 -704
- bpy/ops/view2d/__init__.pyi +156 -184
- bpy/ops/view3d/__init__.pyi +582 -718
- bpy/ops/wm/__init__.pyi +2680 -2928
- bpy/ops/workspace/__init__.pyi +46 -60
- bpy/ops/world/__init__.pyi +12 -16
- bpy/path/__init__.pyi +179 -75
- bpy/props/__init__.pyi +261 -263
- bpy/types/__init__.pyi +17056 -21951
- bpy/utils/__init__.pyi +242 -118
- bpy/utils/previews/__init__.pyi +58 -28
- bpy/utils/units/__init__.pyi +20 -20
- bpy_extras/anim_utils/__init__.pyi +68 -28
- bpy_extras/bmesh_utils/__init__.pyi +8 -2
- bpy_extras/extensions/junction_module/__init__.pyi +5 -2
- bpy_extras/id_map_utils/__init__.pyi +3 -3
- bpy_extras/image_utils/__init__.pyi +44 -11
- bpy_extras/io_utils/__init__.pyi +113 -18
- bpy_extras/keyconfig_utils/__init__.pyi +2 -2
- bpy_extras/mesh_utils/__init__.pyi +71 -19
- bpy_extras/node_shader_utils/__init__.pyi +9 -4
- bpy_extras/node_utils/__init__.pyi +9 -2
- bpy_extras/object_utils/__init__.pyi +71 -12
- bpy_extras/view3d_utils/__init__.pyi +80 -10
- bpy_extras/wm_utils/progress_report/__init__.pyi +13 -10
- bpy_types/__init__.pyi +4197 -1333
- console_python/__init__.pyi +6 -1
- {fake_bpy_module-20240516.dist-info → fake_bpy_module-20240517.dist-info}/METADATA +1 -1
- fake_bpy_module-20240517.dist-info/RECORD +353 -0
- freestyle/chainingiterators/__init__.pyi +4 -4
- freestyle/shaders/__init__.pyi +2 -2
- freestyle/types/__init__.pyi +84 -96
- freestyle/utils/ContextFunctions/__init__.pyi +2 -2
- freestyle/utils/__init__.pyi +3 -3
- gpu/matrix/__init__.pyi +6 -8
- gpu/state/__init__.pyi +2 -2
- gpu/types/__init__.pyi +12 -12
- gpu_extras/presets/__init__.pyi +2 -5
- graphviz_export/__init__.pyi +4 -2
- idprop/types/__init__.pyi +2 -2
- imbuf/__init__.pyi +4 -4
- keyingsets_builtins/__init__.pyi +2688 -839
- mathutils/__init__.pyi +194 -238
- mathutils/bvhtree/__init__.pyi +4 -4
- mathutils/geometry/__init__.pyi +153 -155
- mathutils/kdtree/__init__.pyi +8 -12
- mathutils/noise/__init__.pyi +26 -26
- nodeitems_utils/__init__.pyi +1 -1
- rna_info/__init__.pyi +17 -15
- rna_keymap_ui/__init__.pyi +1 -1
- rna_prop_ui/__init__.pyi +16 -14
- rna_xml/__init__.pyi +12 -12
- _bpy_internal/freedesktop/py.typed +0 -0
- bl_app_override/helpers/py.typed +0 -0
- bl_console_utils/autocomplete/complete_calltip/py.typed +0 -0
- bl_console_utils/autocomplete/complete_import/py.typed +0 -0
- bl_console_utils/autocomplete/complete_namespace/py.typed +0 -0
- bl_console_utils/autocomplete/intellisense/py.typed +0 -0
- bl_console_utils/autocomplete/py.typed +0 -0
- bl_i18n_utils/bl_extract_messages/py.typed +0 -0
- bl_i18n_utils/merge_po/py.typed +0 -0
- bl_i18n_utils/settings/py.typed +0 -0
- bl_i18n_utils/utils/py.typed +0 -0
- bl_i18n_utils/utils_cli/py.typed +0 -0
- bl_i18n_utils/utils_languages_menu/py.typed +0 -0
- bl_i18n_utils/utils_rtl/py.typed +0 -0
- bl_keymap_utils/io/py.typed +0 -0
- bl_keymap_utils/keymap_from_toolbar/py.typed +0 -0
- bl_keymap_utils/keymap_hierarchy/py.typed +0 -0
- bl_keymap_utils/platform_helpers/py.typed +0 -0
- bl_keymap_utils/versioning/py.typed +0 -0
- bl_operators/add_mesh_torus/py.typed +0 -0
- bl_operators/anim/py.typed +0 -0
- bl_operators/assets/py.typed +0 -0
- bl_operators/bmesh/find_adjacent/py.typed +0 -0
- bl_operators/bmesh/py.typed +0 -0
- bl_operators/clip/py.typed +0 -0
- bl_operators/console/py.typed +0 -0
- bl_operators/constraint/py.typed +0 -0
- bl_operators/file/py.typed +0 -0
- bl_operators/freestyle/py.typed +0 -0
- bl_operators/geometry_nodes/py.typed +0 -0
- bl_operators/image/py.typed +0 -0
- bl_operators/mesh/py.typed +0 -0
- bl_operators/node/py.typed +0 -0
- bl_operators/object/py.typed +0 -0
- bl_operators/object_align/py.typed +0 -0
- bl_operators/object_quick_effects/py.typed +0 -0
- bl_operators/object_randomize_transform/py.typed +0 -0
- bl_operators/presets/py.typed +0 -0
- bl_operators/rigidbody/py.typed +0 -0
- bl_operators/screen_play_rendered_anim/py.typed +0 -0
- bl_operators/sequencer/py.typed +0 -0
- bl_operators/spreadsheet/py.typed +0 -0
- bl_operators/userpref/py.typed +0 -0
- bl_operators/uvcalc_follow_active/py.typed +0 -0
- bl_operators/uvcalc_lightmap/py.typed +0 -0
- bl_operators/uvcalc_transform/py.typed +0 -0
- bl_operators/vertexpaint_dirt/py.typed +0 -0
- bl_operators/view3d/py.typed +0 -0
- bl_operators/wm/py.typed +0 -0
- bl_operators/world/py.typed +0 -0
- bl_previews_utils/bl_previews_render/py.typed +0 -0
- bl_rna_utils/data_path/py.typed +0 -0
- bl_text_utils/external_editor/py.typed +0 -0
- bl_ui/anim/py.typed +0 -0
- bl_ui/asset_shelf/py.typed +0 -0
- bl_ui/generic_ui_list/py.typed +0 -0
- bl_ui/node_add_menu/py.typed +0 -0
- bl_ui/node_add_menu_compositor/py.typed +0 -0
- bl_ui/node_add_menu_geometry/py.typed +0 -0
- bl_ui/node_add_menu_shader/py.typed +0 -0
- bl_ui/node_add_menu_texture/py.typed +0 -0
- bl_ui/properties_animviz/py.typed +0 -0
- bl_ui/properties_collection/py.typed +0 -0
- bl_ui/properties_constraint/py.typed +0 -0
- bl_ui/properties_data_armature/py.typed +0 -0
- bl_ui/properties_data_bone/py.typed +0 -0
- bl_ui/properties_data_camera/py.typed +0 -0
- bl_ui/properties_data_curve/py.typed +0 -0
- bl_ui/properties_data_curves/py.typed +0 -0
- bl_ui/properties_data_empty/py.typed +0 -0
- bl_ui/properties_data_gpencil/py.typed +0 -0
- bl_ui/properties_data_grease_pencil/py.typed +0 -0
- bl_ui/properties_data_lattice/py.typed +0 -0
- bl_ui/properties_data_light/py.typed +0 -0
- bl_ui/properties_data_lightprobe/py.typed +0 -0
- bl_ui/properties_data_mesh/py.typed +0 -0
- bl_ui/properties_data_metaball/py.typed +0 -0
- bl_ui/properties_data_modifier/py.typed +0 -0
- bl_ui/properties_data_pointcloud/py.typed +0 -0
- bl_ui/properties_data_shaderfx/py.typed +0 -0
- bl_ui/properties_data_speaker/py.typed +0 -0
- bl_ui/properties_data_volume/py.typed +0 -0
- bl_ui/properties_freestyle/py.typed +0 -0
- bl_ui/properties_grease_pencil_common/py.typed +0 -0
- bl_ui/properties_mask_common/py.typed +0 -0
- bl_ui/properties_material/py.typed +0 -0
- bl_ui/properties_material_gpencil/py.typed +0 -0
- bl_ui/properties_object/py.typed +0 -0
- bl_ui/properties_output/py.typed +0 -0
- bl_ui/properties_paint_common/py.typed +0 -0
- bl_ui/properties_particle/py.typed +0 -0
- bl_ui/properties_physics_cloth/py.typed +0 -0
- bl_ui/properties_physics_common/py.typed +0 -0
- bl_ui/properties_physics_dynamicpaint/py.typed +0 -0
- bl_ui/properties_physics_field/py.typed +0 -0
- bl_ui/properties_physics_fluid/py.typed +0 -0
- bl_ui/properties_physics_geometry_nodes/py.typed +0 -0
- bl_ui/properties_physics_rigidbody/py.typed +0 -0
- bl_ui/properties_physics_rigidbody_constraint/py.typed +0 -0
- bl_ui/properties_physics_softbody/py.typed +0 -0
- bl_ui/properties_render/py.typed +0 -0
- bl_ui/properties_scene/py.typed +0 -0
- bl_ui/properties_texture/py.typed +0 -0
- bl_ui/properties_view_layer/py.typed +0 -0
- bl_ui/properties_workspace/py.typed +0 -0
- bl_ui/properties_world/py.typed +0 -0
- bl_ui/space_clip/py.typed +0 -0
- bl_ui/space_console/py.typed +0 -0
- bl_ui/space_dopesheet/py.typed +0 -0
- bl_ui/space_filebrowser/py.typed +0 -0
- bl_ui/space_graph/py.typed +0 -0
- bl_ui/space_image/py.typed +0 -0
- bl_ui/space_info/py.typed +0 -0
- bl_ui/space_nla/py.typed +0 -0
- bl_ui/space_node/py.typed +0 -0
- bl_ui/space_outliner/py.typed +0 -0
- bl_ui/space_properties/py.typed +0 -0
- bl_ui/space_sequencer/py.typed +0 -0
- bl_ui/space_spreadsheet/py.typed +0 -0
- bl_ui/space_statusbar/py.typed +0 -0
- bl_ui/space_text/py.typed +0 -0
- bl_ui/space_time/py.typed +0 -0
- bl_ui/space_toolsystem_common/py.typed +0 -0
- bl_ui/space_toolsystem_toolbar/py.typed +0 -0
- bl_ui/space_topbar/py.typed +0 -0
- bl_ui/space_userpref/py.typed +0 -0
- bl_ui/space_view3d/py.typed +0 -0
- bl_ui/space_view3d_toolbar/py.typed +0 -0
- bl_ui/temp_anim_layers/py.typed +0 -0
- bl_ui/utils/py.typed +0 -0
- bl_ui_utils/bug_report_url/py.typed +0 -0
- bl_ui_utils/layout/py.typed +0 -0
- bmesh/geometry/py.typed +0 -0
- bmesh/ops/py.typed +0 -0
- bmesh/types/py.typed +0 -0
- bmesh/utils/py.typed +0 -0
- bpy/app/handlers/py.typed +0 -0
- bpy/app/icons/py.typed +0 -0
- bpy/app/py.typed +0 -0
- bpy/app/timers/py.typed +0 -0
- bpy/app/translations/py.typed +0 -0
- bpy/msgbus/py.typed +0 -0
- bpy/ops/action/py.typed +0 -0
- bpy/ops/anim/py.typed +0 -0
- bpy/ops/armature/py.typed +0 -0
- bpy/ops/asset/py.typed +0 -0
- bpy/ops/bl_pkg/py.typed +0 -0
- bpy/ops/boid/py.typed +0 -0
- bpy/ops/brush/py.typed +0 -0
- bpy/ops/buttons/py.typed +0 -0
- bpy/ops/cachefile/py.typed +0 -0
- bpy/ops/camera/py.typed +0 -0
- bpy/ops/clip/py.typed +0 -0
- bpy/ops/cloth/py.typed +0 -0
- bpy/ops/collection/py.typed +0 -0
- bpy/ops/console/py.typed +0 -0
- bpy/ops/constraint/py.typed +0 -0
- bpy/ops/curve/py.typed +0 -0
- bpy/ops/curves/py.typed +0 -0
- bpy/ops/cycles/py.typed +0 -0
- bpy/ops/dpaint/py.typed +0 -0
- bpy/ops/ed/py.typed +0 -0
- bpy/ops/export_anim/py.typed +0 -0
- bpy/ops/export_scene/py.typed +0 -0
- bpy/ops/file/py.typed +0 -0
- bpy/ops/fluid/py.typed +0 -0
- bpy/ops/font/py.typed +0 -0
- bpy/ops/geometry/py.typed +0 -0
- bpy/ops/gizmogroup/py.typed +0 -0
- bpy/ops/gpencil/py.typed +0 -0
- bpy/ops/graph/py.typed +0 -0
- bpy/ops/grease_pencil/py.typed +0 -0
- bpy/ops/image/py.typed +0 -0
- bpy/ops/import_anim/py.typed +0 -0
- bpy/ops/import_curve/py.typed +0 -0
- bpy/ops/import_scene/py.typed +0 -0
- bpy/ops/info/py.typed +0 -0
- bpy/ops/lattice/py.typed +0 -0
- bpy/ops/marker/py.typed +0 -0
- bpy/ops/mask/py.typed +0 -0
- bpy/ops/material/py.typed +0 -0
- bpy/ops/mball/py.typed +0 -0
- bpy/ops/mesh/py.typed +0 -0
- bpy/ops/nla/py.typed +0 -0
- bpy/ops/node/py.typed +0 -0
- bpy/ops/object/py.typed +0 -0
- bpy/ops/outliner/py.typed +0 -0
- bpy/ops/paint/py.typed +0 -0
- bpy/ops/paintcurve/py.typed +0 -0
- bpy/ops/palette/py.typed +0 -0
- bpy/ops/particle/py.typed +0 -0
- bpy/ops/pose/py.typed +0 -0
- bpy/ops/poselib/py.typed +0 -0
- bpy/ops/preferences/py.typed +0 -0
- bpy/ops/ptcache/py.typed +0 -0
- bpy/ops/py.typed +0 -0
- bpy/ops/render/py.typed +0 -0
- bpy/ops/rigidbody/py.typed +0 -0
- bpy/ops/scene/py.typed +0 -0
- bpy/ops/screen/py.typed +0 -0
- bpy/ops/script/py.typed +0 -0
- bpy/ops/sculpt/py.typed +0 -0
- bpy/ops/sculpt_curves/py.typed +0 -0
- bpy/ops/sequencer/py.typed +0 -0
- bpy/ops/sound/py.typed +0 -0
- bpy/ops/spreadsheet/py.typed +0 -0
- bpy/ops/surface/py.typed +0 -0
- bpy/ops/text/py.typed +0 -0
- bpy/ops/text_editor/py.typed +0 -0
- bpy/ops/texture/py.typed +0 -0
- bpy/ops/transform/py.typed +0 -0
- bpy/ops/ui/py.typed +0 -0
- bpy/ops/uilist/py.typed +0 -0
- bpy/ops/uv/py.typed +0 -0
- bpy/ops/view2d/py.typed +0 -0
- bpy/ops/view3d/py.typed +0 -0
- bpy/ops/wm/py.typed +0 -0
- bpy/ops/workspace/py.typed +0 -0
- bpy/ops/world/py.typed +0 -0
- bpy/path/py.typed +0 -0
- bpy/props/py.typed +0 -0
- bpy/types/py.typed +0 -0
- bpy/utils/previews/py.typed +0 -0
- bpy/utils/py.typed +0 -0
- bpy/utils/units/py.typed +0 -0
- bpy_extras/anim_utils/py.typed +0 -0
- bpy_extras/asset_utils/py.typed +0 -0
- bpy_extras/bmesh_utils/py.typed +0 -0
- bpy_extras/extensions/junction_module/py.typed +0 -0
- bpy_extras/extensions/py.typed +0 -0
- bpy_extras/id_map_utils/py.typed +0 -0
- bpy_extras/image_utils/py.typed +0 -0
- bpy_extras/io_utils/py.typed +0 -0
- bpy_extras/keyconfig_utils/py.typed +0 -0
- bpy_extras/mesh_utils/py.typed +0 -0
- bpy_extras/node_shader_utils/py.typed +0 -0
- bpy_extras/node_utils/py.typed +0 -0
- bpy_extras/object_utils/py.typed +0 -0
- bpy_extras/view3d_utils/py.typed +0 -0
- bpy_extras/wm_utils/progress_report/py.typed +0 -0
- bpy_extras/wm_utils/py.typed +0 -0
- fake_bpy_module-20240516.dist-info/RECORD +0 -618
- freestyle/chainingiterators/py.typed +0 -0
- freestyle/functions/py.typed +0 -0
- freestyle/predicates/py.typed +0 -0
- freestyle/shaders/py.typed +0 -0
- freestyle/types/py.typed +0 -0
- freestyle/utils/ContextFunctions/py.typed +0 -0
- freestyle/utils/py.typed +0 -0
- gpu/capabilities/py.typed +0 -0
- gpu/matrix/py.typed +0 -0
- gpu/platform/py.typed +0 -0
- gpu/select/py.typed +0 -0
- gpu/shader/py.typed +0 -0
- gpu/state/py.typed +0 -0
- gpu/texture/py.typed +0 -0
- gpu/types/py.typed +0 -0
- gpu_extras/batch/py.typed +0 -0
- gpu_extras/presets/py.typed +0 -0
- idprop/types/py.typed +0 -0
- imbuf/types/py.typed +0 -0
- mathutils/bvhtree/py.typed +0 -0
- mathutils/geometry/py.typed +0 -0
- mathutils/interpolate/py.typed +0 -0
- mathutils/kdtree/py.typed +0 -0
- mathutils/noise/py.typed +0 -0
- {fake_bpy_module-20240516.dist-info → fake_bpy_module-20240517.dist-info}/WHEEL +0 -0
- {fake_bpy_module-20240516.dist-info → fake_bpy_module-20240517.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import typing
|
|
2
|
+
import bpy.types
|
|
2
3
|
import bpy_types
|
|
3
4
|
|
|
4
5
|
GenericType = typing.TypeVar("GenericType")
|
|
@@ -18,47 +19,79 @@ class AddModifierMenu(bpy_types.Operator):
|
|
|
18
19
|
id_data: typing.Any
|
|
19
20
|
""" """
|
|
20
21
|
|
|
21
|
-
def as_keywords(self, ignore):
|
|
22
|
-
"""
|
|
22
|
+
def as_keywords(self, ignore=()):
|
|
23
|
+
"""Return a copy of the properties as a dictionary
|
|
23
24
|
|
|
24
25
|
:param ignore:
|
|
25
26
|
"""
|
|
26
27
|
...
|
|
27
28
|
|
|
28
|
-
def as_pointer(self):
|
|
29
|
-
"""
|
|
29
|
+
def as_pointer(self) -> int:
|
|
30
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
31
|
+
|
|
32
|
+
:return: int (memory address).
|
|
33
|
+
:rtype: int
|
|
34
|
+
"""
|
|
30
35
|
...
|
|
31
36
|
|
|
32
|
-
def bl_rna_get_subclass(self):
|
|
33
|
-
"""
|
|
37
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
:return: The RNA type or default when not found.
|
|
41
|
+
:rtype: bpy.types.Struct
|
|
42
|
+
"""
|
|
34
43
|
...
|
|
35
44
|
|
|
36
|
-
def bl_rna_get_subclass_py(self):
|
|
37
|
-
"""
|
|
45
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
:return: The class or default when not found.
|
|
49
|
+
:rtype: typing.Any
|
|
50
|
+
"""
|
|
38
51
|
...
|
|
39
52
|
|
|
40
|
-
def driver_add(self):
|
|
41
|
-
"""
|
|
53
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
54
|
+
"""Adds driver(s) to the given property
|
|
55
|
+
|
|
56
|
+
:return: The driver(s) added.
|
|
57
|
+
:rtype: bpy.types.FCurve
|
|
58
|
+
"""
|
|
42
59
|
...
|
|
43
60
|
|
|
44
|
-
def driver_remove(self):
|
|
45
|
-
"""
|
|
61
|
+
def driver_remove(self) -> bool:
|
|
62
|
+
"""Remove driver(s) from the given property
|
|
63
|
+
|
|
64
|
+
:return: Success of driver removal.
|
|
65
|
+
:rtype: bool
|
|
66
|
+
"""
|
|
46
67
|
...
|
|
47
68
|
|
|
48
69
|
def get(self):
|
|
49
|
-
"""
|
|
70
|
+
"""Returns the value of the custom property assigned to key or default
|
|
71
|
+
when not found (matches Python's dictionary function of the same name).
|
|
72
|
+
|
|
73
|
+
"""
|
|
50
74
|
...
|
|
51
75
|
|
|
52
76
|
def id_properties_clear(self):
|
|
53
|
-
"""
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
80
|
+
"""
|
|
54
81
|
...
|
|
55
82
|
|
|
56
83
|
def id_properties_ensure(self):
|
|
57
|
-
"""
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
87
|
+
"""
|
|
58
88
|
...
|
|
59
89
|
|
|
60
90
|
def id_properties_ui(self):
|
|
61
|
-
"""
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
94
|
+
"""
|
|
62
95
|
...
|
|
63
96
|
|
|
64
97
|
def invoke(self, context, event):
|
|
@@ -69,44 +102,81 @@ class AddModifierMenu(bpy_types.Operator):
|
|
|
69
102
|
"""
|
|
70
103
|
...
|
|
71
104
|
|
|
72
|
-
def is_property_hidden(self):
|
|
73
|
-
"""
|
|
105
|
+
def is_property_hidden(self) -> bool:
|
|
106
|
+
"""Check if a property is hidden.
|
|
107
|
+
|
|
108
|
+
:return: True when the property is hidden.
|
|
109
|
+
:rtype: bool
|
|
110
|
+
"""
|
|
74
111
|
...
|
|
75
112
|
|
|
76
|
-
def is_property_overridable_library(self):
|
|
77
|
-
"""
|
|
113
|
+
def is_property_overridable_library(self) -> bool:
|
|
114
|
+
"""Check if a property is overridable.
|
|
115
|
+
|
|
116
|
+
:return: True when the property is overridable.
|
|
117
|
+
:rtype: bool
|
|
118
|
+
"""
|
|
78
119
|
...
|
|
79
120
|
|
|
80
|
-
def is_property_readonly(self):
|
|
81
|
-
"""
|
|
121
|
+
def is_property_readonly(self) -> bool:
|
|
122
|
+
"""Check if a property is readonly.
|
|
123
|
+
|
|
124
|
+
:return: True when the property is readonly (not writable).
|
|
125
|
+
:rtype: bool
|
|
126
|
+
"""
|
|
82
127
|
...
|
|
83
128
|
|
|
84
|
-
def is_property_set(self):
|
|
85
|
-
"""
|
|
129
|
+
def is_property_set(self) -> bool:
|
|
130
|
+
"""Check if a property is set, use for testing operator properties.
|
|
131
|
+
|
|
132
|
+
:return: True when the property has been set.
|
|
133
|
+
:rtype: bool
|
|
134
|
+
"""
|
|
86
135
|
...
|
|
87
136
|
|
|
88
137
|
def items(self):
|
|
89
|
-
"""
|
|
138
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
139
|
+
dictionary function of the same name).
|
|
140
|
+
|
|
141
|
+
:return: custom property key, value pairs.
|
|
142
|
+
"""
|
|
90
143
|
...
|
|
91
144
|
|
|
92
|
-
def keyframe_delete(self):
|
|
93
|
-
"""
|
|
145
|
+
def keyframe_delete(self) -> bool:
|
|
146
|
+
"""Remove a keyframe from this properties fcurve.
|
|
147
|
+
|
|
148
|
+
:return: Success of keyframe deletion.
|
|
149
|
+
:rtype: bool
|
|
150
|
+
"""
|
|
94
151
|
...
|
|
95
152
|
|
|
96
|
-
def keyframe_insert(self):
|
|
97
|
-
"""
|
|
153
|
+
def keyframe_insert(self) -> bool:
|
|
154
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
155
|
+
|
|
156
|
+
:return: Success of keyframe insertion.
|
|
157
|
+
:rtype: bool
|
|
158
|
+
"""
|
|
98
159
|
...
|
|
99
160
|
|
|
100
161
|
def keys(self):
|
|
101
|
-
"""
|
|
162
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
163
|
+
dictionary function of the same name).
|
|
164
|
+
|
|
165
|
+
:return: custom property keys.
|
|
166
|
+
"""
|
|
102
167
|
...
|
|
103
168
|
|
|
104
|
-
def path_from_id(self):
|
|
105
|
-
"""
|
|
169
|
+
def path_from_id(self) -> str:
|
|
170
|
+
"""Returns the data path from the ID to this object (string).
|
|
171
|
+
|
|
172
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
173
|
+
to this struct and property (when given).
|
|
174
|
+
:rtype: str
|
|
175
|
+
"""
|
|
106
176
|
...
|
|
107
177
|
|
|
108
178
|
def path_resolve(self):
|
|
109
|
-
""" """
|
|
179
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
110
180
|
...
|
|
111
181
|
|
|
112
182
|
def poll(self, context):
|
|
@@ -117,27 +187,42 @@ class AddModifierMenu(bpy_types.Operator):
|
|
|
117
187
|
...
|
|
118
188
|
|
|
119
189
|
def poll_message_set(self):
|
|
120
|
-
""" """
|
|
190
|
+
"""Set the message to show in the tool-tip when poll fails.When message is callable, additional user defined positional arguments are passed to the message function."""
|
|
121
191
|
...
|
|
122
192
|
|
|
123
193
|
def pop(self):
|
|
124
|
-
"""
|
|
194
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
195
|
+
when not found (matches Python's dictionary function of the same name).
|
|
196
|
+
|
|
197
|
+
"""
|
|
125
198
|
...
|
|
126
199
|
|
|
127
|
-
def property_overridable_library_set(self):
|
|
128
|
-
"""
|
|
200
|
+
def property_overridable_library_set(self) -> bool:
|
|
201
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
202
|
+
|
|
203
|
+
:return: True when the overridable status of the property was successfully set.
|
|
204
|
+
:rtype: bool
|
|
205
|
+
"""
|
|
129
206
|
...
|
|
130
207
|
|
|
131
208
|
def property_unset(self):
|
|
132
|
-
""" """
|
|
209
|
+
"""Unset a property, will use default value afterward."""
|
|
133
210
|
...
|
|
134
211
|
|
|
135
212
|
def type_recast(self):
|
|
136
|
-
"""
|
|
213
|
+
"""Return a new instance, this is needed because types
|
|
214
|
+
such as textures can be changed at runtime.
|
|
215
|
+
|
|
216
|
+
:return: a new instance of this object with the type initialized again.
|
|
217
|
+
"""
|
|
137
218
|
...
|
|
138
219
|
|
|
139
220
|
def values(self):
|
|
140
|
-
"""
|
|
221
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
222
|
+
dictionary function of the same name).
|
|
223
|
+
|
|
224
|
+
:return: custom property values.
|
|
225
|
+
"""
|
|
141
226
|
...
|
|
142
227
|
|
|
143
228
|
class ModifierButtonsPanel:
|
|
@@ -202,22 +287,35 @@ class DATA_PT_gpencil_modifiers(
|
|
|
202
287
|
""" """
|
|
203
288
|
|
|
204
289
|
def append(self, draw_func):
|
|
205
|
-
"""
|
|
290
|
+
"""Append a draw function to this menu,
|
|
291
|
+
takes the same arguments as the menus draw function
|
|
206
292
|
|
|
207
|
-
|
|
293
|
+
:param draw_func:
|
|
208
294
|
"""
|
|
209
295
|
...
|
|
210
296
|
|
|
211
|
-
def as_pointer(self):
|
|
212
|
-
"""
|
|
297
|
+
def as_pointer(self) -> int:
|
|
298
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
299
|
+
|
|
300
|
+
:return: int (memory address).
|
|
301
|
+
:rtype: int
|
|
302
|
+
"""
|
|
213
303
|
...
|
|
214
304
|
|
|
215
|
-
def bl_rna_get_subclass(self):
|
|
216
|
-
"""
|
|
305
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
306
|
+
"""
|
|
307
|
+
|
|
308
|
+
:return: The RNA type or default when not found.
|
|
309
|
+
:rtype: bpy.types.Struct
|
|
310
|
+
"""
|
|
217
311
|
...
|
|
218
312
|
|
|
219
|
-
def bl_rna_get_subclass_py(self):
|
|
220
|
-
"""
|
|
313
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
314
|
+
"""
|
|
315
|
+
|
|
316
|
+
:return: The class or default when not found.
|
|
317
|
+
:rtype: typing.Any
|
|
318
|
+
"""
|
|
221
319
|
...
|
|
222
320
|
|
|
223
321
|
def draw(self, _context):
|
|
@@ -227,72 +325,129 @@ class DATA_PT_gpencil_modifiers(
|
|
|
227
325
|
"""
|
|
228
326
|
...
|
|
229
327
|
|
|
230
|
-
def driver_add(self):
|
|
231
|
-
"""
|
|
328
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
329
|
+
"""Adds driver(s) to the given property
|
|
330
|
+
|
|
331
|
+
:return: The driver(s) added.
|
|
332
|
+
:rtype: bpy.types.FCurve
|
|
333
|
+
"""
|
|
232
334
|
...
|
|
233
335
|
|
|
234
|
-
def driver_remove(self):
|
|
235
|
-
"""
|
|
336
|
+
def driver_remove(self) -> bool:
|
|
337
|
+
"""Remove driver(s) from the given property
|
|
338
|
+
|
|
339
|
+
:return: Success of driver removal.
|
|
340
|
+
:rtype: bool
|
|
341
|
+
"""
|
|
236
342
|
...
|
|
237
343
|
|
|
238
344
|
def get(self):
|
|
239
|
-
"""
|
|
345
|
+
"""Returns the value of the custom property assigned to key or default
|
|
346
|
+
when not found (matches Python's dictionary function of the same name).
|
|
347
|
+
|
|
348
|
+
"""
|
|
240
349
|
...
|
|
241
350
|
|
|
242
351
|
def id_properties_clear(self):
|
|
243
|
-
"""
|
|
352
|
+
"""
|
|
353
|
+
|
|
354
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
355
|
+
"""
|
|
244
356
|
...
|
|
245
357
|
|
|
246
358
|
def id_properties_ensure(self):
|
|
247
|
-
"""
|
|
359
|
+
"""
|
|
360
|
+
|
|
361
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
362
|
+
"""
|
|
248
363
|
...
|
|
249
364
|
|
|
250
365
|
def id_properties_ui(self):
|
|
251
|
-
"""
|
|
366
|
+
"""
|
|
367
|
+
|
|
368
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
369
|
+
"""
|
|
252
370
|
...
|
|
253
371
|
|
|
254
372
|
def is_extended(self):
|
|
255
373
|
""" """
|
|
256
374
|
...
|
|
257
375
|
|
|
258
|
-
def is_property_hidden(self):
|
|
259
|
-
"""
|
|
376
|
+
def is_property_hidden(self) -> bool:
|
|
377
|
+
"""Check if a property is hidden.
|
|
378
|
+
|
|
379
|
+
:return: True when the property is hidden.
|
|
380
|
+
:rtype: bool
|
|
381
|
+
"""
|
|
260
382
|
...
|
|
261
383
|
|
|
262
|
-
def is_property_overridable_library(self):
|
|
263
|
-
"""
|
|
384
|
+
def is_property_overridable_library(self) -> bool:
|
|
385
|
+
"""Check if a property is overridable.
|
|
386
|
+
|
|
387
|
+
:return: True when the property is overridable.
|
|
388
|
+
:rtype: bool
|
|
389
|
+
"""
|
|
264
390
|
...
|
|
265
391
|
|
|
266
|
-
def is_property_readonly(self):
|
|
267
|
-
"""
|
|
392
|
+
def is_property_readonly(self) -> bool:
|
|
393
|
+
"""Check if a property is readonly.
|
|
394
|
+
|
|
395
|
+
:return: True when the property is readonly (not writable).
|
|
396
|
+
:rtype: bool
|
|
397
|
+
"""
|
|
268
398
|
...
|
|
269
399
|
|
|
270
|
-
def is_property_set(self):
|
|
271
|
-
"""
|
|
400
|
+
def is_property_set(self) -> bool:
|
|
401
|
+
"""Check if a property is set, use for testing operator properties.
|
|
402
|
+
|
|
403
|
+
:return: True when the property has been set.
|
|
404
|
+
:rtype: bool
|
|
405
|
+
"""
|
|
272
406
|
...
|
|
273
407
|
|
|
274
408
|
def items(self):
|
|
275
|
-
"""
|
|
409
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
410
|
+
dictionary function of the same name).
|
|
411
|
+
|
|
412
|
+
:return: custom property key, value pairs.
|
|
413
|
+
"""
|
|
276
414
|
...
|
|
277
415
|
|
|
278
|
-
def keyframe_delete(self):
|
|
279
|
-
"""
|
|
416
|
+
def keyframe_delete(self) -> bool:
|
|
417
|
+
"""Remove a keyframe from this properties fcurve.
|
|
418
|
+
|
|
419
|
+
:return: Success of keyframe deletion.
|
|
420
|
+
:rtype: bool
|
|
421
|
+
"""
|
|
280
422
|
...
|
|
281
423
|
|
|
282
|
-
def keyframe_insert(self):
|
|
283
|
-
"""
|
|
424
|
+
def keyframe_insert(self) -> bool:
|
|
425
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
426
|
+
|
|
427
|
+
:return: Success of keyframe insertion.
|
|
428
|
+
:rtype: bool
|
|
429
|
+
"""
|
|
284
430
|
...
|
|
285
431
|
|
|
286
432
|
def keys(self):
|
|
287
|
-
"""
|
|
433
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
434
|
+
dictionary function of the same name).
|
|
435
|
+
|
|
436
|
+
:return: custom property keys.
|
|
437
|
+
"""
|
|
288
438
|
...
|
|
289
439
|
|
|
290
|
-
def path_from_id(self):
|
|
291
|
-
"""
|
|
440
|
+
def path_from_id(self) -> str:
|
|
441
|
+
"""Returns the data path from the ID to this object (string).
|
|
442
|
+
|
|
443
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
444
|
+
to this struct and property (when given).
|
|
445
|
+
:rtype: str
|
|
446
|
+
"""
|
|
292
447
|
...
|
|
293
448
|
|
|
294
449
|
def path_resolve(self):
|
|
295
|
-
""" """
|
|
450
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
296
451
|
...
|
|
297
452
|
|
|
298
453
|
def poll(self, context):
|
|
@@ -303,37 +458,53 @@ class DATA_PT_gpencil_modifiers(
|
|
|
303
458
|
...
|
|
304
459
|
|
|
305
460
|
def pop(self):
|
|
306
|
-
"""
|
|
461
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
462
|
+
when not found (matches Python's dictionary function of the same name).
|
|
463
|
+
|
|
464
|
+
"""
|
|
307
465
|
...
|
|
308
466
|
|
|
309
467
|
def prepend(self, draw_func):
|
|
310
|
-
"""
|
|
468
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
469
|
+
the menus draw function
|
|
311
470
|
|
|
312
|
-
|
|
471
|
+
:param draw_func:
|
|
313
472
|
"""
|
|
314
473
|
...
|
|
315
474
|
|
|
316
|
-
def property_overridable_library_set(self):
|
|
317
|
-
"""
|
|
475
|
+
def property_overridable_library_set(self) -> bool:
|
|
476
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
477
|
+
|
|
478
|
+
:return: True when the overridable status of the property was successfully set.
|
|
479
|
+
:rtype: bool
|
|
480
|
+
"""
|
|
318
481
|
...
|
|
319
482
|
|
|
320
483
|
def property_unset(self):
|
|
321
|
-
""" """
|
|
484
|
+
"""Unset a property, will use default value afterward."""
|
|
322
485
|
...
|
|
323
486
|
|
|
324
487
|
def remove(self, draw_func):
|
|
325
|
-
"""
|
|
488
|
+
"""Remove a draw function that has been added to this menu
|
|
326
489
|
|
|
327
490
|
:param draw_func:
|
|
328
491
|
"""
|
|
329
492
|
...
|
|
330
493
|
|
|
331
494
|
def type_recast(self):
|
|
332
|
-
"""
|
|
495
|
+
"""Return a new instance, this is needed because types
|
|
496
|
+
such as textures can be changed at runtime.
|
|
497
|
+
|
|
498
|
+
:return: a new instance of this object with the type initialized again.
|
|
499
|
+
"""
|
|
333
500
|
...
|
|
334
501
|
|
|
335
502
|
def values(self):
|
|
336
|
-
"""
|
|
503
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
504
|
+
dictionary function of the same name).
|
|
505
|
+
|
|
506
|
+
:return: custom property values.
|
|
507
|
+
"""
|
|
337
508
|
...
|
|
338
509
|
|
|
339
510
|
class DATA_PT_modifiers(bpy_types.Panel, ModifierButtonsPanel, bpy_types._GenericUI):
|
|
@@ -361,22 +532,35 @@ class DATA_PT_modifiers(bpy_types.Panel, ModifierButtonsPanel, bpy_types._Generi
|
|
|
361
532
|
""" """
|
|
362
533
|
|
|
363
534
|
def append(self, draw_func):
|
|
364
|
-
"""
|
|
535
|
+
"""Append a draw function to this menu,
|
|
536
|
+
takes the same arguments as the menus draw function
|
|
365
537
|
|
|
366
|
-
|
|
538
|
+
:param draw_func:
|
|
367
539
|
"""
|
|
368
540
|
...
|
|
369
541
|
|
|
370
|
-
def as_pointer(self):
|
|
371
|
-
"""
|
|
542
|
+
def as_pointer(self) -> int:
|
|
543
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
544
|
+
|
|
545
|
+
:return: int (memory address).
|
|
546
|
+
:rtype: int
|
|
547
|
+
"""
|
|
372
548
|
...
|
|
373
549
|
|
|
374
|
-
def bl_rna_get_subclass(self):
|
|
375
|
-
"""
|
|
550
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
551
|
+
"""
|
|
552
|
+
|
|
553
|
+
:return: The RNA type or default when not found.
|
|
554
|
+
:rtype: bpy.types.Struct
|
|
555
|
+
"""
|
|
376
556
|
...
|
|
377
557
|
|
|
378
|
-
def bl_rna_get_subclass_py(self):
|
|
379
|
-
"""
|
|
558
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
559
|
+
"""
|
|
560
|
+
|
|
561
|
+
:return: The class or default when not found.
|
|
562
|
+
:rtype: typing.Any
|
|
563
|
+
"""
|
|
380
564
|
...
|
|
381
565
|
|
|
382
566
|
def draw(self, _context):
|
|
@@ -386,72 +570,129 @@ class DATA_PT_modifiers(bpy_types.Panel, ModifierButtonsPanel, bpy_types._Generi
|
|
|
386
570
|
"""
|
|
387
571
|
...
|
|
388
572
|
|
|
389
|
-
def driver_add(self):
|
|
390
|
-
"""
|
|
573
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
574
|
+
"""Adds driver(s) to the given property
|
|
575
|
+
|
|
576
|
+
:return: The driver(s) added.
|
|
577
|
+
:rtype: bpy.types.FCurve
|
|
578
|
+
"""
|
|
391
579
|
...
|
|
392
580
|
|
|
393
|
-
def driver_remove(self):
|
|
394
|
-
"""
|
|
581
|
+
def driver_remove(self) -> bool:
|
|
582
|
+
"""Remove driver(s) from the given property
|
|
583
|
+
|
|
584
|
+
:return: Success of driver removal.
|
|
585
|
+
:rtype: bool
|
|
586
|
+
"""
|
|
395
587
|
...
|
|
396
588
|
|
|
397
589
|
def get(self):
|
|
398
|
-
"""
|
|
590
|
+
"""Returns the value of the custom property assigned to key or default
|
|
591
|
+
when not found (matches Python's dictionary function of the same name).
|
|
592
|
+
|
|
593
|
+
"""
|
|
399
594
|
...
|
|
400
595
|
|
|
401
596
|
def id_properties_clear(self):
|
|
402
|
-
"""
|
|
597
|
+
"""
|
|
598
|
+
|
|
599
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
600
|
+
"""
|
|
403
601
|
...
|
|
404
602
|
|
|
405
603
|
def id_properties_ensure(self):
|
|
406
|
-
"""
|
|
604
|
+
"""
|
|
605
|
+
|
|
606
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
607
|
+
"""
|
|
407
608
|
...
|
|
408
609
|
|
|
409
610
|
def id_properties_ui(self):
|
|
410
|
-
"""
|
|
611
|
+
"""
|
|
612
|
+
|
|
613
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
614
|
+
"""
|
|
411
615
|
...
|
|
412
616
|
|
|
413
617
|
def is_extended(self):
|
|
414
618
|
""" """
|
|
415
619
|
...
|
|
416
620
|
|
|
417
|
-
def is_property_hidden(self):
|
|
418
|
-
"""
|
|
621
|
+
def is_property_hidden(self) -> bool:
|
|
622
|
+
"""Check if a property is hidden.
|
|
623
|
+
|
|
624
|
+
:return: True when the property is hidden.
|
|
625
|
+
:rtype: bool
|
|
626
|
+
"""
|
|
419
627
|
...
|
|
420
628
|
|
|
421
|
-
def is_property_overridable_library(self):
|
|
422
|
-
"""
|
|
629
|
+
def is_property_overridable_library(self) -> bool:
|
|
630
|
+
"""Check if a property is overridable.
|
|
631
|
+
|
|
632
|
+
:return: True when the property is overridable.
|
|
633
|
+
:rtype: bool
|
|
634
|
+
"""
|
|
423
635
|
...
|
|
424
636
|
|
|
425
|
-
def is_property_readonly(self):
|
|
426
|
-
"""
|
|
637
|
+
def is_property_readonly(self) -> bool:
|
|
638
|
+
"""Check if a property is readonly.
|
|
639
|
+
|
|
640
|
+
:return: True when the property is readonly (not writable).
|
|
641
|
+
:rtype: bool
|
|
642
|
+
"""
|
|
427
643
|
...
|
|
428
644
|
|
|
429
|
-
def is_property_set(self):
|
|
430
|
-
"""
|
|
645
|
+
def is_property_set(self) -> bool:
|
|
646
|
+
"""Check if a property is set, use for testing operator properties.
|
|
647
|
+
|
|
648
|
+
:return: True when the property has been set.
|
|
649
|
+
:rtype: bool
|
|
650
|
+
"""
|
|
431
651
|
...
|
|
432
652
|
|
|
433
653
|
def items(self):
|
|
434
|
-
"""
|
|
654
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
655
|
+
dictionary function of the same name).
|
|
656
|
+
|
|
657
|
+
:return: custom property key, value pairs.
|
|
658
|
+
"""
|
|
435
659
|
...
|
|
436
660
|
|
|
437
|
-
def keyframe_delete(self):
|
|
438
|
-
"""
|
|
661
|
+
def keyframe_delete(self) -> bool:
|
|
662
|
+
"""Remove a keyframe from this properties fcurve.
|
|
663
|
+
|
|
664
|
+
:return: Success of keyframe deletion.
|
|
665
|
+
:rtype: bool
|
|
666
|
+
"""
|
|
439
667
|
...
|
|
440
668
|
|
|
441
|
-
def keyframe_insert(self):
|
|
442
|
-
"""
|
|
669
|
+
def keyframe_insert(self) -> bool:
|
|
670
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
671
|
+
|
|
672
|
+
:return: Success of keyframe insertion.
|
|
673
|
+
:rtype: bool
|
|
674
|
+
"""
|
|
443
675
|
...
|
|
444
676
|
|
|
445
677
|
def keys(self):
|
|
446
|
-
"""
|
|
678
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
679
|
+
dictionary function of the same name).
|
|
680
|
+
|
|
681
|
+
:return: custom property keys.
|
|
682
|
+
"""
|
|
447
683
|
...
|
|
448
684
|
|
|
449
|
-
def path_from_id(self):
|
|
450
|
-
"""
|
|
685
|
+
def path_from_id(self) -> str:
|
|
686
|
+
"""Returns the data path from the ID to this object (string).
|
|
687
|
+
|
|
688
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
689
|
+
to this struct and property (when given).
|
|
690
|
+
:rtype: str
|
|
691
|
+
"""
|
|
451
692
|
...
|
|
452
693
|
|
|
453
694
|
def path_resolve(self):
|
|
454
|
-
""" """
|
|
695
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
455
696
|
...
|
|
456
697
|
|
|
457
698
|
def poll(self, context):
|
|
@@ -462,37 +703,53 @@ class DATA_PT_modifiers(bpy_types.Panel, ModifierButtonsPanel, bpy_types._Generi
|
|
|
462
703
|
...
|
|
463
704
|
|
|
464
705
|
def pop(self):
|
|
465
|
-
"""
|
|
706
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
707
|
+
when not found (matches Python's dictionary function of the same name).
|
|
708
|
+
|
|
709
|
+
"""
|
|
466
710
|
...
|
|
467
711
|
|
|
468
712
|
def prepend(self, draw_func):
|
|
469
|
-
"""
|
|
713
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
714
|
+
the menus draw function
|
|
470
715
|
|
|
471
|
-
|
|
716
|
+
:param draw_func:
|
|
472
717
|
"""
|
|
473
718
|
...
|
|
474
719
|
|
|
475
|
-
def property_overridable_library_set(self):
|
|
476
|
-
"""
|
|
720
|
+
def property_overridable_library_set(self) -> bool:
|
|
721
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
722
|
+
|
|
723
|
+
:return: True when the overridable status of the property was successfully set.
|
|
724
|
+
:rtype: bool
|
|
725
|
+
"""
|
|
477
726
|
...
|
|
478
727
|
|
|
479
728
|
def property_unset(self):
|
|
480
|
-
""" """
|
|
729
|
+
"""Unset a property, will use default value afterward."""
|
|
481
730
|
...
|
|
482
731
|
|
|
483
732
|
def remove(self, draw_func):
|
|
484
|
-
"""
|
|
733
|
+
"""Remove a draw function that has been added to this menu
|
|
485
734
|
|
|
486
735
|
:param draw_func:
|
|
487
736
|
"""
|
|
488
737
|
...
|
|
489
738
|
|
|
490
739
|
def type_recast(self):
|
|
491
|
-
"""
|
|
740
|
+
"""Return a new instance, this is needed because types
|
|
741
|
+
such as textures can be changed at runtime.
|
|
742
|
+
|
|
743
|
+
:return: a new instance of this object with the type initialized again.
|
|
744
|
+
"""
|
|
492
745
|
...
|
|
493
746
|
|
|
494
747
|
def values(self):
|
|
495
|
-
"""
|
|
748
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
749
|
+
dictionary function of the same name).
|
|
750
|
+
|
|
751
|
+
:return: custom property values.
|
|
752
|
+
"""
|
|
496
753
|
...
|
|
497
754
|
|
|
498
755
|
class OBJECT_MT_modifier_add(bpy_types.Menu, ModifierAddMenu, bpy_types._GenericUI):
|
|
@@ -520,22 +777,35 @@ class OBJECT_MT_modifier_add(bpy_types.Menu, ModifierAddMenu, bpy_types._Generic
|
|
|
520
777
|
""" """
|
|
521
778
|
|
|
522
779
|
def append(self, draw_func):
|
|
523
|
-
"""
|
|
780
|
+
"""Append a draw function to this menu,
|
|
781
|
+
takes the same arguments as the menus draw function
|
|
524
782
|
|
|
525
|
-
|
|
783
|
+
:param draw_func:
|
|
526
784
|
"""
|
|
527
785
|
...
|
|
528
786
|
|
|
529
|
-
def as_pointer(self):
|
|
530
|
-
"""
|
|
787
|
+
def as_pointer(self) -> int:
|
|
788
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
789
|
+
|
|
790
|
+
:return: int (memory address).
|
|
791
|
+
:rtype: int
|
|
792
|
+
"""
|
|
531
793
|
...
|
|
532
794
|
|
|
533
|
-
def bl_rna_get_subclass(self):
|
|
534
|
-
"""
|
|
795
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
796
|
+
"""
|
|
797
|
+
|
|
798
|
+
:return: The RNA type or default when not found.
|
|
799
|
+
:rtype: bpy.types.Struct
|
|
800
|
+
"""
|
|
535
801
|
...
|
|
536
802
|
|
|
537
|
-
def bl_rna_get_subclass_py(self):
|
|
538
|
-
"""
|
|
803
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
804
|
+
"""
|
|
805
|
+
|
|
806
|
+
:return: The class or default when not found.
|
|
807
|
+
:rtype: typing.Any
|
|
808
|
+
"""
|
|
539
809
|
...
|
|
540
810
|
|
|
541
811
|
def draw(self, context):
|
|
@@ -554,70 +824,127 @@ class OBJECT_MT_modifier_add(bpy_types.Menu, ModifierAddMenu, bpy_types._Generic
|
|
|
554
824
|
...
|
|
555
825
|
|
|
556
826
|
def draw_preset(self, _context):
|
|
557
|
-
"""
|
|
827
|
+
"""Define these on the subclass:
|
|
828
|
+
- preset_operator (string)
|
|
829
|
+
- preset_subdir (string)Optionally:
|
|
830
|
+
- preset_add_operator (string)
|
|
831
|
+
- preset_extensions (set of strings)
|
|
832
|
+
- preset_operator_defaults (dict of keyword args)
|
|
558
833
|
|
|
559
|
-
|
|
834
|
+
:param _context:
|
|
560
835
|
"""
|
|
561
836
|
...
|
|
562
837
|
|
|
563
|
-
def driver_add(self):
|
|
564
|
-
"""
|
|
838
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
839
|
+
"""Adds driver(s) to the given property
|
|
840
|
+
|
|
841
|
+
:return: The driver(s) added.
|
|
842
|
+
:rtype: bpy.types.FCurve
|
|
843
|
+
"""
|
|
565
844
|
...
|
|
566
845
|
|
|
567
|
-
def driver_remove(self):
|
|
568
|
-
"""
|
|
846
|
+
def driver_remove(self) -> bool:
|
|
847
|
+
"""Remove driver(s) from the given property
|
|
848
|
+
|
|
849
|
+
:return: Success of driver removal.
|
|
850
|
+
:rtype: bool
|
|
851
|
+
"""
|
|
569
852
|
...
|
|
570
853
|
|
|
571
854
|
def get(self):
|
|
572
|
-
"""
|
|
855
|
+
"""Returns the value of the custom property assigned to key or default
|
|
856
|
+
when not found (matches Python's dictionary function of the same name).
|
|
857
|
+
|
|
858
|
+
"""
|
|
573
859
|
...
|
|
574
860
|
|
|
575
861
|
def id_properties_clear(self):
|
|
576
|
-
"""
|
|
862
|
+
"""
|
|
863
|
+
|
|
864
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
865
|
+
"""
|
|
577
866
|
...
|
|
578
867
|
|
|
579
868
|
def id_properties_ensure(self):
|
|
580
|
-
"""
|
|
869
|
+
"""
|
|
870
|
+
|
|
871
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
872
|
+
"""
|
|
581
873
|
...
|
|
582
874
|
|
|
583
875
|
def id_properties_ui(self):
|
|
584
|
-
"""
|
|
876
|
+
"""
|
|
877
|
+
|
|
878
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
879
|
+
"""
|
|
585
880
|
...
|
|
586
881
|
|
|
587
882
|
def is_extended(self):
|
|
588
883
|
""" """
|
|
589
884
|
...
|
|
590
885
|
|
|
591
|
-
def is_property_hidden(self):
|
|
592
|
-
"""
|
|
886
|
+
def is_property_hidden(self) -> bool:
|
|
887
|
+
"""Check if a property is hidden.
|
|
888
|
+
|
|
889
|
+
:return: True when the property is hidden.
|
|
890
|
+
:rtype: bool
|
|
891
|
+
"""
|
|
593
892
|
...
|
|
594
893
|
|
|
595
|
-
def is_property_overridable_library(self):
|
|
596
|
-
"""
|
|
894
|
+
def is_property_overridable_library(self) -> bool:
|
|
895
|
+
"""Check if a property is overridable.
|
|
896
|
+
|
|
897
|
+
:return: True when the property is overridable.
|
|
898
|
+
:rtype: bool
|
|
899
|
+
"""
|
|
597
900
|
...
|
|
598
901
|
|
|
599
|
-
def is_property_readonly(self):
|
|
600
|
-
"""
|
|
902
|
+
def is_property_readonly(self) -> bool:
|
|
903
|
+
"""Check if a property is readonly.
|
|
904
|
+
|
|
905
|
+
:return: True when the property is readonly (not writable).
|
|
906
|
+
:rtype: bool
|
|
907
|
+
"""
|
|
601
908
|
...
|
|
602
909
|
|
|
603
|
-
def is_property_set(self):
|
|
604
|
-
"""
|
|
910
|
+
def is_property_set(self) -> bool:
|
|
911
|
+
"""Check if a property is set, use for testing operator properties.
|
|
912
|
+
|
|
913
|
+
:return: True when the property has been set.
|
|
914
|
+
:rtype: bool
|
|
915
|
+
"""
|
|
605
916
|
...
|
|
606
917
|
|
|
607
918
|
def items(self):
|
|
608
|
-
"""
|
|
919
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
920
|
+
dictionary function of the same name).
|
|
921
|
+
|
|
922
|
+
:return: custom property key, value pairs.
|
|
923
|
+
"""
|
|
609
924
|
...
|
|
610
925
|
|
|
611
|
-
def keyframe_delete(self):
|
|
612
|
-
"""
|
|
926
|
+
def keyframe_delete(self) -> bool:
|
|
927
|
+
"""Remove a keyframe from this properties fcurve.
|
|
928
|
+
|
|
929
|
+
:return: Success of keyframe deletion.
|
|
930
|
+
:rtype: bool
|
|
931
|
+
"""
|
|
613
932
|
...
|
|
614
933
|
|
|
615
|
-
def keyframe_insert(self):
|
|
616
|
-
"""
|
|
934
|
+
def keyframe_insert(self) -> bool:
|
|
935
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
936
|
+
|
|
937
|
+
:return: Success of keyframe insertion.
|
|
938
|
+
:rtype: bool
|
|
939
|
+
"""
|
|
617
940
|
...
|
|
618
941
|
|
|
619
942
|
def keys(self):
|
|
620
|
-
"""
|
|
943
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
944
|
+
dictionary function of the same name).
|
|
945
|
+
|
|
946
|
+
:return: custom property keys.
|
|
947
|
+
"""
|
|
621
948
|
...
|
|
622
949
|
|
|
623
950
|
def operator_modifier_add(self, layout, mod_type):
|
|
@@ -628,72 +955,101 @@ class OBJECT_MT_modifier_add(bpy_types.Menu, ModifierAddMenu, bpy_types._Generic
|
|
|
628
955
|
"""
|
|
629
956
|
...
|
|
630
957
|
|
|
631
|
-
def path_from_id(self):
|
|
632
|
-
"""
|
|
958
|
+
def path_from_id(self) -> str:
|
|
959
|
+
"""Returns the data path from the ID to this object (string).
|
|
960
|
+
|
|
961
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
962
|
+
to this struct and property (when given).
|
|
963
|
+
:rtype: str
|
|
964
|
+
"""
|
|
633
965
|
...
|
|
634
966
|
|
|
635
967
|
def path_menu(
|
|
636
968
|
self,
|
|
637
|
-
searchpaths,
|
|
638
|
-
operator,
|
|
639
|
-
props_default,
|
|
640
|
-
prop_filepath,
|
|
641
|
-
filter_ext,
|
|
642
|
-
filter_path,
|
|
643
|
-
display_name,
|
|
644
|
-
add_operator,
|
|
645
|
-
add_operator_props,
|
|
969
|
+
searchpaths: list[str],
|
|
970
|
+
operator: str,
|
|
971
|
+
props_default: dict = None,
|
|
972
|
+
prop_filepath: str = "filepath",
|
|
973
|
+
filter_ext: typing.Callable = None,
|
|
974
|
+
filter_path=None,
|
|
975
|
+
display_name: typing.Callable = None,
|
|
976
|
+
add_operator=None,
|
|
977
|
+
add_operator_props=None,
|
|
646
978
|
):
|
|
647
|
-
"""
|
|
979
|
+
"""Populate a menu from a list of paths.
|
|
648
980
|
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
981
|
+
:param searchpaths: Paths to scan.
|
|
982
|
+
:type searchpaths: list[str]
|
|
983
|
+
:param operator: The operator id to use with each file.
|
|
984
|
+
:type operator: str
|
|
985
|
+
:param props_default: Properties to assign to each operator.
|
|
986
|
+
:type props_default: dict
|
|
987
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
988
|
+
:type prop_filepath: str
|
|
989
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
990
|
+
|
|
991
|
+
Returning false excludes the file from the list.
|
|
992
|
+
:type filter_ext: typing.Callable
|
|
993
|
+
:param filter_path:
|
|
994
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
995
|
+
:type display_name: typing.Callable
|
|
996
|
+
:param add_operator:
|
|
997
|
+
:param add_operator_props:
|
|
658
998
|
"""
|
|
659
999
|
...
|
|
660
1000
|
|
|
661
1001
|
def path_resolve(self):
|
|
662
|
-
""" """
|
|
1002
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
663
1003
|
...
|
|
664
1004
|
|
|
665
1005
|
def pop(self):
|
|
666
|
-
"""
|
|
1006
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
1007
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1008
|
+
|
|
1009
|
+
"""
|
|
667
1010
|
...
|
|
668
1011
|
|
|
669
1012
|
def prepend(self, draw_func):
|
|
670
|
-
"""
|
|
1013
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
1014
|
+
the menus draw function
|
|
671
1015
|
|
|
672
|
-
|
|
1016
|
+
:param draw_func:
|
|
673
1017
|
"""
|
|
674
1018
|
...
|
|
675
1019
|
|
|
676
|
-
def property_overridable_library_set(self):
|
|
677
|
-
"""
|
|
1020
|
+
def property_overridable_library_set(self) -> bool:
|
|
1021
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
1022
|
+
|
|
1023
|
+
:return: True when the overridable status of the property was successfully set.
|
|
1024
|
+
:rtype: bool
|
|
1025
|
+
"""
|
|
678
1026
|
...
|
|
679
1027
|
|
|
680
1028
|
def property_unset(self):
|
|
681
|
-
""" """
|
|
1029
|
+
"""Unset a property, will use default value afterward."""
|
|
682
1030
|
...
|
|
683
1031
|
|
|
684
1032
|
def remove(self, draw_func):
|
|
685
|
-
"""
|
|
1033
|
+
"""Remove a draw function that has been added to this menu
|
|
686
1034
|
|
|
687
1035
|
:param draw_func:
|
|
688
1036
|
"""
|
|
689
1037
|
...
|
|
690
1038
|
|
|
691
1039
|
def type_recast(self):
|
|
692
|
-
"""
|
|
1040
|
+
"""Return a new instance, this is needed because types
|
|
1041
|
+
such as textures can be changed at runtime.
|
|
1042
|
+
|
|
1043
|
+
:return: a new instance of this object with the type initialized again.
|
|
1044
|
+
"""
|
|
693
1045
|
...
|
|
694
1046
|
|
|
695
1047
|
def values(self):
|
|
696
|
-
"""
|
|
1048
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
1049
|
+
dictionary function of the same name).
|
|
1050
|
+
|
|
1051
|
+
:return: custom property values.
|
|
1052
|
+
"""
|
|
697
1053
|
...
|
|
698
1054
|
|
|
699
1055
|
class OBJECT_MT_modifier_add_color(
|
|
@@ -723,22 +1079,35 @@ class OBJECT_MT_modifier_add_color(
|
|
|
723
1079
|
""" """
|
|
724
1080
|
|
|
725
1081
|
def append(self, draw_func):
|
|
726
|
-
"""
|
|
1082
|
+
"""Append a draw function to this menu,
|
|
1083
|
+
takes the same arguments as the menus draw function
|
|
727
1084
|
|
|
728
|
-
|
|
1085
|
+
:param draw_func:
|
|
729
1086
|
"""
|
|
730
1087
|
...
|
|
731
1088
|
|
|
732
|
-
def as_pointer(self):
|
|
733
|
-
"""
|
|
1089
|
+
def as_pointer(self) -> int:
|
|
1090
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
1091
|
+
|
|
1092
|
+
:return: int (memory address).
|
|
1093
|
+
:rtype: int
|
|
1094
|
+
"""
|
|
734
1095
|
...
|
|
735
1096
|
|
|
736
|
-
def bl_rna_get_subclass(self):
|
|
737
|
-
"""
|
|
1097
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
1098
|
+
"""
|
|
1099
|
+
|
|
1100
|
+
:return: The RNA type or default when not found.
|
|
1101
|
+
:rtype: bpy.types.Struct
|
|
1102
|
+
"""
|
|
738
1103
|
...
|
|
739
1104
|
|
|
740
|
-
def bl_rna_get_subclass_py(self):
|
|
741
|
-
"""
|
|
1105
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
1106
|
+
"""
|
|
1107
|
+
|
|
1108
|
+
:return: The class or default when not found.
|
|
1109
|
+
:rtype: typing.Any
|
|
1110
|
+
"""
|
|
742
1111
|
...
|
|
743
1112
|
|
|
744
1113
|
def draw(self, context):
|
|
@@ -757,70 +1126,127 @@ class OBJECT_MT_modifier_add_color(
|
|
|
757
1126
|
...
|
|
758
1127
|
|
|
759
1128
|
def draw_preset(self, _context):
|
|
760
|
-
"""
|
|
1129
|
+
"""Define these on the subclass:
|
|
1130
|
+
- preset_operator (string)
|
|
1131
|
+
- preset_subdir (string)Optionally:
|
|
1132
|
+
- preset_add_operator (string)
|
|
1133
|
+
- preset_extensions (set of strings)
|
|
1134
|
+
- preset_operator_defaults (dict of keyword args)
|
|
761
1135
|
|
|
762
|
-
|
|
1136
|
+
:param _context:
|
|
763
1137
|
"""
|
|
764
1138
|
...
|
|
765
1139
|
|
|
766
|
-
def driver_add(self):
|
|
767
|
-
"""
|
|
1140
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
1141
|
+
"""Adds driver(s) to the given property
|
|
1142
|
+
|
|
1143
|
+
:return: The driver(s) added.
|
|
1144
|
+
:rtype: bpy.types.FCurve
|
|
1145
|
+
"""
|
|
768
1146
|
...
|
|
769
1147
|
|
|
770
|
-
def driver_remove(self):
|
|
771
|
-
"""
|
|
1148
|
+
def driver_remove(self) -> bool:
|
|
1149
|
+
"""Remove driver(s) from the given property
|
|
1150
|
+
|
|
1151
|
+
:return: Success of driver removal.
|
|
1152
|
+
:rtype: bool
|
|
1153
|
+
"""
|
|
772
1154
|
...
|
|
773
1155
|
|
|
774
1156
|
def get(self):
|
|
775
|
-
"""
|
|
1157
|
+
"""Returns the value of the custom property assigned to key or default
|
|
1158
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1159
|
+
|
|
1160
|
+
"""
|
|
776
1161
|
...
|
|
777
1162
|
|
|
778
1163
|
def id_properties_clear(self):
|
|
779
|
-
"""
|
|
1164
|
+
"""
|
|
1165
|
+
|
|
1166
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
1167
|
+
"""
|
|
780
1168
|
...
|
|
781
1169
|
|
|
782
1170
|
def id_properties_ensure(self):
|
|
783
|
-
"""
|
|
1171
|
+
"""
|
|
1172
|
+
|
|
1173
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
1174
|
+
"""
|
|
784
1175
|
...
|
|
785
1176
|
|
|
786
1177
|
def id_properties_ui(self):
|
|
787
|
-
"""
|
|
1178
|
+
"""
|
|
1179
|
+
|
|
1180
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
1181
|
+
"""
|
|
788
1182
|
...
|
|
789
1183
|
|
|
790
1184
|
def is_extended(self):
|
|
791
1185
|
""" """
|
|
792
1186
|
...
|
|
793
1187
|
|
|
794
|
-
def is_property_hidden(self):
|
|
795
|
-
"""
|
|
1188
|
+
def is_property_hidden(self) -> bool:
|
|
1189
|
+
"""Check if a property is hidden.
|
|
1190
|
+
|
|
1191
|
+
:return: True when the property is hidden.
|
|
1192
|
+
:rtype: bool
|
|
1193
|
+
"""
|
|
796
1194
|
...
|
|
797
1195
|
|
|
798
|
-
def is_property_overridable_library(self):
|
|
799
|
-
"""
|
|
1196
|
+
def is_property_overridable_library(self) -> bool:
|
|
1197
|
+
"""Check if a property is overridable.
|
|
1198
|
+
|
|
1199
|
+
:return: True when the property is overridable.
|
|
1200
|
+
:rtype: bool
|
|
1201
|
+
"""
|
|
800
1202
|
...
|
|
801
1203
|
|
|
802
|
-
def is_property_readonly(self):
|
|
803
|
-
"""
|
|
1204
|
+
def is_property_readonly(self) -> bool:
|
|
1205
|
+
"""Check if a property is readonly.
|
|
1206
|
+
|
|
1207
|
+
:return: True when the property is readonly (not writable).
|
|
1208
|
+
:rtype: bool
|
|
1209
|
+
"""
|
|
804
1210
|
...
|
|
805
1211
|
|
|
806
|
-
def is_property_set(self):
|
|
807
|
-
"""
|
|
1212
|
+
def is_property_set(self) -> bool:
|
|
1213
|
+
"""Check if a property is set, use for testing operator properties.
|
|
1214
|
+
|
|
1215
|
+
:return: True when the property has been set.
|
|
1216
|
+
:rtype: bool
|
|
1217
|
+
"""
|
|
808
1218
|
...
|
|
809
1219
|
|
|
810
1220
|
def items(self):
|
|
811
|
-
"""
|
|
1221
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
1222
|
+
dictionary function of the same name).
|
|
1223
|
+
|
|
1224
|
+
:return: custom property key, value pairs.
|
|
1225
|
+
"""
|
|
812
1226
|
...
|
|
813
1227
|
|
|
814
|
-
def keyframe_delete(self):
|
|
815
|
-
"""
|
|
1228
|
+
def keyframe_delete(self) -> bool:
|
|
1229
|
+
"""Remove a keyframe from this properties fcurve.
|
|
1230
|
+
|
|
1231
|
+
:return: Success of keyframe deletion.
|
|
1232
|
+
:rtype: bool
|
|
1233
|
+
"""
|
|
816
1234
|
...
|
|
817
1235
|
|
|
818
|
-
def keyframe_insert(self):
|
|
819
|
-
"""
|
|
1236
|
+
def keyframe_insert(self) -> bool:
|
|
1237
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
1238
|
+
|
|
1239
|
+
:return: Success of keyframe insertion.
|
|
1240
|
+
:rtype: bool
|
|
1241
|
+
"""
|
|
820
1242
|
...
|
|
821
1243
|
|
|
822
1244
|
def keys(self):
|
|
823
|
-
"""
|
|
1245
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
1246
|
+
dictionary function of the same name).
|
|
1247
|
+
|
|
1248
|
+
:return: custom property keys.
|
|
1249
|
+
"""
|
|
824
1250
|
...
|
|
825
1251
|
|
|
826
1252
|
def operator_modifier_add(self, layout, mod_type):
|
|
@@ -831,72 +1257,101 @@ class OBJECT_MT_modifier_add_color(
|
|
|
831
1257
|
"""
|
|
832
1258
|
...
|
|
833
1259
|
|
|
834
|
-
def path_from_id(self):
|
|
835
|
-
"""
|
|
1260
|
+
def path_from_id(self) -> str:
|
|
1261
|
+
"""Returns the data path from the ID to this object (string).
|
|
1262
|
+
|
|
1263
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
1264
|
+
to this struct and property (when given).
|
|
1265
|
+
:rtype: str
|
|
1266
|
+
"""
|
|
836
1267
|
...
|
|
837
1268
|
|
|
838
1269
|
def path_menu(
|
|
839
1270
|
self,
|
|
840
|
-
searchpaths,
|
|
841
|
-
operator,
|
|
842
|
-
props_default,
|
|
843
|
-
prop_filepath,
|
|
844
|
-
filter_ext,
|
|
845
|
-
filter_path,
|
|
846
|
-
display_name,
|
|
847
|
-
add_operator,
|
|
848
|
-
add_operator_props,
|
|
1271
|
+
searchpaths: list[str],
|
|
1272
|
+
operator: str,
|
|
1273
|
+
props_default: dict = None,
|
|
1274
|
+
prop_filepath: str = "filepath",
|
|
1275
|
+
filter_ext: typing.Callable = None,
|
|
1276
|
+
filter_path=None,
|
|
1277
|
+
display_name: typing.Callable = None,
|
|
1278
|
+
add_operator=None,
|
|
1279
|
+
add_operator_props=None,
|
|
849
1280
|
):
|
|
850
|
-
"""
|
|
1281
|
+
"""Populate a menu from a list of paths.
|
|
851
1282
|
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
1283
|
+
:param searchpaths: Paths to scan.
|
|
1284
|
+
:type searchpaths: list[str]
|
|
1285
|
+
:param operator: The operator id to use with each file.
|
|
1286
|
+
:type operator: str
|
|
1287
|
+
:param props_default: Properties to assign to each operator.
|
|
1288
|
+
:type props_default: dict
|
|
1289
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
1290
|
+
:type prop_filepath: str
|
|
1291
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
1292
|
+
|
|
1293
|
+
Returning false excludes the file from the list.
|
|
1294
|
+
:type filter_ext: typing.Callable
|
|
1295
|
+
:param filter_path:
|
|
1296
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
1297
|
+
:type display_name: typing.Callable
|
|
1298
|
+
:param add_operator:
|
|
1299
|
+
:param add_operator_props:
|
|
861
1300
|
"""
|
|
862
1301
|
...
|
|
863
1302
|
|
|
864
1303
|
def path_resolve(self):
|
|
865
|
-
""" """
|
|
1304
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
866
1305
|
...
|
|
867
1306
|
|
|
868
1307
|
def pop(self):
|
|
869
|
-
"""
|
|
1308
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
1309
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1310
|
+
|
|
1311
|
+
"""
|
|
870
1312
|
...
|
|
871
1313
|
|
|
872
1314
|
def prepend(self, draw_func):
|
|
873
|
-
"""
|
|
1315
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
1316
|
+
the menus draw function
|
|
874
1317
|
|
|
875
|
-
|
|
1318
|
+
:param draw_func:
|
|
876
1319
|
"""
|
|
877
1320
|
...
|
|
878
1321
|
|
|
879
|
-
def property_overridable_library_set(self):
|
|
880
|
-
"""
|
|
1322
|
+
def property_overridable_library_set(self) -> bool:
|
|
1323
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
1324
|
+
|
|
1325
|
+
:return: True when the overridable status of the property was successfully set.
|
|
1326
|
+
:rtype: bool
|
|
1327
|
+
"""
|
|
881
1328
|
...
|
|
882
1329
|
|
|
883
1330
|
def property_unset(self):
|
|
884
|
-
""" """
|
|
1331
|
+
"""Unset a property, will use default value afterward."""
|
|
885
1332
|
...
|
|
886
1333
|
|
|
887
1334
|
def remove(self, draw_func):
|
|
888
|
-
"""
|
|
1335
|
+
"""Remove a draw function that has been added to this menu
|
|
889
1336
|
|
|
890
1337
|
:param draw_func:
|
|
891
1338
|
"""
|
|
892
1339
|
...
|
|
893
1340
|
|
|
894
1341
|
def type_recast(self):
|
|
895
|
-
"""
|
|
1342
|
+
"""Return a new instance, this is needed because types
|
|
1343
|
+
such as textures can be changed at runtime.
|
|
1344
|
+
|
|
1345
|
+
:return: a new instance of this object with the type initialized again.
|
|
1346
|
+
"""
|
|
896
1347
|
...
|
|
897
1348
|
|
|
898
1349
|
def values(self):
|
|
899
|
-
"""
|
|
1350
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
1351
|
+
dictionary function of the same name).
|
|
1352
|
+
|
|
1353
|
+
:return: custom property values.
|
|
1354
|
+
"""
|
|
900
1355
|
...
|
|
901
1356
|
|
|
902
1357
|
class OBJECT_MT_modifier_add_deform(
|
|
@@ -926,22 +1381,35 @@ class OBJECT_MT_modifier_add_deform(
|
|
|
926
1381
|
""" """
|
|
927
1382
|
|
|
928
1383
|
def append(self, draw_func):
|
|
929
|
-
"""
|
|
1384
|
+
"""Append a draw function to this menu,
|
|
1385
|
+
takes the same arguments as the menus draw function
|
|
930
1386
|
|
|
931
|
-
|
|
1387
|
+
:param draw_func:
|
|
932
1388
|
"""
|
|
933
1389
|
...
|
|
934
1390
|
|
|
935
|
-
def as_pointer(self):
|
|
936
|
-
"""
|
|
1391
|
+
def as_pointer(self) -> int:
|
|
1392
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
1393
|
+
|
|
1394
|
+
:return: int (memory address).
|
|
1395
|
+
:rtype: int
|
|
1396
|
+
"""
|
|
937
1397
|
...
|
|
938
1398
|
|
|
939
|
-
def bl_rna_get_subclass(self):
|
|
940
|
-
"""
|
|
1399
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
1400
|
+
"""
|
|
1401
|
+
|
|
1402
|
+
:return: The RNA type or default when not found.
|
|
1403
|
+
:rtype: bpy.types.Struct
|
|
1404
|
+
"""
|
|
941
1405
|
...
|
|
942
1406
|
|
|
943
|
-
def bl_rna_get_subclass_py(self):
|
|
944
|
-
"""
|
|
1407
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
1408
|
+
"""
|
|
1409
|
+
|
|
1410
|
+
:return: The class or default when not found.
|
|
1411
|
+
:rtype: typing.Any
|
|
1412
|
+
"""
|
|
945
1413
|
...
|
|
946
1414
|
|
|
947
1415
|
def draw(self, context):
|
|
@@ -960,70 +1428,127 @@ class OBJECT_MT_modifier_add_deform(
|
|
|
960
1428
|
...
|
|
961
1429
|
|
|
962
1430
|
def draw_preset(self, _context):
|
|
963
|
-
"""
|
|
1431
|
+
"""Define these on the subclass:
|
|
1432
|
+
- preset_operator (string)
|
|
1433
|
+
- preset_subdir (string)Optionally:
|
|
1434
|
+
- preset_add_operator (string)
|
|
1435
|
+
- preset_extensions (set of strings)
|
|
1436
|
+
- preset_operator_defaults (dict of keyword args)
|
|
964
1437
|
|
|
965
|
-
|
|
1438
|
+
:param _context:
|
|
966
1439
|
"""
|
|
967
1440
|
...
|
|
968
1441
|
|
|
969
|
-
def driver_add(self):
|
|
970
|
-
"""
|
|
1442
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
1443
|
+
"""Adds driver(s) to the given property
|
|
1444
|
+
|
|
1445
|
+
:return: The driver(s) added.
|
|
1446
|
+
:rtype: bpy.types.FCurve
|
|
1447
|
+
"""
|
|
971
1448
|
...
|
|
972
1449
|
|
|
973
|
-
def driver_remove(self):
|
|
974
|
-
"""
|
|
1450
|
+
def driver_remove(self) -> bool:
|
|
1451
|
+
"""Remove driver(s) from the given property
|
|
1452
|
+
|
|
1453
|
+
:return: Success of driver removal.
|
|
1454
|
+
:rtype: bool
|
|
1455
|
+
"""
|
|
975
1456
|
...
|
|
976
1457
|
|
|
977
1458
|
def get(self):
|
|
978
|
-
"""
|
|
1459
|
+
"""Returns the value of the custom property assigned to key or default
|
|
1460
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1461
|
+
|
|
1462
|
+
"""
|
|
979
1463
|
...
|
|
980
1464
|
|
|
981
1465
|
def id_properties_clear(self):
|
|
982
|
-
"""
|
|
1466
|
+
"""
|
|
1467
|
+
|
|
1468
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
1469
|
+
"""
|
|
983
1470
|
...
|
|
984
1471
|
|
|
985
1472
|
def id_properties_ensure(self):
|
|
986
|
-
"""
|
|
1473
|
+
"""
|
|
1474
|
+
|
|
1475
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
1476
|
+
"""
|
|
987
1477
|
...
|
|
988
1478
|
|
|
989
1479
|
def id_properties_ui(self):
|
|
990
|
-
"""
|
|
1480
|
+
"""
|
|
1481
|
+
|
|
1482
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
1483
|
+
"""
|
|
991
1484
|
...
|
|
992
1485
|
|
|
993
1486
|
def is_extended(self):
|
|
994
1487
|
""" """
|
|
995
1488
|
...
|
|
996
1489
|
|
|
997
|
-
def is_property_hidden(self):
|
|
998
|
-
"""
|
|
1490
|
+
def is_property_hidden(self) -> bool:
|
|
1491
|
+
"""Check if a property is hidden.
|
|
1492
|
+
|
|
1493
|
+
:return: True when the property is hidden.
|
|
1494
|
+
:rtype: bool
|
|
1495
|
+
"""
|
|
999
1496
|
...
|
|
1000
1497
|
|
|
1001
|
-
def is_property_overridable_library(self):
|
|
1002
|
-
"""
|
|
1498
|
+
def is_property_overridable_library(self) -> bool:
|
|
1499
|
+
"""Check if a property is overridable.
|
|
1500
|
+
|
|
1501
|
+
:return: True when the property is overridable.
|
|
1502
|
+
:rtype: bool
|
|
1503
|
+
"""
|
|
1003
1504
|
...
|
|
1004
1505
|
|
|
1005
|
-
def is_property_readonly(self):
|
|
1006
|
-
"""
|
|
1506
|
+
def is_property_readonly(self) -> bool:
|
|
1507
|
+
"""Check if a property is readonly.
|
|
1508
|
+
|
|
1509
|
+
:return: True when the property is readonly (not writable).
|
|
1510
|
+
:rtype: bool
|
|
1511
|
+
"""
|
|
1007
1512
|
...
|
|
1008
1513
|
|
|
1009
|
-
def is_property_set(self):
|
|
1010
|
-
"""
|
|
1514
|
+
def is_property_set(self) -> bool:
|
|
1515
|
+
"""Check if a property is set, use for testing operator properties.
|
|
1516
|
+
|
|
1517
|
+
:return: True when the property has been set.
|
|
1518
|
+
:rtype: bool
|
|
1519
|
+
"""
|
|
1011
1520
|
...
|
|
1012
1521
|
|
|
1013
1522
|
def items(self):
|
|
1014
|
-
"""
|
|
1523
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
1524
|
+
dictionary function of the same name).
|
|
1525
|
+
|
|
1526
|
+
:return: custom property key, value pairs.
|
|
1527
|
+
"""
|
|
1015
1528
|
...
|
|
1016
1529
|
|
|
1017
|
-
def keyframe_delete(self):
|
|
1018
|
-
"""
|
|
1530
|
+
def keyframe_delete(self) -> bool:
|
|
1531
|
+
"""Remove a keyframe from this properties fcurve.
|
|
1532
|
+
|
|
1533
|
+
:return: Success of keyframe deletion.
|
|
1534
|
+
:rtype: bool
|
|
1535
|
+
"""
|
|
1019
1536
|
...
|
|
1020
1537
|
|
|
1021
|
-
def keyframe_insert(self):
|
|
1022
|
-
"""
|
|
1538
|
+
def keyframe_insert(self) -> bool:
|
|
1539
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
1540
|
+
|
|
1541
|
+
:return: Success of keyframe insertion.
|
|
1542
|
+
:rtype: bool
|
|
1543
|
+
"""
|
|
1023
1544
|
...
|
|
1024
1545
|
|
|
1025
1546
|
def keys(self):
|
|
1026
|
-
"""
|
|
1547
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
1548
|
+
dictionary function of the same name).
|
|
1549
|
+
|
|
1550
|
+
:return: custom property keys.
|
|
1551
|
+
"""
|
|
1027
1552
|
...
|
|
1028
1553
|
|
|
1029
1554
|
def operator_modifier_add(self, layout, mod_type):
|
|
@@ -1034,72 +1559,101 @@ class OBJECT_MT_modifier_add_deform(
|
|
|
1034
1559
|
"""
|
|
1035
1560
|
...
|
|
1036
1561
|
|
|
1037
|
-
def path_from_id(self):
|
|
1038
|
-
"""
|
|
1562
|
+
def path_from_id(self) -> str:
|
|
1563
|
+
"""Returns the data path from the ID to this object (string).
|
|
1564
|
+
|
|
1565
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
1566
|
+
to this struct and property (when given).
|
|
1567
|
+
:rtype: str
|
|
1568
|
+
"""
|
|
1039
1569
|
...
|
|
1040
1570
|
|
|
1041
1571
|
def path_menu(
|
|
1042
1572
|
self,
|
|
1043
|
-
searchpaths,
|
|
1044
|
-
operator,
|
|
1045
|
-
props_default,
|
|
1046
|
-
prop_filepath,
|
|
1047
|
-
filter_ext,
|
|
1048
|
-
filter_path,
|
|
1049
|
-
display_name,
|
|
1050
|
-
add_operator,
|
|
1051
|
-
add_operator_props,
|
|
1573
|
+
searchpaths: list[str],
|
|
1574
|
+
operator: str,
|
|
1575
|
+
props_default: dict = None,
|
|
1576
|
+
prop_filepath: str = "filepath",
|
|
1577
|
+
filter_ext: typing.Callable = None,
|
|
1578
|
+
filter_path=None,
|
|
1579
|
+
display_name: typing.Callable = None,
|
|
1580
|
+
add_operator=None,
|
|
1581
|
+
add_operator_props=None,
|
|
1052
1582
|
):
|
|
1053
|
-
"""
|
|
1583
|
+
"""Populate a menu from a list of paths.
|
|
1584
|
+
|
|
1585
|
+
:param searchpaths: Paths to scan.
|
|
1586
|
+
:type searchpaths: list[str]
|
|
1587
|
+
:param operator: The operator id to use with each file.
|
|
1588
|
+
:type operator: str
|
|
1589
|
+
:param props_default: Properties to assign to each operator.
|
|
1590
|
+
:type props_default: dict
|
|
1591
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
1592
|
+
:type prop_filepath: str
|
|
1593
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
1054
1594
|
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
:param add_operator:
|
|
1063
|
-
:param add_operator_props:
|
|
1595
|
+
Returning false excludes the file from the list.
|
|
1596
|
+
:type filter_ext: typing.Callable
|
|
1597
|
+
:param filter_path:
|
|
1598
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
1599
|
+
:type display_name: typing.Callable
|
|
1600
|
+
:param add_operator:
|
|
1601
|
+
:param add_operator_props:
|
|
1064
1602
|
"""
|
|
1065
1603
|
...
|
|
1066
1604
|
|
|
1067
1605
|
def path_resolve(self):
|
|
1068
|
-
""" """
|
|
1606
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
1069
1607
|
...
|
|
1070
1608
|
|
|
1071
1609
|
def pop(self):
|
|
1072
|
-
"""
|
|
1610
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
1611
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1612
|
+
|
|
1613
|
+
"""
|
|
1073
1614
|
...
|
|
1074
1615
|
|
|
1075
1616
|
def prepend(self, draw_func):
|
|
1076
|
-
"""
|
|
1617
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
1618
|
+
the menus draw function
|
|
1077
1619
|
|
|
1078
|
-
|
|
1620
|
+
:param draw_func:
|
|
1079
1621
|
"""
|
|
1080
1622
|
...
|
|
1081
1623
|
|
|
1082
|
-
def property_overridable_library_set(self):
|
|
1083
|
-
"""
|
|
1624
|
+
def property_overridable_library_set(self) -> bool:
|
|
1625
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
1626
|
+
|
|
1627
|
+
:return: True when the overridable status of the property was successfully set.
|
|
1628
|
+
:rtype: bool
|
|
1629
|
+
"""
|
|
1084
1630
|
...
|
|
1085
1631
|
|
|
1086
1632
|
def property_unset(self):
|
|
1087
|
-
""" """
|
|
1633
|
+
"""Unset a property, will use default value afterward."""
|
|
1088
1634
|
...
|
|
1089
1635
|
|
|
1090
1636
|
def remove(self, draw_func):
|
|
1091
|
-
"""
|
|
1637
|
+
"""Remove a draw function that has been added to this menu
|
|
1092
1638
|
|
|
1093
1639
|
:param draw_func:
|
|
1094
1640
|
"""
|
|
1095
1641
|
...
|
|
1096
1642
|
|
|
1097
1643
|
def type_recast(self):
|
|
1098
|
-
"""
|
|
1644
|
+
"""Return a new instance, this is needed because types
|
|
1645
|
+
such as textures can be changed at runtime.
|
|
1646
|
+
|
|
1647
|
+
:return: a new instance of this object with the type initialized again.
|
|
1648
|
+
"""
|
|
1099
1649
|
...
|
|
1100
1650
|
|
|
1101
1651
|
def values(self):
|
|
1102
|
-
"""
|
|
1652
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
1653
|
+
dictionary function of the same name).
|
|
1654
|
+
|
|
1655
|
+
:return: custom property values.
|
|
1656
|
+
"""
|
|
1103
1657
|
...
|
|
1104
1658
|
|
|
1105
1659
|
class OBJECT_MT_modifier_add_edit(
|
|
@@ -1129,22 +1683,35 @@ class OBJECT_MT_modifier_add_edit(
|
|
|
1129
1683
|
""" """
|
|
1130
1684
|
|
|
1131
1685
|
def append(self, draw_func):
|
|
1132
|
-
"""
|
|
1686
|
+
"""Append a draw function to this menu,
|
|
1687
|
+
takes the same arguments as the menus draw function
|
|
1133
1688
|
|
|
1134
|
-
|
|
1689
|
+
:param draw_func:
|
|
1135
1690
|
"""
|
|
1136
1691
|
...
|
|
1137
1692
|
|
|
1138
|
-
def as_pointer(self):
|
|
1139
|
-
"""
|
|
1693
|
+
def as_pointer(self) -> int:
|
|
1694
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
1695
|
+
|
|
1696
|
+
:return: int (memory address).
|
|
1697
|
+
:rtype: int
|
|
1698
|
+
"""
|
|
1140
1699
|
...
|
|
1141
1700
|
|
|
1142
|
-
def bl_rna_get_subclass(self):
|
|
1143
|
-
"""
|
|
1701
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
1702
|
+
"""
|
|
1703
|
+
|
|
1704
|
+
:return: The RNA type or default when not found.
|
|
1705
|
+
:rtype: bpy.types.Struct
|
|
1706
|
+
"""
|
|
1144
1707
|
...
|
|
1145
1708
|
|
|
1146
|
-
def bl_rna_get_subclass_py(self):
|
|
1147
|
-
"""
|
|
1709
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
1710
|
+
"""
|
|
1711
|
+
|
|
1712
|
+
:return: The class or default when not found.
|
|
1713
|
+
:rtype: typing.Any
|
|
1714
|
+
"""
|
|
1148
1715
|
...
|
|
1149
1716
|
|
|
1150
1717
|
def draw(self, context):
|
|
@@ -1163,70 +1730,127 @@ class OBJECT_MT_modifier_add_edit(
|
|
|
1163
1730
|
...
|
|
1164
1731
|
|
|
1165
1732
|
def draw_preset(self, _context):
|
|
1166
|
-
"""
|
|
1733
|
+
"""Define these on the subclass:
|
|
1734
|
+
- preset_operator (string)
|
|
1735
|
+
- preset_subdir (string)Optionally:
|
|
1736
|
+
- preset_add_operator (string)
|
|
1737
|
+
- preset_extensions (set of strings)
|
|
1738
|
+
- preset_operator_defaults (dict of keyword args)
|
|
1167
1739
|
|
|
1168
|
-
|
|
1740
|
+
:param _context:
|
|
1169
1741
|
"""
|
|
1170
1742
|
...
|
|
1171
1743
|
|
|
1172
|
-
def driver_add(self):
|
|
1173
|
-
"""
|
|
1744
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
1745
|
+
"""Adds driver(s) to the given property
|
|
1746
|
+
|
|
1747
|
+
:return: The driver(s) added.
|
|
1748
|
+
:rtype: bpy.types.FCurve
|
|
1749
|
+
"""
|
|
1174
1750
|
...
|
|
1175
1751
|
|
|
1176
|
-
def driver_remove(self):
|
|
1177
|
-
"""
|
|
1752
|
+
def driver_remove(self) -> bool:
|
|
1753
|
+
"""Remove driver(s) from the given property
|
|
1754
|
+
|
|
1755
|
+
:return: Success of driver removal.
|
|
1756
|
+
:rtype: bool
|
|
1757
|
+
"""
|
|
1178
1758
|
...
|
|
1179
1759
|
|
|
1180
1760
|
def get(self):
|
|
1181
|
-
"""
|
|
1761
|
+
"""Returns the value of the custom property assigned to key or default
|
|
1762
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1763
|
+
|
|
1764
|
+
"""
|
|
1182
1765
|
...
|
|
1183
1766
|
|
|
1184
1767
|
def id_properties_clear(self):
|
|
1185
|
-
"""
|
|
1768
|
+
"""
|
|
1769
|
+
|
|
1770
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
1771
|
+
"""
|
|
1186
1772
|
...
|
|
1187
1773
|
|
|
1188
1774
|
def id_properties_ensure(self):
|
|
1189
|
-
"""
|
|
1775
|
+
"""
|
|
1776
|
+
|
|
1777
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
1778
|
+
"""
|
|
1190
1779
|
...
|
|
1191
1780
|
|
|
1192
1781
|
def id_properties_ui(self):
|
|
1193
|
-
"""
|
|
1782
|
+
"""
|
|
1783
|
+
|
|
1784
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
1785
|
+
"""
|
|
1194
1786
|
...
|
|
1195
1787
|
|
|
1196
1788
|
def is_extended(self):
|
|
1197
1789
|
""" """
|
|
1198
1790
|
...
|
|
1199
1791
|
|
|
1200
|
-
def is_property_hidden(self):
|
|
1201
|
-
"""
|
|
1792
|
+
def is_property_hidden(self) -> bool:
|
|
1793
|
+
"""Check if a property is hidden.
|
|
1794
|
+
|
|
1795
|
+
:return: True when the property is hidden.
|
|
1796
|
+
:rtype: bool
|
|
1797
|
+
"""
|
|
1202
1798
|
...
|
|
1203
1799
|
|
|
1204
|
-
def is_property_overridable_library(self):
|
|
1205
|
-
"""
|
|
1800
|
+
def is_property_overridable_library(self) -> bool:
|
|
1801
|
+
"""Check if a property is overridable.
|
|
1802
|
+
|
|
1803
|
+
:return: True when the property is overridable.
|
|
1804
|
+
:rtype: bool
|
|
1805
|
+
"""
|
|
1206
1806
|
...
|
|
1207
1807
|
|
|
1208
|
-
def is_property_readonly(self):
|
|
1209
|
-
"""
|
|
1808
|
+
def is_property_readonly(self) -> bool:
|
|
1809
|
+
"""Check if a property is readonly.
|
|
1810
|
+
|
|
1811
|
+
:return: True when the property is readonly (not writable).
|
|
1812
|
+
:rtype: bool
|
|
1813
|
+
"""
|
|
1210
1814
|
...
|
|
1211
1815
|
|
|
1212
|
-
def is_property_set(self):
|
|
1213
|
-
"""
|
|
1816
|
+
def is_property_set(self) -> bool:
|
|
1817
|
+
"""Check if a property is set, use for testing operator properties.
|
|
1818
|
+
|
|
1819
|
+
:return: True when the property has been set.
|
|
1820
|
+
:rtype: bool
|
|
1821
|
+
"""
|
|
1214
1822
|
...
|
|
1215
1823
|
|
|
1216
1824
|
def items(self):
|
|
1217
|
-
"""
|
|
1825
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
1826
|
+
dictionary function of the same name).
|
|
1827
|
+
|
|
1828
|
+
:return: custom property key, value pairs.
|
|
1829
|
+
"""
|
|
1218
1830
|
...
|
|
1219
1831
|
|
|
1220
|
-
def keyframe_delete(self):
|
|
1221
|
-
"""
|
|
1832
|
+
def keyframe_delete(self) -> bool:
|
|
1833
|
+
"""Remove a keyframe from this properties fcurve.
|
|
1834
|
+
|
|
1835
|
+
:return: Success of keyframe deletion.
|
|
1836
|
+
:rtype: bool
|
|
1837
|
+
"""
|
|
1222
1838
|
...
|
|
1223
1839
|
|
|
1224
|
-
def keyframe_insert(self):
|
|
1225
|
-
"""
|
|
1840
|
+
def keyframe_insert(self) -> bool:
|
|
1841
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
1842
|
+
|
|
1843
|
+
:return: Success of keyframe insertion.
|
|
1844
|
+
:rtype: bool
|
|
1845
|
+
"""
|
|
1226
1846
|
...
|
|
1227
1847
|
|
|
1228
1848
|
def keys(self):
|
|
1229
|
-
"""
|
|
1849
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
1850
|
+
dictionary function of the same name).
|
|
1851
|
+
|
|
1852
|
+
:return: custom property keys.
|
|
1853
|
+
"""
|
|
1230
1854
|
...
|
|
1231
1855
|
|
|
1232
1856
|
def operator_modifier_add(self, layout, mod_type):
|
|
@@ -1237,72 +1861,101 @@ class OBJECT_MT_modifier_add_edit(
|
|
|
1237
1861
|
"""
|
|
1238
1862
|
...
|
|
1239
1863
|
|
|
1240
|
-
def path_from_id(self):
|
|
1241
|
-
"""
|
|
1864
|
+
def path_from_id(self) -> str:
|
|
1865
|
+
"""Returns the data path from the ID to this object (string).
|
|
1866
|
+
|
|
1867
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
1868
|
+
to this struct and property (when given).
|
|
1869
|
+
:rtype: str
|
|
1870
|
+
"""
|
|
1242
1871
|
...
|
|
1243
1872
|
|
|
1244
1873
|
def path_menu(
|
|
1245
1874
|
self,
|
|
1246
|
-
searchpaths,
|
|
1247
|
-
operator,
|
|
1248
|
-
props_default,
|
|
1249
|
-
prop_filepath,
|
|
1250
|
-
filter_ext,
|
|
1251
|
-
filter_path,
|
|
1252
|
-
display_name,
|
|
1253
|
-
add_operator,
|
|
1254
|
-
add_operator_props,
|
|
1875
|
+
searchpaths: list[str],
|
|
1876
|
+
operator: str,
|
|
1877
|
+
props_default: dict = None,
|
|
1878
|
+
prop_filepath: str = "filepath",
|
|
1879
|
+
filter_ext: typing.Callable = None,
|
|
1880
|
+
filter_path=None,
|
|
1881
|
+
display_name: typing.Callable = None,
|
|
1882
|
+
add_operator=None,
|
|
1883
|
+
add_operator_props=None,
|
|
1255
1884
|
):
|
|
1256
|
-
"""
|
|
1885
|
+
"""Populate a menu from a list of paths.
|
|
1257
1886
|
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1887
|
+
:param searchpaths: Paths to scan.
|
|
1888
|
+
:type searchpaths: list[str]
|
|
1889
|
+
:param operator: The operator id to use with each file.
|
|
1890
|
+
:type operator: str
|
|
1891
|
+
:param props_default: Properties to assign to each operator.
|
|
1892
|
+
:type props_default: dict
|
|
1893
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
1894
|
+
:type prop_filepath: str
|
|
1895
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
1896
|
+
|
|
1897
|
+
Returning false excludes the file from the list.
|
|
1898
|
+
:type filter_ext: typing.Callable
|
|
1899
|
+
:param filter_path:
|
|
1900
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
1901
|
+
:type display_name: typing.Callable
|
|
1902
|
+
:param add_operator:
|
|
1903
|
+
:param add_operator_props:
|
|
1267
1904
|
"""
|
|
1268
1905
|
...
|
|
1269
1906
|
|
|
1270
1907
|
def path_resolve(self):
|
|
1271
|
-
""" """
|
|
1908
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
1272
1909
|
...
|
|
1273
1910
|
|
|
1274
1911
|
def pop(self):
|
|
1275
|
-
"""
|
|
1912
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
1913
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1914
|
+
|
|
1915
|
+
"""
|
|
1276
1916
|
...
|
|
1277
1917
|
|
|
1278
1918
|
def prepend(self, draw_func):
|
|
1279
|
-
"""
|
|
1919
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
1920
|
+
the menus draw function
|
|
1280
1921
|
|
|
1281
|
-
|
|
1922
|
+
:param draw_func:
|
|
1282
1923
|
"""
|
|
1283
1924
|
...
|
|
1284
1925
|
|
|
1285
|
-
def property_overridable_library_set(self):
|
|
1286
|
-
"""
|
|
1926
|
+
def property_overridable_library_set(self) -> bool:
|
|
1927
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
1928
|
+
|
|
1929
|
+
:return: True when the overridable status of the property was successfully set.
|
|
1930
|
+
:rtype: bool
|
|
1931
|
+
"""
|
|
1287
1932
|
...
|
|
1288
1933
|
|
|
1289
1934
|
def property_unset(self):
|
|
1290
|
-
""" """
|
|
1935
|
+
"""Unset a property, will use default value afterward."""
|
|
1291
1936
|
...
|
|
1292
1937
|
|
|
1293
1938
|
def remove(self, draw_func):
|
|
1294
|
-
"""
|
|
1939
|
+
"""Remove a draw function that has been added to this menu
|
|
1295
1940
|
|
|
1296
1941
|
:param draw_func:
|
|
1297
1942
|
"""
|
|
1298
1943
|
...
|
|
1299
1944
|
|
|
1300
1945
|
def type_recast(self):
|
|
1301
|
-
"""
|
|
1946
|
+
"""Return a new instance, this is needed because types
|
|
1947
|
+
such as textures can be changed at runtime.
|
|
1948
|
+
|
|
1949
|
+
:return: a new instance of this object with the type initialized again.
|
|
1950
|
+
"""
|
|
1302
1951
|
...
|
|
1303
1952
|
|
|
1304
1953
|
def values(self):
|
|
1305
|
-
"""
|
|
1954
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
1955
|
+
dictionary function of the same name).
|
|
1956
|
+
|
|
1957
|
+
:return: custom property values.
|
|
1958
|
+
"""
|
|
1306
1959
|
...
|
|
1307
1960
|
|
|
1308
1961
|
class OBJECT_MT_modifier_add_generate(
|
|
@@ -1332,22 +1985,35 @@ class OBJECT_MT_modifier_add_generate(
|
|
|
1332
1985
|
""" """
|
|
1333
1986
|
|
|
1334
1987
|
def append(self, draw_func):
|
|
1335
|
-
"""
|
|
1988
|
+
"""Append a draw function to this menu,
|
|
1989
|
+
takes the same arguments as the menus draw function
|
|
1336
1990
|
|
|
1337
|
-
|
|
1991
|
+
:param draw_func:
|
|
1338
1992
|
"""
|
|
1339
1993
|
...
|
|
1340
1994
|
|
|
1341
|
-
def as_pointer(self):
|
|
1342
|
-
"""
|
|
1995
|
+
def as_pointer(self) -> int:
|
|
1996
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
1997
|
+
|
|
1998
|
+
:return: int (memory address).
|
|
1999
|
+
:rtype: int
|
|
2000
|
+
"""
|
|
1343
2001
|
...
|
|
1344
2002
|
|
|
1345
|
-
def bl_rna_get_subclass(self):
|
|
1346
|
-
"""
|
|
2003
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
2004
|
+
"""
|
|
2005
|
+
|
|
2006
|
+
:return: The RNA type or default when not found.
|
|
2007
|
+
:rtype: bpy.types.Struct
|
|
2008
|
+
"""
|
|
1347
2009
|
...
|
|
1348
2010
|
|
|
1349
|
-
def bl_rna_get_subclass_py(self):
|
|
1350
|
-
"""
|
|
2011
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
2012
|
+
"""
|
|
2013
|
+
|
|
2014
|
+
:return: The class or default when not found.
|
|
2015
|
+
:rtype: typing.Any
|
|
2016
|
+
"""
|
|
1351
2017
|
...
|
|
1352
2018
|
|
|
1353
2019
|
def draw(self, context):
|
|
@@ -1366,70 +2032,127 @@ class OBJECT_MT_modifier_add_generate(
|
|
|
1366
2032
|
...
|
|
1367
2033
|
|
|
1368
2034
|
def draw_preset(self, _context):
|
|
1369
|
-
"""
|
|
2035
|
+
"""Define these on the subclass:
|
|
2036
|
+
- preset_operator (string)
|
|
2037
|
+
- preset_subdir (string)Optionally:
|
|
2038
|
+
- preset_add_operator (string)
|
|
2039
|
+
- preset_extensions (set of strings)
|
|
2040
|
+
- preset_operator_defaults (dict of keyword args)
|
|
1370
2041
|
|
|
1371
|
-
|
|
2042
|
+
:param _context:
|
|
1372
2043
|
"""
|
|
1373
2044
|
...
|
|
1374
2045
|
|
|
1375
|
-
def driver_add(self):
|
|
1376
|
-
"""
|
|
2046
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
2047
|
+
"""Adds driver(s) to the given property
|
|
2048
|
+
|
|
2049
|
+
:return: The driver(s) added.
|
|
2050
|
+
:rtype: bpy.types.FCurve
|
|
2051
|
+
"""
|
|
1377
2052
|
...
|
|
1378
2053
|
|
|
1379
|
-
def driver_remove(self):
|
|
1380
|
-
"""
|
|
2054
|
+
def driver_remove(self) -> bool:
|
|
2055
|
+
"""Remove driver(s) from the given property
|
|
2056
|
+
|
|
2057
|
+
:return: Success of driver removal.
|
|
2058
|
+
:rtype: bool
|
|
2059
|
+
"""
|
|
1381
2060
|
...
|
|
1382
2061
|
|
|
1383
2062
|
def get(self):
|
|
1384
|
-
"""
|
|
2063
|
+
"""Returns the value of the custom property assigned to key or default
|
|
2064
|
+
when not found (matches Python's dictionary function of the same name).
|
|
2065
|
+
|
|
2066
|
+
"""
|
|
1385
2067
|
...
|
|
1386
2068
|
|
|
1387
2069
|
def id_properties_clear(self):
|
|
1388
|
-
"""
|
|
2070
|
+
"""
|
|
2071
|
+
|
|
2072
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
2073
|
+
"""
|
|
1389
2074
|
...
|
|
1390
2075
|
|
|
1391
2076
|
def id_properties_ensure(self):
|
|
1392
|
-
"""
|
|
2077
|
+
"""
|
|
2078
|
+
|
|
2079
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
2080
|
+
"""
|
|
1393
2081
|
...
|
|
1394
2082
|
|
|
1395
2083
|
def id_properties_ui(self):
|
|
1396
|
-
"""
|
|
2084
|
+
"""
|
|
2085
|
+
|
|
2086
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
2087
|
+
"""
|
|
1397
2088
|
...
|
|
1398
2089
|
|
|
1399
2090
|
def is_extended(self):
|
|
1400
2091
|
""" """
|
|
1401
2092
|
...
|
|
1402
2093
|
|
|
1403
|
-
def is_property_hidden(self):
|
|
1404
|
-
"""
|
|
2094
|
+
def is_property_hidden(self) -> bool:
|
|
2095
|
+
"""Check if a property is hidden.
|
|
2096
|
+
|
|
2097
|
+
:return: True when the property is hidden.
|
|
2098
|
+
:rtype: bool
|
|
2099
|
+
"""
|
|
1405
2100
|
...
|
|
1406
2101
|
|
|
1407
|
-
def is_property_overridable_library(self):
|
|
1408
|
-
"""
|
|
2102
|
+
def is_property_overridable_library(self) -> bool:
|
|
2103
|
+
"""Check if a property is overridable.
|
|
2104
|
+
|
|
2105
|
+
:return: True when the property is overridable.
|
|
2106
|
+
:rtype: bool
|
|
2107
|
+
"""
|
|
1409
2108
|
...
|
|
1410
2109
|
|
|
1411
|
-
def is_property_readonly(self):
|
|
1412
|
-
"""
|
|
2110
|
+
def is_property_readonly(self) -> bool:
|
|
2111
|
+
"""Check if a property is readonly.
|
|
2112
|
+
|
|
2113
|
+
:return: True when the property is readonly (not writable).
|
|
2114
|
+
:rtype: bool
|
|
2115
|
+
"""
|
|
1413
2116
|
...
|
|
1414
2117
|
|
|
1415
|
-
def is_property_set(self):
|
|
1416
|
-
"""
|
|
2118
|
+
def is_property_set(self) -> bool:
|
|
2119
|
+
"""Check if a property is set, use for testing operator properties.
|
|
2120
|
+
|
|
2121
|
+
:return: True when the property has been set.
|
|
2122
|
+
:rtype: bool
|
|
2123
|
+
"""
|
|
1417
2124
|
...
|
|
1418
2125
|
|
|
1419
2126
|
def items(self):
|
|
1420
|
-
"""
|
|
2127
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
2128
|
+
dictionary function of the same name).
|
|
2129
|
+
|
|
2130
|
+
:return: custom property key, value pairs.
|
|
2131
|
+
"""
|
|
1421
2132
|
...
|
|
1422
2133
|
|
|
1423
|
-
def keyframe_delete(self):
|
|
1424
|
-
"""
|
|
2134
|
+
def keyframe_delete(self) -> bool:
|
|
2135
|
+
"""Remove a keyframe from this properties fcurve.
|
|
2136
|
+
|
|
2137
|
+
:return: Success of keyframe deletion.
|
|
2138
|
+
:rtype: bool
|
|
2139
|
+
"""
|
|
1425
2140
|
...
|
|
1426
2141
|
|
|
1427
|
-
def keyframe_insert(self):
|
|
1428
|
-
"""
|
|
2142
|
+
def keyframe_insert(self) -> bool:
|
|
2143
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
2144
|
+
|
|
2145
|
+
:return: Success of keyframe insertion.
|
|
2146
|
+
:rtype: bool
|
|
2147
|
+
"""
|
|
1429
2148
|
...
|
|
1430
2149
|
|
|
1431
2150
|
def keys(self):
|
|
1432
|
-
"""
|
|
2151
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
2152
|
+
dictionary function of the same name).
|
|
2153
|
+
|
|
2154
|
+
:return: custom property keys.
|
|
2155
|
+
"""
|
|
1433
2156
|
...
|
|
1434
2157
|
|
|
1435
2158
|
def operator_modifier_add(self, layout, mod_type):
|
|
@@ -1440,72 +2163,101 @@ class OBJECT_MT_modifier_add_generate(
|
|
|
1440
2163
|
"""
|
|
1441
2164
|
...
|
|
1442
2165
|
|
|
1443
|
-
def path_from_id(self):
|
|
1444
|
-
"""
|
|
2166
|
+
def path_from_id(self) -> str:
|
|
2167
|
+
"""Returns the data path from the ID to this object (string).
|
|
2168
|
+
|
|
2169
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
2170
|
+
to this struct and property (when given).
|
|
2171
|
+
:rtype: str
|
|
2172
|
+
"""
|
|
1445
2173
|
...
|
|
1446
2174
|
|
|
1447
2175
|
def path_menu(
|
|
1448
2176
|
self,
|
|
1449
|
-
searchpaths,
|
|
1450
|
-
operator,
|
|
1451
|
-
props_default,
|
|
1452
|
-
prop_filepath,
|
|
1453
|
-
filter_ext,
|
|
1454
|
-
filter_path,
|
|
1455
|
-
display_name,
|
|
1456
|
-
add_operator,
|
|
1457
|
-
add_operator_props,
|
|
2177
|
+
searchpaths: list[str],
|
|
2178
|
+
operator: str,
|
|
2179
|
+
props_default: dict = None,
|
|
2180
|
+
prop_filepath: str = "filepath",
|
|
2181
|
+
filter_ext: typing.Callable = None,
|
|
2182
|
+
filter_path=None,
|
|
2183
|
+
display_name: typing.Callable = None,
|
|
2184
|
+
add_operator=None,
|
|
2185
|
+
add_operator_props=None,
|
|
1458
2186
|
):
|
|
1459
|
-
"""
|
|
2187
|
+
"""Populate a menu from a list of paths.
|
|
1460
2188
|
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
2189
|
+
:param searchpaths: Paths to scan.
|
|
2190
|
+
:type searchpaths: list[str]
|
|
2191
|
+
:param operator: The operator id to use with each file.
|
|
2192
|
+
:type operator: str
|
|
2193
|
+
:param props_default: Properties to assign to each operator.
|
|
2194
|
+
:type props_default: dict
|
|
2195
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
2196
|
+
:type prop_filepath: str
|
|
2197
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
2198
|
+
|
|
2199
|
+
Returning false excludes the file from the list.
|
|
2200
|
+
:type filter_ext: typing.Callable
|
|
2201
|
+
:param filter_path:
|
|
2202
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
2203
|
+
:type display_name: typing.Callable
|
|
2204
|
+
:param add_operator:
|
|
2205
|
+
:param add_operator_props:
|
|
1470
2206
|
"""
|
|
1471
2207
|
...
|
|
1472
2208
|
|
|
1473
2209
|
def path_resolve(self):
|
|
1474
|
-
""" """
|
|
2210
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
1475
2211
|
...
|
|
1476
2212
|
|
|
1477
2213
|
def pop(self):
|
|
1478
|
-
"""
|
|
2214
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
2215
|
+
when not found (matches Python's dictionary function of the same name).
|
|
2216
|
+
|
|
2217
|
+
"""
|
|
1479
2218
|
...
|
|
1480
2219
|
|
|
1481
2220
|
def prepend(self, draw_func):
|
|
1482
|
-
"""
|
|
2221
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
2222
|
+
the menus draw function
|
|
1483
2223
|
|
|
1484
|
-
|
|
2224
|
+
:param draw_func:
|
|
1485
2225
|
"""
|
|
1486
2226
|
...
|
|
1487
2227
|
|
|
1488
|
-
def property_overridable_library_set(self):
|
|
1489
|
-
"""
|
|
2228
|
+
def property_overridable_library_set(self) -> bool:
|
|
2229
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
2230
|
+
|
|
2231
|
+
:return: True when the overridable status of the property was successfully set.
|
|
2232
|
+
:rtype: bool
|
|
2233
|
+
"""
|
|
1490
2234
|
...
|
|
1491
2235
|
|
|
1492
2236
|
def property_unset(self):
|
|
1493
|
-
""" """
|
|
2237
|
+
"""Unset a property, will use default value afterward."""
|
|
1494
2238
|
...
|
|
1495
2239
|
|
|
1496
2240
|
def remove(self, draw_func):
|
|
1497
|
-
"""
|
|
2241
|
+
"""Remove a draw function that has been added to this menu
|
|
1498
2242
|
|
|
1499
2243
|
:param draw_func:
|
|
1500
2244
|
"""
|
|
1501
2245
|
...
|
|
1502
2246
|
|
|
1503
2247
|
def type_recast(self):
|
|
1504
|
-
"""
|
|
2248
|
+
"""Return a new instance, this is needed because types
|
|
2249
|
+
such as textures can be changed at runtime.
|
|
2250
|
+
|
|
2251
|
+
:return: a new instance of this object with the type initialized again.
|
|
2252
|
+
"""
|
|
1505
2253
|
...
|
|
1506
2254
|
|
|
1507
2255
|
def values(self):
|
|
1508
|
-
"""
|
|
2256
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
2257
|
+
dictionary function of the same name).
|
|
2258
|
+
|
|
2259
|
+
:return: custom property values.
|
|
2260
|
+
"""
|
|
1509
2261
|
...
|
|
1510
2262
|
|
|
1511
2263
|
class OBJECT_MT_modifier_add_physics(
|
|
@@ -1535,22 +2287,35 @@ class OBJECT_MT_modifier_add_physics(
|
|
|
1535
2287
|
""" """
|
|
1536
2288
|
|
|
1537
2289
|
def append(self, draw_func):
|
|
1538
|
-
"""
|
|
2290
|
+
"""Append a draw function to this menu,
|
|
2291
|
+
takes the same arguments as the menus draw function
|
|
1539
2292
|
|
|
1540
|
-
|
|
2293
|
+
:param draw_func:
|
|
1541
2294
|
"""
|
|
1542
2295
|
...
|
|
1543
2296
|
|
|
1544
|
-
def as_pointer(self):
|
|
1545
|
-
"""
|
|
2297
|
+
def as_pointer(self) -> int:
|
|
2298
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
2299
|
+
|
|
2300
|
+
:return: int (memory address).
|
|
2301
|
+
:rtype: int
|
|
2302
|
+
"""
|
|
1546
2303
|
...
|
|
1547
2304
|
|
|
1548
|
-
def bl_rna_get_subclass(self):
|
|
1549
|
-
"""
|
|
2305
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
2306
|
+
"""
|
|
2307
|
+
|
|
2308
|
+
:return: The RNA type or default when not found.
|
|
2309
|
+
:rtype: bpy.types.Struct
|
|
2310
|
+
"""
|
|
1550
2311
|
...
|
|
1551
2312
|
|
|
1552
|
-
def bl_rna_get_subclass_py(self):
|
|
1553
|
-
"""
|
|
2313
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
2314
|
+
"""
|
|
2315
|
+
|
|
2316
|
+
:return: The class or default when not found.
|
|
2317
|
+
:rtype: typing.Any
|
|
2318
|
+
"""
|
|
1554
2319
|
...
|
|
1555
2320
|
|
|
1556
2321
|
def draw(self, context):
|
|
@@ -1569,70 +2334,127 @@ class OBJECT_MT_modifier_add_physics(
|
|
|
1569
2334
|
...
|
|
1570
2335
|
|
|
1571
2336
|
def draw_preset(self, _context):
|
|
1572
|
-
"""
|
|
2337
|
+
"""Define these on the subclass:
|
|
2338
|
+
- preset_operator (string)
|
|
2339
|
+
- preset_subdir (string)Optionally:
|
|
2340
|
+
- preset_add_operator (string)
|
|
2341
|
+
- preset_extensions (set of strings)
|
|
2342
|
+
- preset_operator_defaults (dict of keyword args)
|
|
1573
2343
|
|
|
1574
|
-
|
|
2344
|
+
:param _context:
|
|
1575
2345
|
"""
|
|
1576
2346
|
...
|
|
1577
2347
|
|
|
1578
|
-
def driver_add(self):
|
|
1579
|
-
"""
|
|
2348
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
2349
|
+
"""Adds driver(s) to the given property
|
|
2350
|
+
|
|
2351
|
+
:return: The driver(s) added.
|
|
2352
|
+
:rtype: bpy.types.FCurve
|
|
2353
|
+
"""
|
|
1580
2354
|
...
|
|
1581
2355
|
|
|
1582
|
-
def driver_remove(self):
|
|
1583
|
-
"""
|
|
2356
|
+
def driver_remove(self) -> bool:
|
|
2357
|
+
"""Remove driver(s) from the given property
|
|
2358
|
+
|
|
2359
|
+
:return: Success of driver removal.
|
|
2360
|
+
:rtype: bool
|
|
2361
|
+
"""
|
|
1584
2362
|
...
|
|
1585
2363
|
|
|
1586
2364
|
def get(self):
|
|
1587
|
-
"""
|
|
2365
|
+
"""Returns the value of the custom property assigned to key or default
|
|
2366
|
+
when not found (matches Python's dictionary function of the same name).
|
|
2367
|
+
|
|
2368
|
+
"""
|
|
1588
2369
|
...
|
|
1589
2370
|
|
|
1590
2371
|
def id_properties_clear(self):
|
|
1591
|
-
"""
|
|
2372
|
+
"""
|
|
2373
|
+
|
|
2374
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
2375
|
+
"""
|
|
1592
2376
|
...
|
|
1593
2377
|
|
|
1594
2378
|
def id_properties_ensure(self):
|
|
1595
|
-
"""
|
|
2379
|
+
"""
|
|
2380
|
+
|
|
2381
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
2382
|
+
"""
|
|
1596
2383
|
...
|
|
1597
2384
|
|
|
1598
2385
|
def id_properties_ui(self):
|
|
1599
|
-
"""
|
|
2386
|
+
"""
|
|
2387
|
+
|
|
2388
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
2389
|
+
"""
|
|
1600
2390
|
...
|
|
1601
2391
|
|
|
1602
2392
|
def is_extended(self):
|
|
1603
2393
|
""" """
|
|
1604
2394
|
...
|
|
1605
2395
|
|
|
1606
|
-
def is_property_hidden(self):
|
|
1607
|
-
"""
|
|
2396
|
+
def is_property_hidden(self) -> bool:
|
|
2397
|
+
"""Check if a property is hidden.
|
|
2398
|
+
|
|
2399
|
+
:return: True when the property is hidden.
|
|
2400
|
+
:rtype: bool
|
|
2401
|
+
"""
|
|
1608
2402
|
...
|
|
1609
2403
|
|
|
1610
|
-
def is_property_overridable_library(self):
|
|
1611
|
-
"""
|
|
2404
|
+
def is_property_overridable_library(self) -> bool:
|
|
2405
|
+
"""Check if a property is overridable.
|
|
2406
|
+
|
|
2407
|
+
:return: True when the property is overridable.
|
|
2408
|
+
:rtype: bool
|
|
2409
|
+
"""
|
|
1612
2410
|
...
|
|
1613
2411
|
|
|
1614
|
-
def is_property_readonly(self):
|
|
1615
|
-
"""
|
|
2412
|
+
def is_property_readonly(self) -> bool:
|
|
2413
|
+
"""Check if a property is readonly.
|
|
2414
|
+
|
|
2415
|
+
:return: True when the property is readonly (not writable).
|
|
2416
|
+
:rtype: bool
|
|
2417
|
+
"""
|
|
1616
2418
|
...
|
|
1617
2419
|
|
|
1618
|
-
def is_property_set(self):
|
|
1619
|
-
"""
|
|
2420
|
+
def is_property_set(self) -> bool:
|
|
2421
|
+
"""Check if a property is set, use for testing operator properties.
|
|
2422
|
+
|
|
2423
|
+
:return: True when the property has been set.
|
|
2424
|
+
:rtype: bool
|
|
2425
|
+
"""
|
|
1620
2426
|
...
|
|
1621
2427
|
|
|
1622
2428
|
def items(self):
|
|
1623
|
-
"""
|
|
2429
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
2430
|
+
dictionary function of the same name).
|
|
2431
|
+
|
|
2432
|
+
:return: custom property key, value pairs.
|
|
2433
|
+
"""
|
|
1624
2434
|
...
|
|
1625
2435
|
|
|
1626
|
-
def keyframe_delete(self):
|
|
1627
|
-
"""
|
|
2436
|
+
def keyframe_delete(self) -> bool:
|
|
2437
|
+
"""Remove a keyframe from this properties fcurve.
|
|
2438
|
+
|
|
2439
|
+
:return: Success of keyframe deletion.
|
|
2440
|
+
:rtype: bool
|
|
2441
|
+
"""
|
|
1628
2442
|
...
|
|
1629
2443
|
|
|
1630
|
-
def keyframe_insert(self):
|
|
1631
|
-
"""
|
|
2444
|
+
def keyframe_insert(self) -> bool:
|
|
2445
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
2446
|
+
|
|
2447
|
+
:return: Success of keyframe insertion.
|
|
2448
|
+
:rtype: bool
|
|
2449
|
+
"""
|
|
1632
2450
|
...
|
|
1633
2451
|
|
|
1634
2452
|
def keys(self):
|
|
1635
|
-
"""
|
|
2453
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
2454
|
+
dictionary function of the same name).
|
|
2455
|
+
|
|
2456
|
+
:return: custom property keys.
|
|
2457
|
+
"""
|
|
1636
2458
|
...
|
|
1637
2459
|
|
|
1638
2460
|
def operator_modifier_add(self, layout, mod_type):
|
|
@@ -1643,70 +2465,99 @@ class OBJECT_MT_modifier_add_physics(
|
|
|
1643
2465
|
"""
|
|
1644
2466
|
...
|
|
1645
2467
|
|
|
1646
|
-
def path_from_id(self):
|
|
1647
|
-
"""
|
|
2468
|
+
def path_from_id(self) -> str:
|
|
2469
|
+
"""Returns the data path from the ID to this object (string).
|
|
2470
|
+
|
|
2471
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
2472
|
+
to this struct and property (when given).
|
|
2473
|
+
:rtype: str
|
|
2474
|
+
"""
|
|
1648
2475
|
...
|
|
1649
2476
|
|
|
1650
2477
|
def path_menu(
|
|
1651
2478
|
self,
|
|
1652
|
-
searchpaths,
|
|
1653
|
-
operator,
|
|
1654
|
-
props_default,
|
|
1655
|
-
prop_filepath,
|
|
1656
|
-
filter_ext,
|
|
1657
|
-
filter_path,
|
|
1658
|
-
display_name,
|
|
1659
|
-
add_operator,
|
|
1660
|
-
add_operator_props,
|
|
2479
|
+
searchpaths: list[str],
|
|
2480
|
+
operator: str,
|
|
2481
|
+
props_default: dict = None,
|
|
2482
|
+
prop_filepath: str = "filepath",
|
|
2483
|
+
filter_ext: typing.Callable = None,
|
|
2484
|
+
filter_path=None,
|
|
2485
|
+
display_name: typing.Callable = None,
|
|
2486
|
+
add_operator=None,
|
|
2487
|
+
add_operator_props=None,
|
|
1661
2488
|
):
|
|
1662
|
-
"""
|
|
2489
|
+
"""Populate a menu from a list of paths.
|
|
1663
2490
|
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
2491
|
+
:param searchpaths: Paths to scan.
|
|
2492
|
+
:type searchpaths: list[str]
|
|
2493
|
+
:param operator: The operator id to use with each file.
|
|
2494
|
+
:type operator: str
|
|
2495
|
+
:param props_default: Properties to assign to each operator.
|
|
2496
|
+
:type props_default: dict
|
|
2497
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
2498
|
+
:type prop_filepath: str
|
|
2499
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
2500
|
+
|
|
2501
|
+
Returning false excludes the file from the list.
|
|
2502
|
+
:type filter_ext: typing.Callable
|
|
2503
|
+
:param filter_path:
|
|
2504
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
2505
|
+
:type display_name: typing.Callable
|
|
2506
|
+
:param add_operator:
|
|
2507
|
+
:param add_operator_props:
|
|
1673
2508
|
"""
|
|
1674
2509
|
...
|
|
1675
2510
|
|
|
1676
2511
|
def path_resolve(self):
|
|
1677
|
-
""" """
|
|
2512
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
1678
2513
|
...
|
|
1679
2514
|
|
|
1680
2515
|
def pop(self):
|
|
1681
|
-
"""
|
|
2516
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
2517
|
+
when not found (matches Python's dictionary function of the same name).
|
|
2518
|
+
|
|
2519
|
+
"""
|
|
1682
2520
|
...
|
|
1683
2521
|
|
|
1684
2522
|
def prepend(self, draw_func):
|
|
1685
|
-
"""
|
|
2523
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
2524
|
+
the menus draw function
|
|
1686
2525
|
|
|
1687
|
-
|
|
2526
|
+
:param draw_func:
|
|
1688
2527
|
"""
|
|
1689
2528
|
...
|
|
1690
2529
|
|
|
1691
|
-
def property_overridable_library_set(self):
|
|
1692
|
-
"""
|
|
2530
|
+
def property_overridable_library_set(self) -> bool:
|
|
2531
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
2532
|
+
|
|
2533
|
+
:return: True when the overridable status of the property was successfully set.
|
|
2534
|
+
:rtype: bool
|
|
2535
|
+
"""
|
|
1693
2536
|
...
|
|
1694
2537
|
|
|
1695
2538
|
def property_unset(self):
|
|
1696
|
-
""" """
|
|
2539
|
+
"""Unset a property, will use default value afterward."""
|
|
1697
2540
|
...
|
|
1698
2541
|
|
|
1699
2542
|
def remove(self, draw_func):
|
|
1700
|
-
"""
|
|
2543
|
+
"""Remove a draw function that has been added to this menu
|
|
1701
2544
|
|
|
1702
2545
|
:param draw_func:
|
|
1703
2546
|
"""
|
|
1704
2547
|
...
|
|
1705
2548
|
|
|
1706
2549
|
def type_recast(self):
|
|
1707
|
-
"""
|
|
2550
|
+
"""Return a new instance, this is needed because types
|
|
2551
|
+
such as textures can be changed at runtime.
|
|
2552
|
+
|
|
2553
|
+
:return: a new instance of this object with the type initialized again.
|
|
2554
|
+
"""
|
|
1708
2555
|
...
|
|
1709
2556
|
|
|
1710
2557
|
def values(self):
|
|
1711
|
-
"""
|
|
2558
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
2559
|
+
dictionary function of the same name).
|
|
2560
|
+
|
|
2561
|
+
:return: custom property values.
|
|
2562
|
+
"""
|
|
1712
2563
|
...
|