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")
|
|
@@ -16,22 +17,35 @@ class OUTLINER_HT_header(bpy_types.Header, bpy_types._GenericUI):
|
|
|
16
17
|
""" """
|
|
17
18
|
|
|
18
19
|
def append(self, draw_func):
|
|
19
|
-
"""
|
|
20
|
+
"""Append a draw function to this menu,
|
|
21
|
+
takes the same arguments as the menus draw function
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
:param draw_func:
|
|
22
24
|
"""
|
|
23
25
|
...
|
|
24
26
|
|
|
25
|
-
def as_pointer(self):
|
|
26
|
-
"""
|
|
27
|
+
def as_pointer(self) -> int:
|
|
28
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
29
|
+
|
|
30
|
+
:return: int (memory address).
|
|
31
|
+
:rtype: int
|
|
32
|
+
"""
|
|
27
33
|
...
|
|
28
34
|
|
|
29
|
-
def bl_rna_get_subclass(self):
|
|
30
|
-
"""
|
|
35
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
:return: The RNA type or default when not found.
|
|
39
|
+
:rtype: bpy.types.Struct
|
|
40
|
+
"""
|
|
31
41
|
...
|
|
32
42
|
|
|
33
|
-
def bl_rna_get_subclass_py(self):
|
|
34
|
-
"""
|
|
43
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
:return: The class or default when not found.
|
|
47
|
+
:rtype: typing.Any
|
|
48
|
+
"""
|
|
35
49
|
...
|
|
36
50
|
|
|
37
51
|
def draw(self, context):
|
|
@@ -41,106 +55,179 @@ class OUTLINER_HT_header(bpy_types.Header, bpy_types._GenericUI):
|
|
|
41
55
|
"""
|
|
42
56
|
...
|
|
43
57
|
|
|
44
|
-
def driver_add(self):
|
|
45
|
-
"""
|
|
58
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
59
|
+
"""Adds driver(s) to the given property
|
|
60
|
+
|
|
61
|
+
:return: The driver(s) added.
|
|
62
|
+
:rtype: bpy.types.FCurve
|
|
63
|
+
"""
|
|
46
64
|
...
|
|
47
65
|
|
|
48
|
-
def driver_remove(self):
|
|
49
|
-
"""
|
|
66
|
+
def driver_remove(self) -> bool:
|
|
67
|
+
"""Remove driver(s) from the given property
|
|
68
|
+
|
|
69
|
+
:return: Success of driver removal.
|
|
70
|
+
:rtype: bool
|
|
71
|
+
"""
|
|
50
72
|
...
|
|
51
73
|
|
|
52
74
|
def get(self):
|
|
53
|
-
"""
|
|
75
|
+
"""Returns the value of the custom property assigned to key or default
|
|
76
|
+
when not found (matches Python's dictionary function of the same name).
|
|
77
|
+
|
|
78
|
+
"""
|
|
54
79
|
...
|
|
55
80
|
|
|
56
81
|
def id_properties_clear(self):
|
|
57
|
-
"""
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
85
|
+
"""
|
|
58
86
|
...
|
|
59
87
|
|
|
60
88
|
def id_properties_ensure(self):
|
|
61
|
-
"""
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
92
|
+
"""
|
|
62
93
|
...
|
|
63
94
|
|
|
64
95
|
def id_properties_ui(self):
|
|
65
|
-
"""
|
|
96
|
+
"""
|
|
97
|
+
|
|
98
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
99
|
+
"""
|
|
66
100
|
...
|
|
67
101
|
|
|
68
102
|
def is_extended(self):
|
|
69
103
|
""" """
|
|
70
104
|
...
|
|
71
105
|
|
|
72
|
-
def is_property_hidden(self):
|
|
73
|
-
"""
|
|
106
|
+
def is_property_hidden(self) -> bool:
|
|
107
|
+
"""Check if a property is hidden.
|
|
108
|
+
|
|
109
|
+
:return: True when the property is hidden.
|
|
110
|
+
:rtype: bool
|
|
111
|
+
"""
|
|
74
112
|
...
|
|
75
113
|
|
|
76
|
-
def is_property_overridable_library(self):
|
|
77
|
-
"""
|
|
114
|
+
def is_property_overridable_library(self) -> bool:
|
|
115
|
+
"""Check if a property is overridable.
|
|
116
|
+
|
|
117
|
+
:return: True when the property is overridable.
|
|
118
|
+
:rtype: bool
|
|
119
|
+
"""
|
|
78
120
|
...
|
|
79
121
|
|
|
80
|
-
def is_property_readonly(self):
|
|
81
|
-
"""
|
|
122
|
+
def is_property_readonly(self) -> bool:
|
|
123
|
+
"""Check if a property is readonly.
|
|
124
|
+
|
|
125
|
+
:return: True when the property is readonly (not writable).
|
|
126
|
+
:rtype: bool
|
|
127
|
+
"""
|
|
82
128
|
...
|
|
83
129
|
|
|
84
|
-
def is_property_set(self):
|
|
85
|
-
"""
|
|
130
|
+
def is_property_set(self) -> bool:
|
|
131
|
+
"""Check if a property is set, use for testing operator properties.
|
|
132
|
+
|
|
133
|
+
:return: True when the property has been set.
|
|
134
|
+
:rtype: bool
|
|
135
|
+
"""
|
|
86
136
|
...
|
|
87
137
|
|
|
88
138
|
def items(self):
|
|
89
|
-
"""
|
|
139
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
140
|
+
dictionary function of the same name).
|
|
141
|
+
|
|
142
|
+
:return: custom property key, value pairs.
|
|
143
|
+
"""
|
|
90
144
|
...
|
|
91
145
|
|
|
92
|
-
def keyframe_delete(self):
|
|
93
|
-
"""
|
|
146
|
+
def keyframe_delete(self) -> bool:
|
|
147
|
+
"""Remove a keyframe from this properties fcurve.
|
|
148
|
+
|
|
149
|
+
:return: Success of keyframe deletion.
|
|
150
|
+
:rtype: bool
|
|
151
|
+
"""
|
|
94
152
|
...
|
|
95
153
|
|
|
96
|
-
def keyframe_insert(self):
|
|
97
|
-
"""
|
|
154
|
+
def keyframe_insert(self) -> bool:
|
|
155
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
156
|
+
|
|
157
|
+
:return: Success of keyframe insertion.
|
|
158
|
+
:rtype: bool
|
|
159
|
+
"""
|
|
98
160
|
...
|
|
99
161
|
|
|
100
162
|
def keys(self):
|
|
101
|
-
"""
|
|
163
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
164
|
+
dictionary function of the same name).
|
|
165
|
+
|
|
166
|
+
:return: custom property keys.
|
|
167
|
+
"""
|
|
102
168
|
...
|
|
103
169
|
|
|
104
|
-
def path_from_id(self):
|
|
105
|
-
"""
|
|
170
|
+
def path_from_id(self) -> str:
|
|
171
|
+
"""Returns the data path from the ID to this object (string).
|
|
172
|
+
|
|
173
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
174
|
+
to this struct and property (when given).
|
|
175
|
+
:rtype: str
|
|
176
|
+
"""
|
|
106
177
|
...
|
|
107
178
|
|
|
108
179
|
def path_resolve(self):
|
|
109
|
-
""" """
|
|
180
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
110
181
|
...
|
|
111
182
|
|
|
112
183
|
def pop(self):
|
|
113
|
-
"""
|
|
184
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
185
|
+
when not found (matches Python's dictionary function of the same name).
|
|
186
|
+
|
|
187
|
+
"""
|
|
114
188
|
...
|
|
115
189
|
|
|
116
190
|
def prepend(self, draw_func):
|
|
117
|
-
"""
|
|
191
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
192
|
+
the menus draw function
|
|
118
193
|
|
|
119
|
-
|
|
194
|
+
:param draw_func:
|
|
120
195
|
"""
|
|
121
196
|
...
|
|
122
197
|
|
|
123
|
-
def property_overridable_library_set(self):
|
|
124
|
-
"""
|
|
198
|
+
def property_overridable_library_set(self) -> bool:
|
|
199
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
200
|
+
|
|
201
|
+
:return: True when the overridable status of the property was successfully set.
|
|
202
|
+
:rtype: bool
|
|
203
|
+
"""
|
|
125
204
|
...
|
|
126
205
|
|
|
127
206
|
def property_unset(self):
|
|
128
|
-
""" """
|
|
207
|
+
"""Unset a property, will use default value afterward."""
|
|
129
208
|
...
|
|
130
209
|
|
|
131
210
|
def remove(self, draw_func):
|
|
132
|
-
"""
|
|
211
|
+
"""Remove a draw function that has been added to this menu
|
|
133
212
|
|
|
134
213
|
:param draw_func:
|
|
135
214
|
"""
|
|
136
215
|
...
|
|
137
216
|
|
|
138
217
|
def type_recast(self):
|
|
139
|
-
"""
|
|
218
|
+
"""Return a new instance, this is needed because types
|
|
219
|
+
such as textures can be changed at runtime.
|
|
220
|
+
|
|
221
|
+
:return: a new instance of this object with the type initialized again.
|
|
222
|
+
"""
|
|
140
223
|
...
|
|
141
224
|
|
|
142
225
|
def values(self):
|
|
143
|
-
"""
|
|
226
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
227
|
+
dictionary function of the same name).
|
|
228
|
+
|
|
229
|
+
:return: custom property values.
|
|
230
|
+
"""
|
|
144
231
|
...
|
|
145
232
|
|
|
146
233
|
class OUTLINER_MT_asset(bpy_types.Menu, bpy_types._GenericUI):
|
|
@@ -156,22 +243,35 @@ class OUTLINER_MT_asset(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
156
243
|
""" """
|
|
157
244
|
|
|
158
245
|
def append(self, draw_func):
|
|
159
|
-
"""
|
|
246
|
+
"""Append a draw function to this menu,
|
|
247
|
+
takes the same arguments as the menus draw function
|
|
160
248
|
|
|
161
|
-
|
|
249
|
+
:param draw_func:
|
|
162
250
|
"""
|
|
163
251
|
...
|
|
164
252
|
|
|
165
|
-
def as_pointer(self):
|
|
166
|
-
"""
|
|
253
|
+
def as_pointer(self) -> int:
|
|
254
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
255
|
+
|
|
256
|
+
:return: int (memory address).
|
|
257
|
+
:rtype: int
|
|
258
|
+
"""
|
|
167
259
|
...
|
|
168
260
|
|
|
169
|
-
def bl_rna_get_subclass(self):
|
|
170
|
-
"""
|
|
261
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
262
|
+
"""
|
|
263
|
+
|
|
264
|
+
:return: The RNA type or default when not found.
|
|
265
|
+
:rtype: bpy.types.Struct
|
|
266
|
+
"""
|
|
171
267
|
...
|
|
172
268
|
|
|
173
|
-
def bl_rna_get_subclass_py(self):
|
|
174
|
-
"""
|
|
269
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
270
|
+
"""
|
|
271
|
+
|
|
272
|
+
:return: The class or default when not found.
|
|
273
|
+
:rtype: typing.Any
|
|
274
|
+
"""
|
|
175
275
|
...
|
|
176
276
|
|
|
177
277
|
def draw(self, _context):
|
|
@@ -190,104 +290,174 @@ class OUTLINER_MT_asset(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
190
290
|
...
|
|
191
291
|
|
|
192
292
|
def draw_preset(self, _context):
|
|
193
|
-
"""
|
|
293
|
+
"""Define these on the subclass:
|
|
294
|
+
- preset_operator (string)
|
|
295
|
+
- preset_subdir (string)Optionally:
|
|
296
|
+
- preset_add_operator (string)
|
|
297
|
+
- preset_extensions (set of strings)
|
|
298
|
+
- preset_operator_defaults (dict of keyword args)
|
|
194
299
|
|
|
195
|
-
|
|
300
|
+
:param _context:
|
|
196
301
|
"""
|
|
197
302
|
...
|
|
198
303
|
|
|
199
|
-
def driver_add(self):
|
|
200
|
-
"""
|
|
304
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
305
|
+
"""Adds driver(s) to the given property
|
|
306
|
+
|
|
307
|
+
:return: The driver(s) added.
|
|
308
|
+
:rtype: bpy.types.FCurve
|
|
309
|
+
"""
|
|
201
310
|
...
|
|
202
311
|
|
|
203
|
-
def driver_remove(self):
|
|
204
|
-
"""
|
|
312
|
+
def driver_remove(self) -> bool:
|
|
313
|
+
"""Remove driver(s) from the given property
|
|
314
|
+
|
|
315
|
+
:return: Success of driver removal.
|
|
316
|
+
:rtype: bool
|
|
317
|
+
"""
|
|
205
318
|
...
|
|
206
319
|
|
|
207
320
|
def get(self):
|
|
208
|
-
"""
|
|
321
|
+
"""Returns the value of the custom property assigned to key or default
|
|
322
|
+
when not found (matches Python's dictionary function of the same name).
|
|
323
|
+
|
|
324
|
+
"""
|
|
209
325
|
...
|
|
210
326
|
|
|
211
327
|
def id_properties_clear(self):
|
|
212
|
-
"""
|
|
328
|
+
"""
|
|
329
|
+
|
|
330
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
331
|
+
"""
|
|
213
332
|
...
|
|
214
333
|
|
|
215
334
|
def id_properties_ensure(self):
|
|
216
|
-
"""
|
|
335
|
+
"""
|
|
336
|
+
|
|
337
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
338
|
+
"""
|
|
217
339
|
...
|
|
218
340
|
|
|
219
341
|
def id_properties_ui(self):
|
|
220
|
-
"""
|
|
342
|
+
"""
|
|
343
|
+
|
|
344
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
345
|
+
"""
|
|
221
346
|
...
|
|
222
347
|
|
|
223
348
|
def is_extended(self):
|
|
224
349
|
""" """
|
|
225
350
|
...
|
|
226
351
|
|
|
227
|
-
def is_property_hidden(self):
|
|
228
|
-
"""
|
|
352
|
+
def is_property_hidden(self) -> bool:
|
|
353
|
+
"""Check if a property is hidden.
|
|
354
|
+
|
|
355
|
+
:return: True when the property is hidden.
|
|
356
|
+
:rtype: bool
|
|
357
|
+
"""
|
|
229
358
|
...
|
|
230
359
|
|
|
231
|
-
def is_property_overridable_library(self):
|
|
232
|
-
"""
|
|
360
|
+
def is_property_overridable_library(self) -> bool:
|
|
361
|
+
"""Check if a property is overridable.
|
|
362
|
+
|
|
363
|
+
:return: True when the property is overridable.
|
|
364
|
+
:rtype: bool
|
|
365
|
+
"""
|
|
233
366
|
...
|
|
234
367
|
|
|
235
|
-
def is_property_readonly(self):
|
|
236
|
-
"""
|
|
368
|
+
def is_property_readonly(self) -> bool:
|
|
369
|
+
"""Check if a property is readonly.
|
|
370
|
+
|
|
371
|
+
:return: True when the property is readonly (not writable).
|
|
372
|
+
:rtype: bool
|
|
373
|
+
"""
|
|
237
374
|
...
|
|
238
375
|
|
|
239
|
-
def is_property_set(self):
|
|
240
|
-
"""
|
|
376
|
+
def is_property_set(self) -> bool:
|
|
377
|
+
"""Check if a property is set, use for testing operator properties.
|
|
378
|
+
|
|
379
|
+
:return: True when the property has been set.
|
|
380
|
+
:rtype: bool
|
|
381
|
+
"""
|
|
241
382
|
...
|
|
242
383
|
|
|
243
384
|
def items(self):
|
|
244
|
-
"""
|
|
385
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
386
|
+
dictionary function of the same name).
|
|
387
|
+
|
|
388
|
+
:return: custom property key, value pairs.
|
|
389
|
+
"""
|
|
245
390
|
...
|
|
246
391
|
|
|
247
|
-
def keyframe_delete(self):
|
|
248
|
-
"""
|
|
392
|
+
def keyframe_delete(self) -> bool:
|
|
393
|
+
"""Remove a keyframe from this properties fcurve.
|
|
394
|
+
|
|
395
|
+
:return: Success of keyframe deletion.
|
|
396
|
+
:rtype: bool
|
|
397
|
+
"""
|
|
249
398
|
...
|
|
250
399
|
|
|
251
|
-
def keyframe_insert(self):
|
|
252
|
-
"""
|
|
400
|
+
def keyframe_insert(self) -> bool:
|
|
401
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
402
|
+
|
|
403
|
+
:return: Success of keyframe insertion.
|
|
404
|
+
:rtype: bool
|
|
405
|
+
"""
|
|
253
406
|
...
|
|
254
407
|
|
|
255
408
|
def keys(self):
|
|
256
|
-
"""
|
|
409
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
410
|
+
dictionary function of the same name).
|
|
411
|
+
|
|
412
|
+
:return: custom property keys.
|
|
413
|
+
"""
|
|
257
414
|
...
|
|
258
415
|
|
|
259
|
-
def path_from_id(self):
|
|
260
|
-
"""
|
|
416
|
+
def path_from_id(self) -> str:
|
|
417
|
+
"""Returns the data path from the ID to this object (string).
|
|
418
|
+
|
|
419
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
420
|
+
to this struct and property (when given).
|
|
421
|
+
:rtype: str
|
|
422
|
+
"""
|
|
261
423
|
...
|
|
262
424
|
|
|
263
425
|
def path_menu(
|
|
264
426
|
self,
|
|
265
|
-
searchpaths,
|
|
266
|
-
operator,
|
|
267
|
-
props_default,
|
|
268
|
-
prop_filepath,
|
|
269
|
-
filter_ext,
|
|
270
|
-
filter_path,
|
|
271
|
-
display_name,
|
|
272
|
-
add_operator,
|
|
273
|
-
add_operator_props,
|
|
427
|
+
searchpaths: list[str],
|
|
428
|
+
operator: str,
|
|
429
|
+
props_default: dict = None,
|
|
430
|
+
prop_filepath: str = "filepath",
|
|
431
|
+
filter_ext: typing.Callable = None,
|
|
432
|
+
filter_path=None,
|
|
433
|
+
display_name: typing.Callable = None,
|
|
434
|
+
add_operator=None,
|
|
435
|
+
add_operator_props=None,
|
|
274
436
|
):
|
|
275
|
-
"""
|
|
437
|
+
"""Populate a menu from a list of paths.
|
|
276
438
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
439
|
+
:param searchpaths: Paths to scan.
|
|
440
|
+
:type searchpaths: list[str]
|
|
441
|
+
:param operator: The operator id to use with each file.
|
|
442
|
+
:type operator: str
|
|
443
|
+
:param props_default: Properties to assign to each operator.
|
|
444
|
+
:type props_default: dict
|
|
445
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
446
|
+
:type prop_filepath: str
|
|
447
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
448
|
+
|
|
449
|
+
Returning false excludes the file from the list.
|
|
450
|
+
:type filter_ext: typing.Callable
|
|
451
|
+
:param filter_path:
|
|
452
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
453
|
+
:type display_name: typing.Callable
|
|
454
|
+
:param add_operator:
|
|
455
|
+
:param add_operator_props:
|
|
286
456
|
"""
|
|
287
457
|
...
|
|
288
458
|
|
|
289
459
|
def path_resolve(self):
|
|
290
|
-
""" """
|
|
460
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
291
461
|
...
|
|
292
462
|
|
|
293
463
|
def poll(self, context):
|
|
@@ -298,37 +468,53 @@ class OUTLINER_MT_asset(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
298
468
|
...
|
|
299
469
|
|
|
300
470
|
def pop(self):
|
|
301
|
-
"""
|
|
471
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
472
|
+
when not found (matches Python's dictionary function of the same name).
|
|
473
|
+
|
|
474
|
+
"""
|
|
302
475
|
...
|
|
303
476
|
|
|
304
477
|
def prepend(self, draw_func):
|
|
305
|
-
"""
|
|
478
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
479
|
+
the menus draw function
|
|
306
480
|
|
|
307
|
-
|
|
481
|
+
:param draw_func:
|
|
308
482
|
"""
|
|
309
483
|
...
|
|
310
484
|
|
|
311
|
-
def property_overridable_library_set(self):
|
|
312
|
-
"""
|
|
485
|
+
def property_overridable_library_set(self) -> bool:
|
|
486
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
487
|
+
|
|
488
|
+
:return: True when the overridable status of the property was successfully set.
|
|
489
|
+
:rtype: bool
|
|
490
|
+
"""
|
|
313
491
|
...
|
|
314
492
|
|
|
315
493
|
def property_unset(self):
|
|
316
|
-
""" """
|
|
494
|
+
"""Unset a property, will use default value afterward."""
|
|
317
495
|
...
|
|
318
496
|
|
|
319
497
|
def remove(self, draw_func):
|
|
320
|
-
"""
|
|
498
|
+
"""Remove a draw function that has been added to this menu
|
|
321
499
|
|
|
322
500
|
:param draw_func:
|
|
323
501
|
"""
|
|
324
502
|
...
|
|
325
503
|
|
|
326
504
|
def type_recast(self):
|
|
327
|
-
"""
|
|
505
|
+
"""Return a new instance, this is needed because types
|
|
506
|
+
such as textures can be changed at runtime.
|
|
507
|
+
|
|
508
|
+
:return: a new instance of this object with the type initialized again.
|
|
509
|
+
"""
|
|
328
510
|
...
|
|
329
511
|
|
|
330
512
|
def values(self):
|
|
331
|
-
"""
|
|
513
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
514
|
+
dictionary function of the same name).
|
|
515
|
+
|
|
516
|
+
:return: custom property values.
|
|
517
|
+
"""
|
|
332
518
|
...
|
|
333
519
|
|
|
334
520
|
class OUTLINER_MT_collection(bpy_types.Menu, bpy_types._GenericUI):
|
|
@@ -344,22 +530,35 @@ class OUTLINER_MT_collection(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
344
530
|
""" """
|
|
345
531
|
|
|
346
532
|
def append(self, draw_func):
|
|
347
|
-
"""
|
|
533
|
+
"""Append a draw function to this menu,
|
|
534
|
+
takes the same arguments as the menus draw function
|
|
348
535
|
|
|
349
|
-
|
|
536
|
+
:param draw_func:
|
|
350
537
|
"""
|
|
351
538
|
...
|
|
352
539
|
|
|
353
|
-
def as_pointer(self):
|
|
354
|
-
"""
|
|
540
|
+
def as_pointer(self) -> int:
|
|
541
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
542
|
+
|
|
543
|
+
:return: int (memory address).
|
|
544
|
+
:rtype: int
|
|
545
|
+
"""
|
|
355
546
|
...
|
|
356
547
|
|
|
357
|
-
def bl_rna_get_subclass(self):
|
|
358
|
-
"""
|
|
548
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
549
|
+
"""
|
|
550
|
+
|
|
551
|
+
:return: The RNA type or default when not found.
|
|
552
|
+
:rtype: bpy.types.Struct
|
|
553
|
+
"""
|
|
359
554
|
...
|
|
360
555
|
|
|
361
|
-
def bl_rna_get_subclass_py(self):
|
|
362
|
-
"""
|
|
556
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
557
|
+
"""
|
|
558
|
+
|
|
559
|
+
:return: The class or default when not found.
|
|
560
|
+
:rtype: typing.Any
|
|
561
|
+
"""
|
|
363
562
|
...
|
|
364
563
|
|
|
365
564
|
def draw(self, context):
|
|
@@ -378,138 +577,224 @@ class OUTLINER_MT_collection(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
378
577
|
...
|
|
379
578
|
|
|
380
579
|
def draw_preset(self, _context):
|
|
381
|
-
"""
|
|
580
|
+
"""Define these on the subclass:
|
|
581
|
+
- preset_operator (string)
|
|
582
|
+
- preset_subdir (string)Optionally:
|
|
583
|
+
- preset_add_operator (string)
|
|
584
|
+
- preset_extensions (set of strings)
|
|
585
|
+
- preset_operator_defaults (dict of keyword args)
|
|
382
586
|
|
|
383
|
-
|
|
587
|
+
:param _context:
|
|
384
588
|
"""
|
|
385
589
|
...
|
|
386
590
|
|
|
387
|
-
def driver_add(self):
|
|
388
|
-
"""
|
|
591
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
592
|
+
"""Adds driver(s) to the given property
|
|
593
|
+
|
|
594
|
+
:return: The driver(s) added.
|
|
595
|
+
:rtype: bpy.types.FCurve
|
|
596
|
+
"""
|
|
389
597
|
...
|
|
390
598
|
|
|
391
|
-
def driver_remove(self):
|
|
392
|
-
"""
|
|
599
|
+
def driver_remove(self) -> bool:
|
|
600
|
+
"""Remove driver(s) from the given property
|
|
601
|
+
|
|
602
|
+
:return: Success of driver removal.
|
|
603
|
+
:rtype: bool
|
|
604
|
+
"""
|
|
393
605
|
...
|
|
394
606
|
|
|
395
607
|
def get(self):
|
|
396
|
-
"""
|
|
608
|
+
"""Returns the value of the custom property assigned to key or default
|
|
609
|
+
when not found (matches Python's dictionary function of the same name).
|
|
610
|
+
|
|
611
|
+
"""
|
|
397
612
|
...
|
|
398
613
|
|
|
399
614
|
def id_properties_clear(self):
|
|
400
|
-
"""
|
|
615
|
+
"""
|
|
616
|
+
|
|
617
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
618
|
+
"""
|
|
401
619
|
...
|
|
402
620
|
|
|
403
621
|
def id_properties_ensure(self):
|
|
404
|
-
"""
|
|
622
|
+
"""
|
|
623
|
+
|
|
624
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
625
|
+
"""
|
|
405
626
|
...
|
|
406
627
|
|
|
407
628
|
def id_properties_ui(self):
|
|
408
|
-
"""
|
|
629
|
+
"""
|
|
630
|
+
|
|
631
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
632
|
+
"""
|
|
409
633
|
...
|
|
410
634
|
|
|
411
635
|
def is_extended(self):
|
|
412
636
|
""" """
|
|
413
637
|
...
|
|
414
638
|
|
|
415
|
-
def is_property_hidden(self):
|
|
416
|
-
"""
|
|
639
|
+
def is_property_hidden(self) -> bool:
|
|
640
|
+
"""Check if a property is hidden.
|
|
641
|
+
|
|
642
|
+
:return: True when the property is hidden.
|
|
643
|
+
:rtype: bool
|
|
644
|
+
"""
|
|
417
645
|
...
|
|
418
646
|
|
|
419
|
-
def is_property_overridable_library(self):
|
|
420
|
-
"""
|
|
647
|
+
def is_property_overridable_library(self) -> bool:
|
|
648
|
+
"""Check if a property is overridable.
|
|
649
|
+
|
|
650
|
+
:return: True when the property is overridable.
|
|
651
|
+
:rtype: bool
|
|
652
|
+
"""
|
|
421
653
|
...
|
|
422
654
|
|
|
423
|
-
def is_property_readonly(self):
|
|
424
|
-
"""
|
|
655
|
+
def is_property_readonly(self) -> bool:
|
|
656
|
+
"""Check if a property is readonly.
|
|
657
|
+
|
|
658
|
+
:return: True when the property is readonly (not writable).
|
|
659
|
+
:rtype: bool
|
|
660
|
+
"""
|
|
425
661
|
...
|
|
426
662
|
|
|
427
|
-
def is_property_set(self):
|
|
428
|
-
"""
|
|
663
|
+
def is_property_set(self) -> bool:
|
|
664
|
+
"""Check if a property is set, use for testing operator properties.
|
|
665
|
+
|
|
666
|
+
:return: True when the property has been set.
|
|
667
|
+
:rtype: bool
|
|
668
|
+
"""
|
|
429
669
|
...
|
|
430
670
|
|
|
431
671
|
def items(self):
|
|
432
|
-
"""
|
|
672
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
673
|
+
dictionary function of the same name).
|
|
674
|
+
|
|
675
|
+
:return: custom property key, value pairs.
|
|
676
|
+
"""
|
|
433
677
|
...
|
|
434
678
|
|
|
435
|
-
def keyframe_delete(self):
|
|
436
|
-
"""
|
|
679
|
+
def keyframe_delete(self) -> bool:
|
|
680
|
+
"""Remove a keyframe from this properties fcurve.
|
|
681
|
+
|
|
682
|
+
:return: Success of keyframe deletion.
|
|
683
|
+
:rtype: bool
|
|
684
|
+
"""
|
|
437
685
|
...
|
|
438
686
|
|
|
439
|
-
def keyframe_insert(self):
|
|
440
|
-
"""
|
|
687
|
+
def keyframe_insert(self) -> bool:
|
|
688
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
689
|
+
|
|
690
|
+
:return: Success of keyframe insertion.
|
|
691
|
+
:rtype: bool
|
|
692
|
+
"""
|
|
441
693
|
...
|
|
442
694
|
|
|
443
695
|
def keys(self):
|
|
444
|
-
"""
|
|
696
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
697
|
+
dictionary function of the same name).
|
|
698
|
+
|
|
699
|
+
:return: custom property keys.
|
|
700
|
+
"""
|
|
445
701
|
...
|
|
446
702
|
|
|
447
|
-
def path_from_id(self):
|
|
448
|
-
"""
|
|
703
|
+
def path_from_id(self) -> str:
|
|
704
|
+
"""Returns the data path from the ID to this object (string).
|
|
705
|
+
|
|
706
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
707
|
+
to this struct and property (when given).
|
|
708
|
+
:rtype: str
|
|
709
|
+
"""
|
|
449
710
|
...
|
|
450
711
|
|
|
451
712
|
def path_menu(
|
|
452
713
|
self,
|
|
453
|
-
searchpaths,
|
|
454
|
-
operator,
|
|
455
|
-
props_default,
|
|
456
|
-
prop_filepath,
|
|
457
|
-
filter_ext,
|
|
458
|
-
filter_path,
|
|
459
|
-
display_name,
|
|
460
|
-
add_operator,
|
|
461
|
-
add_operator_props,
|
|
714
|
+
searchpaths: list[str],
|
|
715
|
+
operator: str,
|
|
716
|
+
props_default: dict = None,
|
|
717
|
+
prop_filepath: str = "filepath",
|
|
718
|
+
filter_ext: typing.Callable = None,
|
|
719
|
+
filter_path=None,
|
|
720
|
+
display_name: typing.Callable = None,
|
|
721
|
+
add_operator=None,
|
|
722
|
+
add_operator_props=None,
|
|
462
723
|
):
|
|
463
|
-
"""
|
|
724
|
+
"""Populate a menu from a list of paths.
|
|
464
725
|
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
726
|
+
:param searchpaths: Paths to scan.
|
|
727
|
+
:type searchpaths: list[str]
|
|
728
|
+
:param operator: The operator id to use with each file.
|
|
729
|
+
:type operator: str
|
|
730
|
+
:param props_default: Properties to assign to each operator.
|
|
731
|
+
:type props_default: dict
|
|
732
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
733
|
+
:type prop_filepath: str
|
|
734
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
735
|
+
|
|
736
|
+
Returning false excludes the file from the list.
|
|
737
|
+
:type filter_ext: typing.Callable
|
|
738
|
+
:param filter_path:
|
|
739
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
740
|
+
:type display_name: typing.Callable
|
|
741
|
+
:param add_operator:
|
|
742
|
+
:param add_operator_props:
|
|
474
743
|
"""
|
|
475
744
|
...
|
|
476
745
|
|
|
477
746
|
def path_resolve(self):
|
|
478
|
-
""" """
|
|
747
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
479
748
|
...
|
|
480
749
|
|
|
481
750
|
def pop(self):
|
|
482
|
-
"""
|
|
751
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
752
|
+
when not found (matches Python's dictionary function of the same name).
|
|
753
|
+
|
|
754
|
+
"""
|
|
483
755
|
...
|
|
484
756
|
|
|
485
757
|
def prepend(self, draw_func):
|
|
486
|
-
"""
|
|
758
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
759
|
+
the menus draw function
|
|
487
760
|
|
|
488
|
-
|
|
761
|
+
:param draw_func:
|
|
489
762
|
"""
|
|
490
763
|
...
|
|
491
764
|
|
|
492
|
-
def property_overridable_library_set(self):
|
|
493
|
-
"""
|
|
765
|
+
def property_overridable_library_set(self) -> bool:
|
|
766
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
767
|
+
|
|
768
|
+
:return: True when the overridable status of the property was successfully set.
|
|
769
|
+
:rtype: bool
|
|
770
|
+
"""
|
|
494
771
|
...
|
|
495
772
|
|
|
496
773
|
def property_unset(self):
|
|
497
|
-
""" """
|
|
774
|
+
"""Unset a property, will use default value afterward."""
|
|
498
775
|
...
|
|
499
776
|
|
|
500
777
|
def remove(self, draw_func):
|
|
501
|
-
"""
|
|
778
|
+
"""Remove a draw function that has been added to this menu
|
|
502
779
|
|
|
503
780
|
:param draw_func:
|
|
504
781
|
"""
|
|
505
782
|
...
|
|
506
783
|
|
|
507
784
|
def type_recast(self):
|
|
508
|
-
"""
|
|
785
|
+
"""Return a new instance, this is needed because types
|
|
786
|
+
such as textures can be changed at runtime.
|
|
787
|
+
|
|
788
|
+
:return: a new instance of this object with the type initialized again.
|
|
789
|
+
"""
|
|
509
790
|
...
|
|
510
791
|
|
|
511
792
|
def values(self):
|
|
512
|
-
"""
|
|
793
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
794
|
+
dictionary function of the same name).
|
|
795
|
+
|
|
796
|
+
:return: custom property values.
|
|
797
|
+
"""
|
|
513
798
|
...
|
|
514
799
|
|
|
515
800
|
class OUTLINER_MT_collection_new(bpy_types.Menu, bpy_types._GenericUI):
|
|
@@ -525,22 +810,35 @@ class OUTLINER_MT_collection_new(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
525
810
|
""" """
|
|
526
811
|
|
|
527
812
|
def append(self, draw_func):
|
|
528
|
-
"""
|
|
813
|
+
"""Append a draw function to this menu,
|
|
814
|
+
takes the same arguments as the menus draw function
|
|
529
815
|
|
|
530
|
-
|
|
816
|
+
:param draw_func:
|
|
531
817
|
"""
|
|
532
818
|
...
|
|
533
819
|
|
|
534
|
-
def as_pointer(self):
|
|
535
|
-
"""
|
|
820
|
+
def as_pointer(self) -> int:
|
|
821
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
822
|
+
|
|
823
|
+
:return: int (memory address).
|
|
824
|
+
:rtype: int
|
|
825
|
+
"""
|
|
536
826
|
...
|
|
537
827
|
|
|
538
|
-
def bl_rna_get_subclass(self):
|
|
539
|
-
"""
|
|
828
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
829
|
+
"""
|
|
830
|
+
|
|
831
|
+
:return: The RNA type or default when not found.
|
|
832
|
+
:rtype: bpy.types.Struct
|
|
833
|
+
"""
|
|
540
834
|
...
|
|
541
835
|
|
|
542
|
-
def bl_rna_get_subclass_py(self):
|
|
543
|
-
"""
|
|
836
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
837
|
+
"""
|
|
838
|
+
|
|
839
|
+
:return: The class or default when not found.
|
|
840
|
+
:rtype: typing.Any
|
|
841
|
+
"""
|
|
544
842
|
...
|
|
545
843
|
|
|
546
844
|
def draw(self, context):
|
|
@@ -559,9 +857,14 @@ class OUTLINER_MT_collection_new(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
559
857
|
...
|
|
560
858
|
|
|
561
859
|
def draw_preset(self, _context):
|
|
562
|
-
"""
|
|
860
|
+
"""Define these on the subclass:
|
|
861
|
+
- preset_operator (string)
|
|
862
|
+
- preset_subdir (string)Optionally:
|
|
863
|
+
- preset_add_operator (string)
|
|
864
|
+
- preset_extensions (set of strings)
|
|
865
|
+
- preset_operator_defaults (dict of keyword args)
|
|
563
866
|
|
|
564
|
-
|
|
867
|
+
:param _context:
|
|
565
868
|
"""
|
|
566
869
|
...
|
|
567
870
|
|
|
@@ -573,132 +876,213 @@ class OUTLINER_MT_collection_new(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
573
876
|
"""
|
|
574
877
|
...
|
|
575
878
|
|
|
576
|
-
def driver_add(self):
|
|
577
|
-
"""
|
|
879
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
880
|
+
"""Adds driver(s) to the given property
|
|
881
|
+
|
|
882
|
+
:return: The driver(s) added.
|
|
883
|
+
:rtype: bpy.types.FCurve
|
|
884
|
+
"""
|
|
578
885
|
...
|
|
579
886
|
|
|
580
|
-
def driver_remove(self):
|
|
581
|
-
"""
|
|
887
|
+
def driver_remove(self) -> bool:
|
|
888
|
+
"""Remove driver(s) from the given property
|
|
889
|
+
|
|
890
|
+
:return: Success of driver removal.
|
|
891
|
+
:rtype: bool
|
|
892
|
+
"""
|
|
582
893
|
...
|
|
583
894
|
|
|
584
895
|
def get(self):
|
|
585
|
-
"""
|
|
896
|
+
"""Returns the value of the custom property assigned to key or default
|
|
897
|
+
when not found (matches Python's dictionary function of the same name).
|
|
898
|
+
|
|
899
|
+
"""
|
|
586
900
|
...
|
|
587
901
|
|
|
588
902
|
def id_properties_clear(self):
|
|
589
|
-
"""
|
|
903
|
+
"""
|
|
904
|
+
|
|
905
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
906
|
+
"""
|
|
590
907
|
...
|
|
591
908
|
|
|
592
909
|
def id_properties_ensure(self):
|
|
593
|
-
"""
|
|
910
|
+
"""
|
|
911
|
+
|
|
912
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
913
|
+
"""
|
|
594
914
|
...
|
|
595
915
|
|
|
596
916
|
def id_properties_ui(self):
|
|
597
|
-
"""
|
|
917
|
+
"""
|
|
918
|
+
|
|
919
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
920
|
+
"""
|
|
598
921
|
...
|
|
599
922
|
|
|
600
923
|
def is_extended(self):
|
|
601
924
|
""" """
|
|
602
925
|
...
|
|
603
926
|
|
|
604
|
-
def is_property_hidden(self):
|
|
605
|
-
"""
|
|
927
|
+
def is_property_hidden(self) -> bool:
|
|
928
|
+
"""Check if a property is hidden.
|
|
929
|
+
|
|
930
|
+
:return: True when the property is hidden.
|
|
931
|
+
:rtype: bool
|
|
932
|
+
"""
|
|
606
933
|
...
|
|
607
934
|
|
|
608
|
-
def is_property_overridable_library(self):
|
|
609
|
-
"""
|
|
935
|
+
def is_property_overridable_library(self) -> bool:
|
|
936
|
+
"""Check if a property is overridable.
|
|
937
|
+
|
|
938
|
+
:return: True when the property is overridable.
|
|
939
|
+
:rtype: bool
|
|
940
|
+
"""
|
|
610
941
|
...
|
|
611
942
|
|
|
612
|
-
def is_property_readonly(self):
|
|
613
|
-
"""
|
|
943
|
+
def is_property_readonly(self) -> bool:
|
|
944
|
+
"""Check if a property is readonly.
|
|
945
|
+
|
|
946
|
+
:return: True when the property is readonly (not writable).
|
|
947
|
+
:rtype: bool
|
|
948
|
+
"""
|
|
614
949
|
...
|
|
615
950
|
|
|
616
|
-
def is_property_set(self):
|
|
617
|
-
"""
|
|
951
|
+
def is_property_set(self) -> bool:
|
|
952
|
+
"""Check if a property is set, use for testing operator properties.
|
|
953
|
+
|
|
954
|
+
:return: True when the property has been set.
|
|
955
|
+
:rtype: bool
|
|
956
|
+
"""
|
|
618
957
|
...
|
|
619
958
|
|
|
620
959
|
def items(self):
|
|
621
|
-
"""
|
|
960
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
961
|
+
dictionary function of the same name).
|
|
962
|
+
|
|
963
|
+
:return: custom property key, value pairs.
|
|
964
|
+
"""
|
|
622
965
|
...
|
|
623
966
|
|
|
624
|
-
def keyframe_delete(self):
|
|
625
|
-
"""
|
|
967
|
+
def keyframe_delete(self) -> bool:
|
|
968
|
+
"""Remove a keyframe from this properties fcurve.
|
|
969
|
+
|
|
970
|
+
:return: Success of keyframe deletion.
|
|
971
|
+
:rtype: bool
|
|
972
|
+
"""
|
|
626
973
|
...
|
|
627
974
|
|
|
628
|
-
def keyframe_insert(self):
|
|
629
|
-
"""
|
|
975
|
+
def keyframe_insert(self) -> bool:
|
|
976
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
977
|
+
|
|
978
|
+
:return: Success of keyframe insertion.
|
|
979
|
+
:rtype: bool
|
|
980
|
+
"""
|
|
630
981
|
...
|
|
631
982
|
|
|
632
983
|
def keys(self):
|
|
633
|
-
"""
|
|
984
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
985
|
+
dictionary function of the same name).
|
|
986
|
+
|
|
987
|
+
:return: custom property keys.
|
|
988
|
+
"""
|
|
634
989
|
...
|
|
635
990
|
|
|
636
|
-
def path_from_id(self):
|
|
637
|
-
"""
|
|
991
|
+
def path_from_id(self) -> str:
|
|
992
|
+
"""Returns the data path from the ID to this object (string).
|
|
993
|
+
|
|
994
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
995
|
+
to this struct and property (when given).
|
|
996
|
+
:rtype: str
|
|
997
|
+
"""
|
|
638
998
|
...
|
|
639
999
|
|
|
640
1000
|
def path_menu(
|
|
641
1001
|
self,
|
|
642
|
-
searchpaths,
|
|
643
|
-
operator,
|
|
644
|
-
props_default,
|
|
645
|
-
prop_filepath,
|
|
646
|
-
filter_ext,
|
|
647
|
-
filter_path,
|
|
648
|
-
display_name,
|
|
649
|
-
add_operator,
|
|
650
|
-
add_operator_props,
|
|
1002
|
+
searchpaths: list[str],
|
|
1003
|
+
operator: str,
|
|
1004
|
+
props_default: dict = None,
|
|
1005
|
+
prop_filepath: str = "filepath",
|
|
1006
|
+
filter_ext: typing.Callable = None,
|
|
1007
|
+
filter_path=None,
|
|
1008
|
+
display_name: typing.Callable = None,
|
|
1009
|
+
add_operator=None,
|
|
1010
|
+
add_operator_props=None,
|
|
651
1011
|
):
|
|
652
|
-
"""
|
|
1012
|
+
"""Populate a menu from a list of paths.
|
|
653
1013
|
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
1014
|
+
:param searchpaths: Paths to scan.
|
|
1015
|
+
:type searchpaths: list[str]
|
|
1016
|
+
:param operator: The operator id to use with each file.
|
|
1017
|
+
:type operator: str
|
|
1018
|
+
:param props_default: Properties to assign to each operator.
|
|
1019
|
+
:type props_default: dict
|
|
1020
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
1021
|
+
:type prop_filepath: str
|
|
1022
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
1023
|
+
|
|
1024
|
+
Returning false excludes the file from the list.
|
|
1025
|
+
:type filter_ext: typing.Callable
|
|
1026
|
+
:param filter_path:
|
|
1027
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
1028
|
+
:type display_name: typing.Callable
|
|
1029
|
+
:param add_operator:
|
|
1030
|
+
:param add_operator_props:
|
|
663
1031
|
"""
|
|
664
1032
|
...
|
|
665
1033
|
|
|
666
1034
|
def path_resolve(self):
|
|
667
|
-
""" """
|
|
1035
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
668
1036
|
...
|
|
669
1037
|
|
|
670
1038
|
def pop(self):
|
|
671
|
-
"""
|
|
1039
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
1040
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1041
|
+
|
|
1042
|
+
"""
|
|
672
1043
|
...
|
|
673
1044
|
|
|
674
1045
|
def prepend(self, draw_func):
|
|
675
|
-
"""
|
|
1046
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
1047
|
+
the menus draw function
|
|
676
1048
|
|
|
677
|
-
|
|
1049
|
+
:param draw_func:
|
|
678
1050
|
"""
|
|
679
1051
|
...
|
|
680
1052
|
|
|
681
|
-
def property_overridable_library_set(self):
|
|
682
|
-
"""
|
|
1053
|
+
def property_overridable_library_set(self) -> bool:
|
|
1054
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
1055
|
+
|
|
1056
|
+
:return: True when the overridable status of the property was successfully set.
|
|
1057
|
+
:rtype: bool
|
|
1058
|
+
"""
|
|
683
1059
|
...
|
|
684
1060
|
|
|
685
1061
|
def property_unset(self):
|
|
686
|
-
""" """
|
|
1062
|
+
"""Unset a property, will use default value afterward."""
|
|
687
1063
|
...
|
|
688
1064
|
|
|
689
1065
|
def remove(self, draw_func):
|
|
690
|
-
"""
|
|
1066
|
+
"""Remove a draw function that has been added to this menu
|
|
691
1067
|
|
|
692
1068
|
:param draw_func:
|
|
693
1069
|
"""
|
|
694
1070
|
...
|
|
695
1071
|
|
|
696
1072
|
def type_recast(self):
|
|
697
|
-
"""
|
|
1073
|
+
"""Return a new instance, this is needed because types
|
|
1074
|
+
such as textures can be changed at runtime.
|
|
1075
|
+
|
|
1076
|
+
:return: a new instance of this object with the type initialized again.
|
|
1077
|
+
"""
|
|
698
1078
|
...
|
|
699
1079
|
|
|
700
1080
|
def values(self):
|
|
701
|
-
"""
|
|
1081
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
1082
|
+
dictionary function of the same name).
|
|
1083
|
+
|
|
1084
|
+
:return: custom property values.
|
|
1085
|
+
"""
|
|
702
1086
|
...
|
|
703
1087
|
|
|
704
1088
|
class OUTLINER_MT_collection_view_layer(bpy_types.Menu, bpy_types._GenericUI):
|
|
@@ -714,22 +1098,35 @@ class OUTLINER_MT_collection_view_layer(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
714
1098
|
""" """
|
|
715
1099
|
|
|
716
1100
|
def append(self, draw_func):
|
|
717
|
-
"""
|
|
1101
|
+
"""Append a draw function to this menu,
|
|
1102
|
+
takes the same arguments as the menus draw function
|
|
718
1103
|
|
|
719
|
-
|
|
1104
|
+
:param draw_func:
|
|
720
1105
|
"""
|
|
721
1106
|
...
|
|
722
1107
|
|
|
723
|
-
def as_pointer(self):
|
|
724
|
-
"""
|
|
1108
|
+
def as_pointer(self) -> int:
|
|
1109
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
1110
|
+
|
|
1111
|
+
:return: int (memory address).
|
|
1112
|
+
:rtype: int
|
|
1113
|
+
"""
|
|
725
1114
|
...
|
|
726
1115
|
|
|
727
|
-
def bl_rna_get_subclass(self):
|
|
728
|
-
"""
|
|
1116
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
1117
|
+
"""
|
|
1118
|
+
|
|
1119
|
+
:return: The RNA type or default when not found.
|
|
1120
|
+
:rtype: bpy.types.Struct
|
|
1121
|
+
"""
|
|
729
1122
|
...
|
|
730
1123
|
|
|
731
|
-
def bl_rna_get_subclass_py(self):
|
|
732
|
-
"""
|
|
1124
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
1125
|
+
"""
|
|
1126
|
+
|
|
1127
|
+
:return: The class or default when not found.
|
|
1128
|
+
:rtype: typing.Any
|
|
1129
|
+
"""
|
|
733
1130
|
...
|
|
734
1131
|
|
|
735
1132
|
def draw(self, context):
|
|
@@ -748,138 +1145,224 @@ class OUTLINER_MT_collection_view_layer(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
748
1145
|
...
|
|
749
1146
|
|
|
750
1147
|
def draw_preset(self, _context):
|
|
751
|
-
"""
|
|
1148
|
+
"""Define these on the subclass:
|
|
1149
|
+
- preset_operator (string)
|
|
1150
|
+
- preset_subdir (string)Optionally:
|
|
1151
|
+
- preset_add_operator (string)
|
|
1152
|
+
- preset_extensions (set of strings)
|
|
1153
|
+
- preset_operator_defaults (dict of keyword args)
|
|
752
1154
|
|
|
753
|
-
|
|
1155
|
+
:param _context:
|
|
754
1156
|
"""
|
|
755
1157
|
...
|
|
756
1158
|
|
|
757
|
-
def driver_add(self):
|
|
758
|
-
"""
|
|
1159
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
1160
|
+
"""Adds driver(s) to the given property
|
|
1161
|
+
|
|
1162
|
+
:return: The driver(s) added.
|
|
1163
|
+
:rtype: bpy.types.FCurve
|
|
1164
|
+
"""
|
|
759
1165
|
...
|
|
760
1166
|
|
|
761
|
-
def driver_remove(self):
|
|
762
|
-
"""
|
|
1167
|
+
def driver_remove(self) -> bool:
|
|
1168
|
+
"""Remove driver(s) from the given property
|
|
1169
|
+
|
|
1170
|
+
:return: Success of driver removal.
|
|
1171
|
+
:rtype: bool
|
|
1172
|
+
"""
|
|
763
1173
|
...
|
|
764
1174
|
|
|
765
1175
|
def get(self):
|
|
766
|
-
"""
|
|
1176
|
+
"""Returns the value of the custom property assigned to key or default
|
|
1177
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1178
|
+
|
|
1179
|
+
"""
|
|
767
1180
|
...
|
|
768
1181
|
|
|
769
1182
|
def id_properties_clear(self):
|
|
770
|
-
"""
|
|
1183
|
+
"""
|
|
1184
|
+
|
|
1185
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
1186
|
+
"""
|
|
771
1187
|
...
|
|
772
1188
|
|
|
773
1189
|
def id_properties_ensure(self):
|
|
774
|
-
"""
|
|
1190
|
+
"""
|
|
1191
|
+
|
|
1192
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
1193
|
+
"""
|
|
775
1194
|
...
|
|
776
1195
|
|
|
777
1196
|
def id_properties_ui(self):
|
|
778
|
-
"""
|
|
1197
|
+
"""
|
|
1198
|
+
|
|
1199
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
1200
|
+
"""
|
|
779
1201
|
...
|
|
780
1202
|
|
|
781
1203
|
def is_extended(self):
|
|
782
1204
|
""" """
|
|
783
1205
|
...
|
|
784
1206
|
|
|
785
|
-
def is_property_hidden(self):
|
|
786
|
-
"""
|
|
1207
|
+
def is_property_hidden(self) -> bool:
|
|
1208
|
+
"""Check if a property is hidden.
|
|
1209
|
+
|
|
1210
|
+
:return: True when the property is hidden.
|
|
1211
|
+
:rtype: bool
|
|
1212
|
+
"""
|
|
787
1213
|
...
|
|
788
1214
|
|
|
789
|
-
def is_property_overridable_library(self):
|
|
790
|
-
"""
|
|
1215
|
+
def is_property_overridable_library(self) -> bool:
|
|
1216
|
+
"""Check if a property is overridable.
|
|
1217
|
+
|
|
1218
|
+
:return: True when the property is overridable.
|
|
1219
|
+
:rtype: bool
|
|
1220
|
+
"""
|
|
791
1221
|
...
|
|
792
1222
|
|
|
793
|
-
def is_property_readonly(self):
|
|
794
|
-
"""
|
|
1223
|
+
def is_property_readonly(self) -> bool:
|
|
1224
|
+
"""Check if a property is readonly.
|
|
1225
|
+
|
|
1226
|
+
:return: True when the property is readonly (not writable).
|
|
1227
|
+
:rtype: bool
|
|
1228
|
+
"""
|
|
795
1229
|
...
|
|
796
1230
|
|
|
797
|
-
def is_property_set(self):
|
|
798
|
-
"""
|
|
1231
|
+
def is_property_set(self) -> bool:
|
|
1232
|
+
"""Check if a property is set, use for testing operator properties.
|
|
1233
|
+
|
|
1234
|
+
:return: True when the property has been set.
|
|
1235
|
+
:rtype: bool
|
|
1236
|
+
"""
|
|
799
1237
|
...
|
|
800
1238
|
|
|
801
1239
|
def items(self):
|
|
802
|
-
"""
|
|
1240
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
1241
|
+
dictionary function of the same name).
|
|
1242
|
+
|
|
1243
|
+
:return: custom property key, value pairs.
|
|
1244
|
+
"""
|
|
803
1245
|
...
|
|
804
1246
|
|
|
805
|
-
def keyframe_delete(self):
|
|
806
|
-
"""
|
|
1247
|
+
def keyframe_delete(self) -> bool:
|
|
1248
|
+
"""Remove a keyframe from this properties fcurve.
|
|
1249
|
+
|
|
1250
|
+
:return: Success of keyframe deletion.
|
|
1251
|
+
:rtype: bool
|
|
1252
|
+
"""
|
|
807
1253
|
...
|
|
808
1254
|
|
|
809
|
-
def keyframe_insert(self):
|
|
810
|
-
"""
|
|
1255
|
+
def keyframe_insert(self) -> bool:
|
|
1256
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
1257
|
+
|
|
1258
|
+
:return: Success of keyframe insertion.
|
|
1259
|
+
:rtype: bool
|
|
1260
|
+
"""
|
|
811
1261
|
...
|
|
812
1262
|
|
|
813
1263
|
def keys(self):
|
|
814
|
-
"""
|
|
1264
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
1265
|
+
dictionary function of the same name).
|
|
1266
|
+
|
|
1267
|
+
:return: custom property keys.
|
|
1268
|
+
"""
|
|
815
1269
|
...
|
|
816
1270
|
|
|
817
|
-
def path_from_id(self):
|
|
818
|
-
"""
|
|
1271
|
+
def path_from_id(self) -> str:
|
|
1272
|
+
"""Returns the data path from the ID to this object (string).
|
|
1273
|
+
|
|
1274
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
1275
|
+
to this struct and property (when given).
|
|
1276
|
+
:rtype: str
|
|
1277
|
+
"""
|
|
819
1278
|
...
|
|
820
1279
|
|
|
821
1280
|
def path_menu(
|
|
822
1281
|
self,
|
|
823
|
-
searchpaths,
|
|
824
|
-
operator,
|
|
825
|
-
props_default,
|
|
826
|
-
prop_filepath,
|
|
827
|
-
filter_ext,
|
|
828
|
-
filter_path,
|
|
829
|
-
display_name,
|
|
830
|
-
add_operator,
|
|
831
|
-
add_operator_props,
|
|
1282
|
+
searchpaths: list[str],
|
|
1283
|
+
operator: str,
|
|
1284
|
+
props_default: dict = None,
|
|
1285
|
+
prop_filepath: str = "filepath",
|
|
1286
|
+
filter_ext: typing.Callable = None,
|
|
1287
|
+
filter_path=None,
|
|
1288
|
+
display_name: typing.Callable = None,
|
|
1289
|
+
add_operator=None,
|
|
1290
|
+
add_operator_props=None,
|
|
832
1291
|
):
|
|
833
|
-
"""
|
|
1292
|
+
"""Populate a menu from a list of paths.
|
|
834
1293
|
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
1294
|
+
:param searchpaths: Paths to scan.
|
|
1295
|
+
:type searchpaths: list[str]
|
|
1296
|
+
:param operator: The operator id to use with each file.
|
|
1297
|
+
:type operator: str
|
|
1298
|
+
:param props_default: Properties to assign to each operator.
|
|
1299
|
+
:type props_default: dict
|
|
1300
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
1301
|
+
:type prop_filepath: str
|
|
1302
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
1303
|
+
|
|
1304
|
+
Returning false excludes the file from the list.
|
|
1305
|
+
:type filter_ext: typing.Callable
|
|
1306
|
+
:param filter_path:
|
|
1307
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
1308
|
+
:type display_name: typing.Callable
|
|
1309
|
+
:param add_operator:
|
|
1310
|
+
:param add_operator_props:
|
|
844
1311
|
"""
|
|
845
1312
|
...
|
|
846
1313
|
|
|
847
1314
|
def path_resolve(self):
|
|
848
|
-
""" """
|
|
1315
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
849
1316
|
...
|
|
850
1317
|
|
|
851
1318
|
def pop(self):
|
|
852
|
-
"""
|
|
1319
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
1320
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1321
|
+
|
|
1322
|
+
"""
|
|
853
1323
|
...
|
|
854
1324
|
|
|
855
1325
|
def prepend(self, draw_func):
|
|
856
|
-
"""
|
|
1326
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
1327
|
+
the menus draw function
|
|
857
1328
|
|
|
858
|
-
|
|
1329
|
+
:param draw_func:
|
|
859
1330
|
"""
|
|
860
1331
|
...
|
|
861
1332
|
|
|
862
|
-
def property_overridable_library_set(self):
|
|
863
|
-
"""
|
|
1333
|
+
def property_overridable_library_set(self) -> bool:
|
|
1334
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
1335
|
+
|
|
1336
|
+
:return: True when the overridable status of the property was successfully set.
|
|
1337
|
+
:rtype: bool
|
|
1338
|
+
"""
|
|
864
1339
|
...
|
|
865
1340
|
|
|
866
1341
|
def property_unset(self):
|
|
867
|
-
""" """
|
|
1342
|
+
"""Unset a property, will use default value afterward."""
|
|
868
1343
|
...
|
|
869
1344
|
|
|
870
1345
|
def remove(self, draw_func):
|
|
871
|
-
"""
|
|
1346
|
+
"""Remove a draw function that has been added to this menu
|
|
872
1347
|
|
|
873
1348
|
:param draw_func:
|
|
874
1349
|
"""
|
|
875
1350
|
...
|
|
876
1351
|
|
|
877
1352
|
def type_recast(self):
|
|
878
|
-
"""
|
|
1353
|
+
"""Return a new instance, this is needed because types
|
|
1354
|
+
such as textures can be changed at runtime.
|
|
1355
|
+
|
|
1356
|
+
:return: a new instance of this object with the type initialized again.
|
|
1357
|
+
"""
|
|
879
1358
|
...
|
|
880
1359
|
|
|
881
1360
|
def values(self):
|
|
882
|
-
"""
|
|
1361
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
1362
|
+
dictionary function of the same name).
|
|
1363
|
+
|
|
1364
|
+
:return: custom property values.
|
|
1365
|
+
"""
|
|
883
1366
|
...
|
|
884
1367
|
|
|
885
1368
|
class OUTLINER_MT_collection_visibility(bpy_types.Menu, bpy_types._GenericUI):
|
|
@@ -895,22 +1378,35 @@ class OUTLINER_MT_collection_visibility(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
895
1378
|
""" """
|
|
896
1379
|
|
|
897
1380
|
def append(self, draw_func):
|
|
898
|
-
"""
|
|
1381
|
+
"""Append a draw function to this menu,
|
|
1382
|
+
takes the same arguments as the menus draw function
|
|
899
1383
|
|
|
900
|
-
|
|
1384
|
+
:param draw_func:
|
|
901
1385
|
"""
|
|
902
1386
|
...
|
|
903
1387
|
|
|
904
|
-
def as_pointer(self):
|
|
905
|
-
"""
|
|
1388
|
+
def as_pointer(self) -> int:
|
|
1389
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
1390
|
+
|
|
1391
|
+
:return: int (memory address).
|
|
1392
|
+
:rtype: int
|
|
1393
|
+
"""
|
|
906
1394
|
...
|
|
907
1395
|
|
|
908
|
-
def bl_rna_get_subclass(self):
|
|
909
|
-
"""
|
|
1396
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
1397
|
+
"""
|
|
1398
|
+
|
|
1399
|
+
:return: The RNA type or default when not found.
|
|
1400
|
+
:rtype: bpy.types.Struct
|
|
1401
|
+
"""
|
|
910
1402
|
...
|
|
911
1403
|
|
|
912
|
-
def bl_rna_get_subclass_py(self):
|
|
913
|
-
"""
|
|
1404
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
1405
|
+
"""
|
|
1406
|
+
|
|
1407
|
+
:return: The class or default when not found.
|
|
1408
|
+
:rtype: typing.Any
|
|
1409
|
+
"""
|
|
914
1410
|
...
|
|
915
1411
|
|
|
916
1412
|
def draw(self, _context):
|
|
@@ -929,138 +1425,224 @@ class OUTLINER_MT_collection_visibility(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
929
1425
|
...
|
|
930
1426
|
|
|
931
1427
|
def draw_preset(self, _context):
|
|
932
|
-
"""
|
|
1428
|
+
"""Define these on the subclass:
|
|
1429
|
+
- preset_operator (string)
|
|
1430
|
+
- preset_subdir (string)Optionally:
|
|
1431
|
+
- preset_add_operator (string)
|
|
1432
|
+
- preset_extensions (set of strings)
|
|
1433
|
+
- preset_operator_defaults (dict of keyword args)
|
|
933
1434
|
|
|
934
|
-
|
|
1435
|
+
:param _context:
|
|
935
1436
|
"""
|
|
936
1437
|
...
|
|
937
1438
|
|
|
938
|
-
def driver_add(self):
|
|
939
|
-
"""
|
|
1439
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
1440
|
+
"""Adds driver(s) to the given property
|
|
1441
|
+
|
|
1442
|
+
:return: The driver(s) added.
|
|
1443
|
+
:rtype: bpy.types.FCurve
|
|
1444
|
+
"""
|
|
940
1445
|
...
|
|
941
1446
|
|
|
942
|
-
def driver_remove(self):
|
|
943
|
-
"""
|
|
1447
|
+
def driver_remove(self) -> bool:
|
|
1448
|
+
"""Remove driver(s) from the given property
|
|
1449
|
+
|
|
1450
|
+
:return: Success of driver removal.
|
|
1451
|
+
:rtype: bool
|
|
1452
|
+
"""
|
|
944
1453
|
...
|
|
945
1454
|
|
|
946
1455
|
def get(self):
|
|
947
|
-
"""
|
|
1456
|
+
"""Returns the value of the custom property assigned to key or default
|
|
1457
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1458
|
+
|
|
1459
|
+
"""
|
|
948
1460
|
...
|
|
949
1461
|
|
|
950
1462
|
def id_properties_clear(self):
|
|
951
|
-
"""
|
|
1463
|
+
"""
|
|
1464
|
+
|
|
1465
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
1466
|
+
"""
|
|
952
1467
|
...
|
|
953
1468
|
|
|
954
1469
|
def id_properties_ensure(self):
|
|
955
|
-
"""
|
|
1470
|
+
"""
|
|
1471
|
+
|
|
1472
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
1473
|
+
"""
|
|
956
1474
|
...
|
|
957
1475
|
|
|
958
1476
|
def id_properties_ui(self):
|
|
959
|
-
"""
|
|
1477
|
+
"""
|
|
1478
|
+
|
|
1479
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
1480
|
+
"""
|
|
960
1481
|
...
|
|
961
1482
|
|
|
962
1483
|
def is_extended(self):
|
|
963
1484
|
""" """
|
|
964
1485
|
...
|
|
965
1486
|
|
|
966
|
-
def is_property_hidden(self):
|
|
967
|
-
"""
|
|
1487
|
+
def is_property_hidden(self) -> bool:
|
|
1488
|
+
"""Check if a property is hidden.
|
|
1489
|
+
|
|
1490
|
+
:return: True when the property is hidden.
|
|
1491
|
+
:rtype: bool
|
|
1492
|
+
"""
|
|
968
1493
|
...
|
|
969
1494
|
|
|
970
|
-
def is_property_overridable_library(self):
|
|
971
|
-
"""
|
|
1495
|
+
def is_property_overridable_library(self) -> bool:
|
|
1496
|
+
"""Check if a property is overridable.
|
|
1497
|
+
|
|
1498
|
+
:return: True when the property is overridable.
|
|
1499
|
+
:rtype: bool
|
|
1500
|
+
"""
|
|
972
1501
|
...
|
|
973
1502
|
|
|
974
|
-
def is_property_readonly(self):
|
|
975
|
-
"""
|
|
1503
|
+
def is_property_readonly(self) -> bool:
|
|
1504
|
+
"""Check if a property is readonly.
|
|
1505
|
+
|
|
1506
|
+
:return: True when the property is readonly (not writable).
|
|
1507
|
+
:rtype: bool
|
|
1508
|
+
"""
|
|
976
1509
|
...
|
|
977
1510
|
|
|
978
|
-
def is_property_set(self):
|
|
979
|
-
"""
|
|
1511
|
+
def is_property_set(self) -> bool:
|
|
1512
|
+
"""Check if a property is set, use for testing operator properties.
|
|
1513
|
+
|
|
1514
|
+
:return: True when the property has been set.
|
|
1515
|
+
:rtype: bool
|
|
1516
|
+
"""
|
|
980
1517
|
...
|
|
981
1518
|
|
|
982
1519
|
def items(self):
|
|
983
|
-
"""
|
|
1520
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
1521
|
+
dictionary function of the same name).
|
|
1522
|
+
|
|
1523
|
+
:return: custom property key, value pairs.
|
|
1524
|
+
"""
|
|
984
1525
|
...
|
|
985
1526
|
|
|
986
|
-
def keyframe_delete(self):
|
|
987
|
-
"""
|
|
1527
|
+
def keyframe_delete(self) -> bool:
|
|
1528
|
+
"""Remove a keyframe from this properties fcurve.
|
|
1529
|
+
|
|
1530
|
+
:return: Success of keyframe deletion.
|
|
1531
|
+
:rtype: bool
|
|
1532
|
+
"""
|
|
988
1533
|
...
|
|
989
1534
|
|
|
990
|
-
def keyframe_insert(self):
|
|
991
|
-
"""
|
|
1535
|
+
def keyframe_insert(self) -> bool:
|
|
1536
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
1537
|
+
|
|
1538
|
+
:return: Success of keyframe insertion.
|
|
1539
|
+
:rtype: bool
|
|
1540
|
+
"""
|
|
992
1541
|
...
|
|
993
1542
|
|
|
994
1543
|
def keys(self):
|
|
995
|
-
"""
|
|
1544
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
1545
|
+
dictionary function of the same name).
|
|
1546
|
+
|
|
1547
|
+
:return: custom property keys.
|
|
1548
|
+
"""
|
|
996
1549
|
...
|
|
997
1550
|
|
|
998
|
-
def path_from_id(self):
|
|
999
|
-
"""
|
|
1551
|
+
def path_from_id(self) -> str:
|
|
1552
|
+
"""Returns the data path from the ID to this object (string).
|
|
1553
|
+
|
|
1554
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
1555
|
+
to this struct and property (when given).
|
|
1556
|
+
:rtype: str
|
|
1557
|
+
"""
|
|
1000
1558
|
...
|
|
1001
1559
|
|
|
1002
1560
|
def path_menu(
|
|
1003
1561
|
self,
|
|
1004
|
-
searchpaths,
|
|
1005
|
-
operator,
|
|
1006
|
-
props_default,
|
|
1007
|
-
prop_filepath,
|
|
1008
|
-
filter_ext,
|
|
1009
|
-
filter_path,
|
|
1010
|
-
display_name,
|
|
1011
|
-
add_operator,
|
|
1012
|
-
add_operator_props,
|
|
1562
|
+
searchpaths: list[str],
|
|
1563
|
+
operator: str,
|
|
1564
|
+
props_default: dict = None,
|
|
1565
|
+
prop_filepath: str = "filepath",
|
|
1566
|
+
filter_ext: typing.Callable = None,
|
|
1567
|
+
filter_path=None,
|
|
1568
|
+
display_name: typing.Callable = None,
|
|
1569
|
+
add_operator=None,
|
|
1570
|
+
add_operator_props=None,
|
|
1013
1571
|
):
|
|
1014
|
-
"""
|
|
1572
|
+
"""Populate a menu from a list of paths.
|
|
1015
1573
|
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1574
|
+
:param searchpaths: Paths to scan.
|
|
1575
|
+
:type searchpaths: list[str]
|
|
1576
|
+
:param operator: The operator id to use with each file.
|
|
1577
|
+
:type operator: str
|
|
1578
|
+
:param props_default: Properties to assign to each operator.
|
|
1579
|
+
:type props_default: dict
|
|
1580
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
1581
|
+
:type prop_filepath: str
|
|
1582
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
1583
|
+
|
|
1584
|
+
Returning false excludes the file from the list.
|
|
1585
|
+
:type filter_ext: typing.Callable
|
|
1586
|
+
:param filter_path:
|
|
1587
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
1588
|
+
:type display_name: typing.Callable
|
|
1589
|
+
:param add_operator:
|
|
1590
|
+
:param add_operator_props:
|
|
1025
1591
|
"""
|
|
1026
1592
|
...
|
|
1027
1593
|
|
|
1028
1594
|
def path_resolve(self):
|
|
1029
|
-
""" """
|
|
1595
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
1030
1596
|
...
|
|
1031
1597
|
|
|
1032
1598
|
def pop(self):
|
|
1033
|
-
"""
|
|
1599
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
1600
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1601
|
+
|
|
1602
|
+
"""
|
|
1034
1603
|
...
|
|
1035
1604
|
|
|
1036
1605
|
def prepend(self, draw_func):
|
|
1037
|
-
"""
|
|
1606
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
1607
|
+
the menus draw function
|
|
1038
1608
|
|
|
1039
|
-
|
|
1609
|
+
:param draw_func:
|
|
1040
1610
|
"""
|
|
1041
1611
|
...
|
|
1042
1612
|
|
|
1043
|
-
def property_overridable_library_set(self):
|
|
1044
|
-
"""
|
|
1613
|
+
def property_overridable_library_set(self) -> bool:
|
|
1614
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
1615
|
+
|
|
1616
|
+
:return: True when the overridable status of the property was successfully set.
|
|
1617
|
+
:rtype: bool
|
|
1618
|
+
"""
|
|
1045
1619
|
...
|
|
1046
1620
|
|
|
1047
1621
|
def property_unset(self):
|
|
1048
|
-
""" """
|
|
1622
|
+
"""Unset a property, will use default value afterward."""
|
|
1049
1623
|
...
|
|
1050
1624
|
|
|
1051
1625
|
def remove(self, draw_func):
|
|
1052
|
-
"""
|
|
1626
|
+
"""Remove a draw function that has been added to this menu
|
|
1053
1627
|
|
|
1054
1628
|
:param draw_func:
|
|
1055
1629
|
"""
|
|
1056
1630
|
...
|
|
1057
1631
|
|
|
1058
1632
|
def type_recast(self):
|
|
1059
|
-
"""
|
|
1633
|
+
"""Return a new instance, this is needed because types
|
|
1634
|
+
such as textures can be changed at runtime.
|
|
1635
|
+
|
|
1636
|
+
:return: a new instance of this object with the type initialized again.
|
|
1637
|
+
"""
|
|
1060
1638
|
...
|
|
1061
1639
|
|
|
1062
1640
|
def values(self):
|
|
1063
|
-
"""
|
|
1641
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
1642
|
+
dictionary function of the same name).
|
|
1643
|
+
|
|
1644
|
+
:return: custom property values.
|
|
1645
|
+
"""
|
|
1064
1646
|
...
|
|
1065
1647
|
|
|
1066
1648
|
class OUTLINER_MT_context_menu(bpy_types.Menu, bpy_types._GenericUI):
|
|
@@ -1076,22 +1658,35 @@ class OUTLINER_MT_context_menu(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
1076
1658
|
""" """
|
|
1077
1659
|
|
|
1078
1660
|
def append(self, draw_func):
|
|
1079
|
-
"""
|
|
1661
|
+
"""Append a draw function to this menu,
|
|
1662
|
+
takes the same arguments as the menus draw function
|
|
1080
1663
|
|
|
1081
|
-
|
|
1664
|
+
:param draw_func:
|
|
1082
1665
|
"""
|
|
1083
1666
|
...
|
|
1084
1667
|
|
|
1085
|
-
def as_pointer(self):
|
|
1086
|
-
"""
|
|
1668
|
+
def as_pointer(self) -> int:
|
|
1669
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
1670
|
+
|
|
1671
|
+
:return: int (memory address).
|
|
1672
|
+
:rtype: int
|
|
1673
|
+
"""
|
|
1087
1674
|
...
|
|
1088
1675
|
|
|
1089
|
-
def bl_rna_get_subclass(self):
|
|
1090
|
-
"""
|
|
1676
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
1677
|
+
"""
|
|
1678
|
+
|
|
1679
|
+
:return: The RNA type or default when not found.
|
|
1680
|
+
:rtype: bpy.types.Struct
|
|
1681
|
+
"""
|
|
1091
1682
|
...
|
|
1092
1683
|
|
|
1093
|
-
def bl_rna_get_subclass_py(self):
|
|
1094
|
-
"""
|
|
1684
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
1685
|
+
"""
|
|
1686
|
+
|
|
1687
|
+
:return: The class or default when not found.
|
|
1688
|
+
:rtype: typing.Any
|
|
1689
|
+
"""
|
|
1095
1690
|
...
|
|
1096
1691
|
|
|
1097
1692
|
def draw(self, context):
|
|
@@ -1117,138 +1712,224 @@ class OUTLINER_MT_context_menu(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
1117
1712
|
...
|
|
1118
1713
|
|
|
1119
1714
|
def draw_preset(self, _context):
|
|
1120
|
-
"""
|
|
1715
|
+
"""Define these on the subclass:
|
|
1716
|
+
- preset_operator (string)
|
|
1717
|
+
- preset_subdir (string)Optionally:
|
|
1718
|
+
- preset_add_operator (string)
|
|
1719
|
+
- preset_extensions (set of strings)
|
|
1720
|
+
- preset_operator_defaults (dict of keyword args)
|
|
1121
1721
|
|
|
1122
|
-
|
|
1722
|
+
:param _context:
|
|
1123
1723
|
"""
|
|
1124
1724
|
...
|
|
1125
1725
|
|
|
1126
|
-
def driver_add(self):
|
|
1127
|
-
"""
|
|
1726
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
1727
|
+
"""Adds driver(s) to the given property
|
|
1728
|
+
|
|
1729
|
+
:return: The driver(s) added.
|
|
1730
|
+
:rtype: bpy.types.FCurve
|
|
1731
|
+
"""
|
|
1128
1732
|
...
|
|
1129
1733
|
|
|
1130
|
-
def driver_remove(self):
|
|
1131
|
-
"""
|
|
1734
|
+
def driver_remove(self) -> bool:
|
|
1735
|
+
"""Remove driver(s) from the given property
|
|
1736
|
+
|
|
1737
|
+
:return: Success of driver removal.
|
|
1738
|
+
:rtype: bool
|
|
1739
|
+
"""
|
|
1132
1740
|
...
|
|
1133
1741
|
|
|
1134
1742
|
def get(self):
|
|
1135
|
-
"""
|
|
1743
|
+
"""Returns the value of the custom property assigned to key or default
|
|
1744
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1745
|
+
|
|
1746
|
+
"""
|
|
1136
1747
|
...
|
|
1137
1748
|
|
|
1138
1749
|
def id_properties_clear(self):
|
|
1139
|
-
"""
|
|
1750
|
+
"""
|
|
1751
|
+
|
|
1752
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
1753
|
+
"""
|
|
1140
1754
|
...
|
|
1141
1755
|
|
|
1142
1756
|
def id_properties_ensure(self):
|
|
1143
|
-
"""
|
|
1757
|
+
"""
|
|
1758
|
+
|
|
1759
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
1760
|
+
"""
|
|
1144
1761
|
...
|
|
1145
1762
|
|
|
1146
1763
|
def id_properties_ui(self):
|
|
1147
|
-
"""
|
|
1764
|
+
"""
|
|
1765
|
+
|
|
1766
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
1767
|
+
"""
|
|
1148
1768
|
...
|
|
1149
1769
|
|
|
1150
1770
|
def is_extended(self):
|
|
1151
1771
|
""" """
|
|
1152
1772
|
...
|
|
1153
1773
|
|
|
1154
|
-
def is_property_hidden(self):
|
|
1155
|
-
"""
|
|
1774
|
+
def is_property_hidden(self) -> bool:
|
|
1775
|
+
"""Check if a property is hidden.
|
|
1776
|
+
|
|
1777
|
+
:return: True when the property is hidden.
|
|
1778
|
+
:rtype: bool
|
|
1779
|
+
"""
|
|
1156
1780
|
...
|
|
1157
1781
|
|
|
1158
|
-
def is_property_overridable_library(self):
|
|
1159
|
-
"""
|
|
1782
|
+
def is_property_overridable_library(self) -> bool:
|
|
1783
|
+
"""Check if a property is overridable.
|
|
1784
|
+
|
|
1785
|
+
:return: True when the property is overridable.
|
|
1786
|
+
:rtype: bool
|
|
1787
|
+
"""
|
|
1160
1788
|
...
|
|
1161
1789
|
|
|
1162
|
-
def is_property_readonly(self):
|
|
1163
|
-
"""
|
|
1790
|
+
def is_property_readonly(self) -> bool:
|
|
1791
|
+
"""Check if a property is readonly.
|
|
1792
|
+
|
|
1793
|
+
:return: True when the property is readonly (not writable).
|
|
1794
|
+
:rtype: bool
|
|
1795
|
+
"""
|
|
1164
1796
|
...
|
|
1165
1797
|
|
|
1166
|
-
def is_property_set(self):
|
|
1167
|
-
"""
|
|
1798
|
+
def is_property_set(self) -> bool:
|
|
1799
|
+
"""Check if a property is set, use for testing operator properties.
|
|
1800
|
+
|
|
1801
|
+
:return: True when the property has been set.
|
|
1802
|
+
:rtype: bool
|
|
1803
|
+
"""
|
|
1168
1804
|
...
|
|
1169
1805
|
|
|
1170
1806
|
def items(self):
|
|
1171
|
-
"""
|
|
1807
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
1808
|
+
dictionary function of the same name).
|
|
1809
|
+
|
|
1810
|
+
:return: custom property key, value pairs.
|
|
1811
|
+
"""
|
|
1172
1812
|
...
|
|
1173
1813
|
|
|
1174
|
-
def keyframe_delete(self):
|
|
1175
|
-
"""
|
|
1814
|
+
def keyframe_delete(self) -> bool:
|
|
1815
|
+
"""Remove a keyframe from this properties fcurve.
|
|
1816
|
+
|
|
1817
|
+
:return: Success of keyframe deletion.
|
|
1818
|
+
:rtype: bool
|
|
1819
|
+
"""
|
|
1176
1820
|
...
|
|
1177
1821
|
|
|
1178
|
-
def keyframe_insert(self):
|
|
1179
|
-
"""
|
|
1822
|
+
def keyframe_insert(self) -> bool:
|
|
1823
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
1824
|
+
|
|
1825
|
+
:return: Success of keyframe insertion.
|
|
1826
|
+
:rtype: bool
|
|
1827
|
+
"""
|
|
1180
1828
|
...
|
|
1181
1829
|
|
|
1182
1830
|
def keys(self):
|
|
1183
|
-
"""
|
|
1831
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
1832
|
+
dictionary function of the same name).
|
|
1833
|
+
|
|
1834
|
+
:return: custom property keys.
|
|
1835
|
+
"""
|
|
1184
1836
|
...
|
|
1185
1837
|
|
|
1186
|
-
def path_from_id(self):
|
|
1187
|
-
"""
|
|
1838
|
+
def path_from_id(self) -> str:
|
|
1839
|
+
"""Returns the data path from the ID to this object (string).
|
|
1840
|
+
|
|
1841
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
1842
|
+
to this struct and property (when given).
|
|
1843
|
+
:rtype: str
|
|
1844
|
+
"""
|
|
1188
1845
|
...
|
|
1189
1846
|
|
|
1190
1847
|
def path_menu(
|
|
1191
1848
|
self,
|
|
1192
|
-
searchpaths,
|
|
1193
|
-
operator,
|
|
1194
|
-
props_default,
|
|
1195
|
-
prop_filepath,
|
|
1196
|
-
filter_ext,
|
|
1197
|
-
filter_path,
|
|
1198
|
-
display_name,
|
|
1199
|
-
add_operator,
|
|
1200
|
-
add_operator_props,
|
|
1849
|
+
searchpaths: list[str],
|
|
1850
|
+
operator: str,
|
|
1851
|
+
props_default: dict = None,
|
|
1852
|
+
prop_filepath: str = "filepath",
|
|
1853
|
+
filter_ext: typing.Callable = None,
|
|
1854
|
+
filter_path=None,
|
|
1855
|
+
display_name: typing.Callable = None,
|
|
1856
|
+
add_operator=None,
|
|
1857
|
+
add_operator_props=None,
|
|
1201
1858
|
):
|
|
1202
|
-
"""
|
|
1859
|
+
"""Populate a menu from a list of paths.
|
|
1203
1860
|
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1861
|
+
:param searchpaths: Paths to scan.
|
|
1862
|
+
:type searchpaths: list[str]
|
|
1863
|
+
:param operator: The operator id to use with each file.
|
|
1864
|
+
:type operator: str
|
|
1865
|
+
:param props_default: Properties to assign to each operator.
|
|
1866
|
+
:type props_default: dict
|
|
1867
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
1868
|
+
:type prop_filepath: str
|
|
1869
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
1870
|
+
|
|
1871
|
+
Returning false excludes the file from the list.
|
|
1872
|
+
:type filter_ext: typing.Callable
|
|
1873
|
+
:param filter_path:
|
|
1874
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
1875
|
+
:type display_name: typing.Callable
|
|
1876
|
+
:param add_operator:
|
|
1877
|
+
:param add_operator_props:
|
|
1213
1878
|
"""
|
|
1214
1879
|
...
|
|
1215
1880
|
|
|
1216
1881
|
def path_resolve(self):
|
|
1217
|
-
""" """
|
|
1882
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
1218
1883
|
...
|
|
1219
1884
|
|
|
1220
1885
|
def pop(self):
|
|
1221
|
-
"""
|
|
1886
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
1887
|
+
when not found (matches Python's dictionary function of the same name).
|
|
1888
|
+
|
|
1889
|
+
"""
|
|
1222
1890
|
...
|
|
1223
1891
|
|
|
1224
1892
|
def prepend(self, draw_func):
|
|
1225
|
-
"""
|
|
1893
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
1894
|
+
the menus draw function
|
|
1226
1895
|
|
|
1227
|
-
|
|
1896
|
+
:param draw_func:
|
|
1228
1897
|
"""
|
|
1229
1898
|
...
|
|
1230
1899
|
|
|
1231
|
-
def property_overridable_library_set(self):
|
|
1232
|
-
"""
|
|
1900
|
+
def property_overridable_library_set(self) -> bool:
|
|
1901
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
1902
|
+
|
|
1903
|
+
:return: True when the overridable status of the property was successfully set.
|
|
1904
|
+
:rtype: bool
|
|
1905
|
+
"""
|
|
1233
1906
|
...
|
|
1234
1907
|
|
|
1235
1908
|
def property_unset(self):
|
|
1236
|
-
""" """
|
|
1909
|
+
"""Unset a property, will use default value afterward."""
|
|
1237
1910
|
...
|
|
1238
1911
|
|
|
1239
1912
|
def remove(self, draw_func):
|
|
1240
|
-
"""
|
|
1913
|
+
"""Remove a draw function that has been added to this menu
|
|
1241
1914
|
|
|
1242
1915
|
:param draw_func:
|
|
1243
1916
|
"""
|
|
1244
1917
|
...
|
|
1245
1918
|
|
|
1246
1919
|
def type_recast(self):
|
|
1247
|
-
"""
|
|
1920
|
+
"""Return a new instance, this is needed because types
|
|
1921
|
+
such as textures can be changed at runtime.
|
|
1922
|
+
|
|
1923
|
+
:return: a new instance of this object with the type initialized again.
|
|
1924
|
+
"""
|
|
1248
1925
|
...
|
|
1249
1926
|
|
|
1250
1927
|
def values(self):
|
|
1251
|
-
"""
|
|
1928
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
1929
|
+
dictionary function of the same name).
|
|
1930
|
+
|
|
1931
|
+
:return: custom property values.
|
|
1932
|
+
"""
|
|
1252
1933
|
...
|
|
1253
1934
|
|
|
1254
1935
|
class OUTLINER_MT_context_menu_view(bpy_types.Menu, bpy_types._GenericUI):
|
|
@@ -1264,22 +1945,35 @@ class OUTLINER_MT_context_menu_view(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
1264
1945
|
""" """
|
|
1265
1946
|
|
|
1266
1947
|
def append(self, draw_func):
|
|
1267
|
-
"""
|
|
1948
|
+
"""Append a draw function to this menu,
|
|
1949
|
+
takes the same arguments as the menus draw function
|
|
1268
1950
|
|
|
1269
|
-
|
|
1951
|
+
:param draw_func:
|
|
1270
1952
|
"""
|
|
1271
1953
|
...
|
|
1272
1954
|
|
|
1273
|
-
def as_pointer(self):
|
|
1274
|
-
"""
|
|
1955
|
+
def as_pointer(self) -> int:
|
|
1956
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
1957
|
+
|
|
1958
|
+
:return: int (memory address).
|
|
1959
|
+
:rtype: int
|
|
1960
|
+
"""
|
|
1275
1961
|
...
|
|
1276
1962
|
|
|
1277
|
-
def bl_rna_get_subclass(self):
|
|
1278
|
-
"""
|
|
1963
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
1964
|
+
"""
|
|
1965
|
+
|
|
1966
|
+
:return: The RNA type or default when not found.
|
|
1967
|
+
:rtype: bpy.types.Struct
|
|
1968
|
+
"""
|
|
1279
1969
|
...
|
|
1280
1970
|
|
|
1281
|
-
def bl_rna_get_subclass_py(self):
|
|
1282
|
-
"""
|
|
1971
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
1972
|
+
"""
|
|
1973
|
+
|
|
1974
|
+
:return: The class or default when not found.
|
|
1975
|
+
:rtype: typing.Any
|
|
1976
|
+
"""
|
|
1283
1977
|
...
|
|
1284
1978
|
|
|
1285
1979
|
def draw(self, _context):
|
|
@@ -1298,138 +1992,224 @@ class OUTLINER_MT_context_menu_view(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
1298
1992
|
...
|
|
1299
1993
|
|
|
1300
1994
|
def draw_preset(self, _context):
|
|
1301
|
-
"""
|
|
1995
|
+
"""Define these on the subclass:
|
|
1996
|
+
- preset_operator (string)
|
|
1997
|
+
- preset_subdir (string)Optionally:
|
|
1998
|
+
- preset_add_operator (string)
|
|
1999
|
+
- preset_extensions (set of strings)
|
|
2000
|
+
- preset_operator_defaults (dict of keyword args)
|
|
1302
2001
|
|
|
1303
|
-
|
|
2002
|
+
:param _context:
|
|
1304
2003
|
"""
|
|
1305
2004
|
...
|
|
1306
2005
|
|
|
1307
|
-
def driver_add(self):
|
|
1308
|
-
"""
|
|
2006
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
2007
|
+
"""Adds driver(s) to the given property
|
|
2008
|
+
|
|
2009
|
+
:return: The driver(s) added.
|
|
2010
|
+
:rtype: bpy.types.FCurve
|
|
2011
|
+
"""
|
|
1309
2012
|
...
|
|
1310
2013
|
|
|
1311
|
-
def driver_remove(self):
|
|
1312
|
-
"""
|
|
2014
|
+
def driver_remove(self) -> bool:
|
|
2015
|
+
"""Remove driver(s) from the given property
|
|
2016
|
+
|
|
2017
|
+
:return: Success of driver removal.
|
|
2018
|
+
:rtype: bool
|
|
2019
|
+
"""
|
|
1313
2020
|
...
|
|
1314
2021
|
|
|
1315
2022
|
def get(self):
|
|
1316
|
-
"""
|
|
2023
|
+
"""Returns the value of the custom property assigned to key or default
|
|
2024
|
+
when not found (matches Python's dictionary function of the same name).
|
|
2025
|
+
|
|
2026
|
+
"""
|
|
1317
2027
|
...
|
|
1318
2028
|
|
|
1319
2029
|
def id_properties_clear(self):
|
|
1320
|
-
"""
|
|
2030
|
+
"""
|
|
2031
|
+
|
|
2032
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
2033
|
+
"""
|
|
1321
2034
|
...
|
|
1322
2035
|
|
|
1323
2036
|
def id_properties_ensure(self):
|
|
1324
|
-
"""
|
|
2037
|
+
"""
|
|
2038
|
+
|
|
2039
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
2040
|
+
"""
|
|
1325
2041
|
...
|
|
1326
2042
|
|
|
1327
2043
|
def id_properties_ui(self):
|
|
1328
|
-
"""
|
|
2044
|
+
"""
|
|
2045
|
+
|
|
2046
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
2047
|
+
"""
|
|
1329
2048
|
...
|
|
1330
2049
|
|
|
1331
2050
|
def is_extended(self):
|
|
1332
2051
|
""" """
|
|
1333
2052
|
...
|
|
1334
2053
|
|
|
1335
|
-
def is_property_hidden(self):
|
|
1336
|
-
"""
|
|
2054
|
+
def is_property_hidden(self) -> bool:
|
|
2055
|
+
"""Check if a property is hidden.
|
|
2056
|
+
|
|
2057
|
+
:return: True when the property is hidden.
|
|
2058
|
+
:rtype: bool
|
|
2059
|
+
"""
|
|
1337
2060
|
...
|
|
1338
2061
|
|
|
1339
|
-
def is_property_overridable_library(self):
|
|
1340
|
-
"""
|
|
2062
|
+
def is_property_overridable_library(self) -> bool:
|
|
2063
|
+
"""Check if a property is overridable.
|
|
2064
|
+
|
|
2065
|
+
:return: True when the property is overridable.
|
|
2066
|
+
:rtype: bool
|
|
2067
|
+
"""
|
|
1341
2068
|
...
|
|
1342
2069
|
|
|
1343
|
-
def is_property_readonly(self):
|
|
1344
|
-
"""
|
|
2070
|
+
def is_property_readonly(self) -> bool:
|
|
2071
|
+
"""Check if a property is readonly.
|
|
2072
|
+
|
|
2073
|
+
:return: True when the property is readonly (not writable).
|
|
2074
|
+
:rtype: bool
|
|
2075
|
+
"""
|
|
1345
2076
|
...
|
|
1346
2077
|
|
|
1347
|
-
def is_property_set(self):
|
|
1348
|
-
"""
|
|
2078
|
+
def is_property_set(self) -> bool:
|
|
2079
|
+
"""Check if a property is set, use for testing operator properties.
|
|
2080
|
+
|
|
2081
|
+
:return: True when the property has been set.
|
|
2082
|
+
:rtype: bool
|
|
2083
|
+
"""
|
|
1349
2084
|
...
|
|
1350
2085
|
|
|
1351
2086
|
def items(self):
|
|
1352
|
-
"""
|
|
2087
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
2088
|
+
dictionary function of the same name).
|
|
2089
|
+
|
|
2090
|
+
:return: custom property key, value pairs.
|
|
2091
|
+
"""
|
|
1353
2092
|
...
|
|
1354
2093
|
|
|
1355
|
-
def keyframe_delete(self):
|
|
1356
|
-
"""
|
|
2094
|
+
def keyframe_delete(self) -> bool:
|
|
2095
|
+
"""Remove a keyframe from this properties fcurve.
|
|
2096
|
+
|
|
2097
|
+
:return: Success of keyframe deletion.
|
|
2098
|
+
:rtype: bool
|
|
2099
|
+
"""
|
|
1357
2100
|
...
|
|
1358
2101
|
|
|
1359
|
-
def keyframe_insert(self):
|
|
1360
|
-
"""
|
|
2102
|
+
def keyframe_insert(self) -> bool:
|
|
2103
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
2104
|
+
|
|
2105
|
+
:return: Success of keyframe insertion.
|
|
2106
|
+
:rtype: bool
|
|
2107
|
+
"""
|
|
1361
2108
|
...
|
|
1362
2109
|
|
|
1363
2110
|
def keys(self):
|
|
1364
|
-
"""
|
|
2111
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
2112
|
+
dictionary function of the same name).
|
|
2113
|
+
|
|
2114
|
+
:return: custom property keys.
|
|
2115
|
+
"""
|
|
1365
2116
|
...
|
|
1366
2117
|
|
|
1367
|
-
def path_from_id(self):
|
|
1368
|
-
"""
|
|
2118
|
+
def path_from_id(self) -> str:
|
|
2119
|
+
"""Returns the data path from the ID to this object (string).
|
|
2120
|
+
|
|
2121
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
2122
|
+
to this struct and property (when given).
|
|
2123
|
+
:rtype: str
|
|
2124
|
+
"""
|
|
1369
2125
|
...
|
|
1370
2126
|
|
|
1371
2127
|
def path_menu(
|
|
1372
2128
|
self,
|
|
1373
|
-
searchpaths,
|
|
1374
|
-
operator,
|
|
1375
|
-
props_default,
|
|
1376
|
-
prop_filepath,
|
|
1377
|
-
filter_ext,
|
|
1378
|
-
filter_path,
|
|
1379
|
-
display_name,
|
|
1380
|
-
add_operator,
|
|
1381
|
-
add_operator_props,
|
|
2129
|
+
searchpaths: list[str],
|
|
2130
|
+
operator: str,
|
|
2131
|
+
props_default: dict = None,
|
|
2132
|
+
prop_filepath: str = "filepath",
|
|
2133
|
+
filter_ext: typing.Callable = None,
|
|
2134
|
+
filter_path=None,
|
|
2135
|
+
display_name: typing.Callable = None,
|
|
2136
|
+
add_operator=None,
|
|
2137
|
+
add_operator_props=None,
|
|
1382
2138
|
):
|
|
1383
|
-
"""
|
|
2139
|
+
"""Populate a menu from a list of paths.
|
|
1384
2140
|
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
2141
|
+
:param searchpaths: Paths to scan.
|
|
2142
|
+
:type searchpaths: list[str]
|
|
2143
|
+
:param operator: The operator id to use with each file.
|
|
2144
|
+
:type operator: str
|
|
2145
|
+
:param props_default: Properties to assign to each operator.
|
|
2146
|
+
:type props_default: dict
|
|
2147
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
2148
|
+
:type prop_filepath: str
|
|
2149
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
2150
|
+
|
|
2151
|
+
Returning false excludes the file from the list.
|
|
2152
|
+
:type filter_ext: typing.Callable
|
|
2153
|
+
:param filter_path:
|
|
2154
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
2155
|
+
:type display_name: typing.Callable
|
|
2156
|
+
:param add_operator:
|
|
2157
|
+
:param add_operator_props:
|
|
1394
2158
|
"""
|
|
1395
2159
|
...
|
|
1396
2160
|
|
|
1397
2161
|
def path_resolve(self):
|
|
1398
|
-
""" """
|
|
2162
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
1399
2163
|
...
|
|
1400
2164
|
|
|
1401
2165
|
def pop(self):
|
|
1402
|
-
"""
|
|
2166
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
2167
|
+
when not found (matches Python's dictionary function of the same name).
|
|
2168
|
+
|
|
2169
|
+
"""
|
|
1403
2170
|
...
|
|
1404
2171
|
|
|
1405
2172
|
def prepend(self, draw_func):
|
|
1406
|
-
"""
|
|
2173
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
2174
|
+
the menus draw function
|
|
1407
2175
|
|
|
1408
|
-
|
|
2176
|
+
:param draw_func:
|
|
1409
2177
|
"""
|
|
1410
2178
|
...
|
|
1411
2179
|
|
|
1412
|
-
def property_overridable_library_set(self):
|
|
1413
|
-
"""
|
|
2180
|
+
def property_overridable_library_set(self) -> bool:
|
|
2181
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
2182
|
+
|
|
2183
|
+
:return: True when the overridable status of the property was successfully set.
|
|
2184
|
+
:rtype: bool
|
|
2185
|
+
"""
|
|
1414
2186
|
...
|
|
1415
2187
|
|
|
1416
2188
|
def property_unset(self):
|
|
1417
|
-
""" """
|
|
2189
|
+
"""Unset a property, will use default value afterward."""
|
|
1418
2190
|
...
|
|
1419
2191
|
|
|
1420
2192
|
def remove(self, draw_func):
|
|
1421
|
-
"""
|
|
2193
|
+
"""Remove a draw function that has been added to this menu
|
|
1422
2194
|
|
|
1423
2195
|
:param draw_func:
|
|
1424
2196
|
"""
|
|
1425
2197
|
...
|
|
1426
2198
|
|
|
1427
2199
|
def type_recast(self):
|
|
1428
|
-
"""
|
|
2200
|
+
"""Return a new instance, this is needed because types
|
|
2201
|
+
such as textures can be changed at runtime.
|
|
2202
|
+
|
|
2203
|
+
:return: a new instance of this object with the type initialized again.
|
|
2204
|
+
"""
|
|
1429
2205
|
...
|
|
1430
2206
|
|
|
1431
2207
|
def values(self):
|
|
1432
|
-
"""
|
|
2208
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
2209
|
+
dictionary function of the same name).
|
|
2210
|
+
|
|
2211
|
+
:return: custom property values.
|
|
2212
|
+
"""
|
|
1433
2213
|
...
|
|
1434
2214
|
|
|
1435
2215
|
class OUTLINER_MT_edit_datablocks(bpy_types.Menu, bpy_types._GenericUI):
|
|
@@ -1445,22 +2225,35 @@ class OUTLINER_MT_edit_datablocks(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
1445
2225
|
""" """
|
|
1446
2226
|
|
|
1447
2227
|
def append(self, draw_func):
|
|
1448
|
-
"""
|
|
2228
|
+
"""Append a draw function to this menu,
|
|
2229
|
+
takes the same arguments as the menus draw function
|
|
1449
2230
|
|
|
1450
|
-
|
|
2231
|
+
:param draw_func:
|
|
1451
2232
|
"""
|
|
1452
2233
|
...
|
|
1453
2234
|
|
|
1454
|
-
def as_pointer(self):
|
|
1455
|
-
"""
|
|
2235
|
+
def as_pointer(self) -> int:
|
|
2236
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
2237
|
+
|
|
2238
|
+
:return: int (memory address).
|
|
2239
|
+
:rtype: int
|
|
2240
|
+
"""
|
|
1456
2241
|
...
|
|
1457
2242
|
|
|
1458
|
-
def bl_rna_get_subclass(self):
|
|
1459
|
-
"""
|
|
2243
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
2244
|
+
"""
|
|
2245
|
+
|
|
2246
|
+
:return: The RNA type or default when not found.
|
|
2247
|
+
:rtype: bpy.types.Struct
|
|
2248
|
+
"""
|
|
1460
2249
|
...
|
|
1461
2250
|
|
|
1462
|
-
def bl_rna_get_subclass_py(self):
|
|
1463
|
-
"""
|
|
2251
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
2252
|
+
"""
|
|
2253
|
+
|
|
2254
|
+
:return: The class or default when not found.
|
|
2255
|
+
:rtype: typing.Any
|
|
2256
|
+
"""
|
|
1464
2257
|
...
|
|
1465
2258
|
|
|
1466
2259
|
def draw(self, _context):
|
|
@@ -1479,138 +2272,224 @@ class OUTLINER_MT_edit_datablocks(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
1479
2272
|
...
|
|
1480
2273
|
|
|
1481
2274
|
def draw_preset(self, _context):
|
|
1482
|
-
"""
|
|
2275
|
+
"""Define these on the subclass:
|
|
2276
|
+
- preset_operator (string)
|
|
2277
|
+
- preset_subdir (string)Optionally:
|
|
2278
|
+
- preset_add_operator (string)
|
|
2279
|
+
- preset_extensions (set of strings)
|
|
2280
|
+
- preset_operator_defaults (dict of keyword args)
|
|
1483
2281
|
|
|
1484
|
-
|
|
2282
|
+
:param _context:
|
|
1485
2283
|
"""
|
|
1486
2284
|
...
|
|
1487
2285
|
|
|
1488
|
-
def driver_add(self):
|
|
1489
|
-
"""
|
|
2286
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
2287
|
+
"""Adds driver(s) to the given property
|
|
2288
|
+
|
|
2289
|
+
:return: The driver(s) added.
|
|
2290
|
+
:rtype: bpy.types.FCurve
|
|
2291
|
+
"""
|
|
1490
2292
|
...
|
|
1491
2293
|
|
|
1492
|
-
def driver_remove(self):
|
|
1493
|
-
"""
|
|
2294
|
+
def driver_remove(self) -> bool:
|
|
2295
|
+
"""Remove driver(s) from the given property
|
|
2296
|
+
|
|
2297
|
+
:return: Success of driver removal.
|
|
2298
|
+
:rtype: bool
|
|
2299
|
+
"""
|
|
1494
2300
|
...
|
|
1495
2301
|
|
|
1496
2302
|
def get(self):
|
|
1497
|
-
"""
|
|
2303
|
+
"""Returns the value of the custom property assigned to key or default
|
|
2304
|
+
when not found (matches Python's dictionary function of the same name).
|
|
2305
|
+
|
|
2306
|
+
"""
|
|
1498
2307
|
...
|
|
1499
2308
|
|
|
1500
2309
|
def id_properties_clear(self):
|
|
1501
|
-
"""
|
|
2310
|
+
"""
|
|
2311
|
+
|
|
2312
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
2313
|
+
"""
|
|
1502
2314
|
...
|
|
1503
2315
|
|
|
1504
2316
|
def id_properties_ensure(self):
|
|
1505
|
-
"""
|
|
2317
|
+
"""
|
|
2318
|
+
|
|
2319
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
2320
|
+
"""
|
|
1506
2321
|
...
|
|
1507
2322
|
|
|
1508
2323
|
def id_properties_ui(self):
|
|
1509
|
-
"""
|
|
2324
|
+
"""
|
|
2325
|
+
|
|
2326
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
2327
|
+
"""
|
|
1510
2328
|
...
|
|
1511
2329
|
|
|
1512
2330
|
def is_extended(self):
|
|
1513
2331
|
""" """
|
|
1514
2332
|
...
|
|
1515
2333
|
|
|
1516
|
-
def is_property_hidden(self):
|
|
1517
|
-
"""
|
|
2334
|
+
def is_property_hidden(self) -> bool:
|
|
2335
|
+
"""Check if a property is hidden.
|
|
2336
|
+
|
|
2337
|
+
:return: True when the property is hidden.
|
|
2338
|
+
:rtype: bool
|
|
2339
|
+
"""
|
|
1518
2340
|
...
|
|
1519
2341
|
|
|
1520
|
-
def is_property_overridable_library(self):
|
|
1521
|
-
"""
|
|
2342
|
+
def is_property_overridable_library(self) -> bool:
|
|
2343
|
+
"""Check if a property is overridable.
|
|
2344
|
+
|
|
2345
|
+
:return: True when the property is overridable.
|
|
2346
|
+
:rtype: bool
|
|
2347
|
+
"""
|
|
1522
2348
|
...
|
|
1523
2349
|
|
|
1524
|
-
def is_property_readonly(self):
|
|
1525
|
-
"""
|
|
2350
|
+
def is_property_readonly(self) -> bool:
|
|
2351
|
+
"""Check if a property is readonly.
|
|
2352
|
+
|
|
2353
|
+
:return: True when the property is readonly (not writable).
|
|
2354
|
+
:rtype: bool
|
|
2355
|
+
"""
|
|
1526
2356
|
...
|
|
1527
2357
|
|
|
1528
|
-
def is_property_set(self):
|
|
1529
|
-
"""
|
|
2358
|
+
def is_property_set(self) -> bool:
|
|
2359
|
+
"""Check if a property is set, use for testing operator properties.
|
|
2360
|
+
|
|
2361
|
+
:return: True when the property has been set.
|
|
2362
|
+
:rtype: bool
|
|
2363
|
+
"""
|
|
1530
2364
|
...
|
|
1531
2365
|
|
|
1532
2366
|
def items(self):
|
|
1533
|
-
"""
|
|
2367
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
2368
|
+
dictionary function of the same name).
|
|
2369
|
+
|
|
2370
|
+
:return: custom property key, value pairs.
|
|
2371
|
+
"""
|
|
1534
2372
|
...
|
|
1535
2373
|
|
|
1536
|
-
def keyframe_delete(self):
|
|
1537
|
-
"""
|
|
2374
|
+
def keyframe_delete(self) -> bool:
|
|
2375
|
+
"""Remove a keyframe from this properties fcurve.
|
|
2376
|
+
|
|
2377
|
+
:return: Success of keyframe deletion.
|
|
2378
|
+
:rtype: bool
|
|
2379
|
+
"""
|
|
1538
2380
|
...
|
|
1539
2381
|
|
|
1540
|
-
def keyframe_insert(self):
|
|
1541
|
-
"""
|
|
2382
|
+
def keyframe_insert(self) -> bool:
|
|
2383
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
2384
|
+
|
|
2385
|
+
:return: Success of keyframe insertion.
|
|
2386
|
+
:rtype: bool
|
|
2387
|
+
"""
|
|
1542
2388
|
...
|
|
1543
2389
|
|
|
1544
2390
|
def keys(self):
|
|
1545
|
-
"""
|
|
2391
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
2392
|
+
dictionary function of the same name).
|
|
2393
|
+
|
|
2394
|
+
:return: custom property keys.
|
|
2395
|
+
"""
|
|
1546
2396
|
...
|
|
1547
2397
|
|
|
1548
|
-
def path_from_id(self):
|
|
1549
|
-
"""
|
|
2398
|
+
def path_from_id(self) -> str:
|
|
2399
|
+
"""Returns the data path from the ID to this object (string).
|
|
2400
|
+
|
|
2401
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
2402
|
+
to this struct and property (when given).
|
|
2403
|
+
:rtype: str
|
|
2404
|
+
"""
|
|
1550
2405
|
...
|
|
1551
2406
|
|
|
1552
2407
|
def path_menu(
|
|
1553
2408
|
self,
|
|
1554
|
-
searchpaths,
|
|
1555
|
-
operator,
|
|
1556
|
-
props_default,
|
|
1557
|
-
prop_filepath,
|
|
1558
|
-
filter_ext,
|
|
1559
|
-
filter_path,
|
|
1560
|
-
display_name,
|
|
1561
|
-
add_operator,
|
|
1562
|
-
add_operator_props,
|
|
2409
|
+
searchpaths: list[str],
|
|
2410
|
+
operator: str,
|
|
2411
|
+
props_default: dict = None,
|
|
2412
|
+
prop_filepath: str = "filepath",
|
|
2413
|
+
filter_ext: typing.Callable = None,
|
|
2414
|
+
filter_path=None,
|
|
2415
|
+
display_name: typing.Callable = None,
|
|
2416
|
+
add_operator=None,
|
|
2417
|
+
add_operator_props=None,
|
|
1563
2418
|
):
|
|
1564
|
-
"""
|
|
2419
|
+
"""Populate a menu from a list of paths.
|
|
1565
2420
|
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
2421
|
+
:param searchpaths: Paths to scan.
|
|
2422
|
+
:type searchpaths: list[str]
|
|
2423
|
+
:param operator: The operator id to use with each file.
|
|
2424
|
+
:type operator: str
|
|
2425
|
+
:param props_default: Properties to assign to each operator.
|
|
2426
|
+
:type props_default: dict
|
|
2427
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
2428
|
+
:type prop_filepath: str
|
|
2429
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
2430
|
+
|
|
2431
|
+
Returning false excludes the file from the list.
|
|
2432
|
+
:type filter_ext: typing.Callable
|
|
2433
|
+
:param filter_path:
|
|
2434
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
2435
|
+
:type display_name: typing.Callable
|
|
2436
|
+
:param add_operator:
|
|
2437
|
+
:param add_operator_props:
|
|
1575
2438
|
"""
|
|
1576
2439
|
...
|
|
1577
2440
|
|
|
1578
2441
|
def path_resolve(self):
|
|
1579
|
-
""" """
|
|
2442
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
1580
2443
|
...
|
|
1581
2444
|
|
|
1582
2445
|
def pop(self):
|
|
1583
|
-
"""
|
|
2446
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
2447
|
+
when not found (matches Python's dictionary function of the same name).
|
|
2448
|
+
|
|
2449
|
+
"""
|
|
1584
2450
|
...
|
|
1585
2451
|
|
|
1586
2452
|
def prepend(self, draw_func):
|
|
1587
|
-
"""
|
|
2453
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
2454
|
+
the menus draw function
|
|
1588
2455
|
|
|
1589
|
-
|
|
2456
|
+
:param draw_func:
|
|
1590
2457
|
"""
|
|
1591
2458
|
...
|
|
1592
2459
|
|
|
1593
|
-
def property_overridable_library_set(self):
|
|
1594
|
-
"""
|
|
2460
|
+
def property_overridable_library_set(self) -> bool:
|
|
2461
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
2462
|
+
|
|
2463
|
+
:return: True when the overridable status of the property was successfully set.
|
|
2464
|
+
:rtype: bool
|
|
2465
|
+
"""
|
|
1595
2466
|
...
|
|
1596
2467
|
|
|
1597
2468
|
def property_unset(self):
|
|
1598
|
-
""" """
|
|
2469
|
+
"""Unset a property, will use default value afterward."""
|
|
1599
2470
|
...
|
|
1600
2471
|
|
|
1601
2472
|
def remove(self, draw_func):
|
|
1602
|
-
"""
|
|
2473
|
+
"""Remove a draw function that has been added to this menu
|
|
1603
2474
|
|
|
1604
2475
|
:param draw_func:
|
|
1605
2476
|
"""
|
|
1606
2477
|
...
|
|
1607
2478
|
|
|
1608
2479
|
def type_recast(self):
|
|
1609
|
-
"""
|
|
2480
|
+
"""Return a new instance, this is needed because types
|
|
2481
|
+
such as textures can be changed at runtime.
|
|
2482
|
+
|
|
2483
|
+
:return: a new instance of this object with the type initialized again.
|
|
2484
|
+
"""
|
|
1610
2485
|
...
|
|
1611
2486
|
|
|
1612
2487
|
def values(self):
|
|
1613
|
-
"""
|
|
2488
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
2489
|
+
dictionary function of the same name).
|
|
2490
|
+
|
|
2491
|
+
:return: custom property values.
|
|
2492
|
+
"""
|
|
1614
2493
|
...
|
|
1615
2494
|
|
|
1616
2495
|
class OUTLINER_MT_editor_menus(bpy_types.Menu, bpy_types._GenericUI):
|
|
@@ -1629,22 +2508,35 @@ class OUTLINER_MT_editor_menus(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
1629
2508
|
""" """
|
|
1630
2509
|
|
|
1631
2510
|
def append(self, draw_func):
|
|
1632
|
-
"""
|
|
2511
|
+
"""Append a draw function to this menu,
|
|
2512
|
+
takes the same arguments as the menus draw function
|
|
1633
2513
|
|
|
1634
|
-
|
|
2514
|
+
:param draw_func:
|
|
1635
2515
|
"""
|
|
1636
2516
|
...
|
|
1637
2517
|
|
|
1638
|
-
def as_pointer(self):
|
|
1639
|
-
"""
|
|
2518
|
+
def as_pointer(self) -> int:
|
|
2519
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
2520
|
+
|
|
2521
|
+
:return: int (memory address).
|
|
2522
|
+
:rtype: int
|
|
2523
|
+
"""
|
|
1640
2524
|
...
|
|
1641
2525
|
|
|
1642
|
-
def bl_rna_get_subclass(self):
|
|
1643
|
-
"""
|
|
2526
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
2527
|
+
"""
|
|
2528
|
+
|
|
2529
|
+
:return: The RNA type or default when not found.
|
|
2530
|
+
:rtype: bpy.types.Struct
|
|
2531
|
+
"""
|
|
1644
2532
|
...
|
|
1645
2533
|
|
|
1646
|
-
def bl_rna_get_subclass_py(self):
|
|
1647
|
-
"""
|
|
2534
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
2535
|
+
"""
|
|
2536
|
+
|
|
2537
|
+
:return: The class or default when not found.
|
|
2538
|
+
:rtype: typing.Any
|
|
2539
|
+
"""
|
|
1648
2540
|
...
|
|
1649
2541
|
|
|
1650
2542
|
def draw(self, context):
|
|
@@ -1663,138 +2555,224 @@ class OUTLINER_MT_editor_menus(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
1663
2555
|
...
|
|
1664
2556
|
|
|
1665
2557
|
def draw_preset(self, _context):
|
|
1666
|
-
"""
|
|
2558
|
+
"""Define these on the subclass:
|
|
2559
|
+
- preset_operator (string)
|
|
2560
|
+
- preset_subdir (string)Optionally:
|
|
2561
|
+
- preset_add_operator (string)
|
|
2562
|
+
- preset_extensions (set of strings)
|
|
2563
|
+
- preset_operator_defaults (dict of keyword args)
|
|
1667
2564
|
|
|
1668
|
-
|
|
2565
|
+
:param _context:
|
|
1669
2566
|
"""
|
|
1670
2567
|
...
|
|
1671
2568
|
|
|
1672
|
-
def driver_add(self):
|
|
1673
|
-
"""
|
|
2569
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
2570
|
+
"""Adds driver(s) to the given property
|
|
2571
|
+
|
|
2572
|
+
:return: The driver(s) added.
|
|
2573
|
+
:rtype: bpy.types.FCurve
|
|
2574
|
+
"""
|
|
1674
2575
|
...
|
|
1675
2576
|
|
|
1676
|
-
def driver_remove(self):
|
|
1677
|
-
"""
|
|
2577
|
+
def driver_remove(self) -> bool:
|
|
2578
|
+
"""Remove driver(s) from the given property
|
|
2579
|
+
|
|
2580
|
+
:return: Success of driver removal.
|
|
2581
|
+
:rtype: bool
|
|
2582
|
+
"""
|
|
1678
2583
|
...
|
|
1679
2584
|
|
|
1680
2585
|
def get(self):
|
|
1681
|
-
"""
|
|
2586
|
+
"""Returns the value of the custom property assigned to key or default
|
|
2587
|
+
when not found (matches Python's dictionary function of the same name).
|
|
2588
|
+
|
|
2589
|
+
"""
|
|
1682
2590
|
...
|
|
1683
2591
|
|
|
1684
2592
|
def id_properties_clear(self):
|
|
1685
|
-
"""
|
|
2593
|
+
"""
|
|
2594
|
+
|
|
2595
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
2596
|
+
"""
|
|
1686
2597
|
...
|
|
1687
2598
|
|
|
1688
2599
|
def id_properties_ensure(self):
|
|
1689
|
-
"""
|
|
1690
|
-
...
|
|
2600
|
+
"""
|
|
1691
2601
|
|
|
1692
|
-
|
|
1693
|
-
"""
|
|
2602
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
2603
|
+
"""
|
|
2604
|
+
...
|
|
2605
|
+
|
|
2606
|
+
def id_properties_ui(self):
|
|
2607
|
+
"""
|
|
2608
|
+
|
|
2609
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
2610
|
+
"""
|
|
1694
2611
|
...
|
|
1695
2612
|
|
|
1696
2613
|
def is_extended(self):
|
|
1697
2614
|
""" """
|
|
1698
2615
|
...
|
|
1699
2616
|
|
|
1700
|
-
def is_property_hidden(self):
|
|
1701
|
-
"""
|
|
2617
|
+
def is_property_hidden(self) -> bool:
|
|
2618
|
+
"""Check if a property is hidden.
|
|
2619
|
+
|
|
2620
|
+
:return: True when the property is hidden.
|
|
2621
|
+
:rtype: bool
|
|
2622
|
+
"""
|
|
1702
2623
|
...
|
|
1703
2624
|
|
|
1704
|
-
def is_property_overridable_library(self):
|
|
1705
|
-
"""
|
|
2625
|
+
def is_property_overridable_library(self) -> bool:
|
|
2626
|
+
"""Check if a property is overridable.
|
|
2627
|
+
|
|
2628
|
+
:return: True when the property is overridable.
|
|
2629
|
+
:rtype: bool
|
|
2630
|
+
"""
|
|
1706
2631
|
...
|
|
1707
2632
|
|
|
1708
|
-
def is_property_readonly(self):
|
|
1709
|
-
"""
|
|
2633
|
+
def is_property_readonly(self) -> bool:
|
|
2634
|
+
"""Check if a property is readonly.
|
|
2635
|
+
|
|
2636
|
+
:return: True when the property is readonly (not writable).
|
|
2637
|
+
:rtype: bool
|
|
2638
|
+
"""
|
|
1710
2639
|
...
|
|
1711
2640
|
|
|
1712
|
-
def is_property_set(self):
|
|
1713
|
-
"""
|
|
2641
|
+
def is_property_set(self) -> bool:
|
|
2642
|
+
"""Check if a property is set, use for testing operator properties.
|
|
2643
|
+
|
|
2644
|
+
:return: True when the property has been set.
|
|
2645
|
+
:rtype: bool
|
|
2646
|
+
"""
|
|
1714
2647
|
...
|
|
1715
2648
|
|
|
1716
2649
|
def items(self):
|
|
1717
|
-
"""
|
|
2650
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
2651
|
+
dictionary function of the same name).
|
|
2652
|
+
|
|
2653
|
+
:return: custom property key, value pairs.
|
|
2654
|
+
"""
|
|
1718
2655
|
...
|
|
1719
2656
|
|
|
1720
|
-
def keyframe_delete(self):
|
|
1721
|
-
"""
|
|
2657
|
+
def keyframe_delete(self) -> bool:
|
|
2658
|
+
"""Remove a keyframe from this properties fcurve.
|
|
2659
|
+
|
|
2660
|
+
:return: Success of keyframe deletion.
|
|
2661
|
+
:rtype: bool
|
|
2662
|
+
"""
|
|
1722
2663
|
...
|
|
1723
2664
|
|
|
1724
|
-
def keyframe_insert(self):
|
|
1725
|
-
"""
|
|
2665
|
+
def keyframe_insert(self) -> bool:
|
|
2666
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
2667
|
+
|
|
2668
|
+
:return: Success of keyframe insertion.
|
|
2669
|
+
:rtype: bool
|
|
2670
|
+
"""
|
|
1726
2671
|
...
|
|
1727
2672
|
|
|
1728
2673
|
def keys(self):
|
|
1729
|
-
"""
|
|
2674
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
2675
|
+
dictionary function of the same name).
|
|
2676
|
+
|
|
2677
|
+
:return: custom property keys.
|
|
2678
|
+
"""
|
|
1730
2679
|
...
|
|
1731
2680
|
|
|
1732
|
-
def path_from_id(self):
|
|
1733
|
-
"""
|
|
2681
|
+
def path_from_id(self) -> str:
|
|
2682
|
+
"""Returns the data path from the ID to this object (string).
|
|
2683
|
+
|
|
2684
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
2685
|
+
to this struct and property (when given).
|
|
2686
|
+
:rtype: str
|
|
2687
|
+
"""
|
|
1734
2688
|
...
|
|
1735
2689
|
|
|
1736
2690
|
def path_menu(
|
|
1737
2691
|
self,
|
|
1738
|
-
searchpaths,
|
|
1739
|
-
operator,
|
|
1740
|
-
props_default,
|
|
1741
|
-
prop_filepath,
|
|
1742
|
-
filter_ext,
|
|
1743
|
-
filter_path,
|
|
1744
|
-
display_name,
|
|
1745
|
-
add_operator,
|
|
1746
|
-
add_operator_props,
|
|
2692
|
+
searchpaths: list[str],
|
|
2693
|
+
operator: str,
|
|
2694
|
+
props_default: dict = None,
|
|
2695
|
+
prop_filepath: str = "filepath",
|
|
2696
|
+
filter_ext: typing.Callable = None,
|
|
2697
|
+
filter_path=None,
|
|
2698
|
+
display_name: typing.Callable = None,
|
|
2699
|
+
add_operator=None,
|
|
2700
|
+
add_operator_props=None,
|
|
1747
2701
|
):
|
|
1748
|
-
"""
|
|
2702
|
+
"""Populate a menu from a list of paths.
|
|
2703
|
+
|
|
2704
|
+
:param searchpaths: Paths to scan.
|
|
2705
|
+
:type searchpaths: list[str]
|
|
2706
|
+
:param operator: The operator id to use with each file.
|
|
2707
|
+
:type operator: str
|
|
2708
|
+
:param props_default: Properties to assign to each operator.
|
|
2709
|
+
:type props_default: dict
|
|
2710
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
2711
|
+
:type prop_filepath: str
|
|
2712
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
1749
2713
|
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
:param add_operator:
|
|
1758
|
-
:param add_operator_props:
|
|
2714
|
+
Returning false excludes the file from the list.
|
|
2715
|
+
:type filter_ext: typing.Callable
|
|
2716
|
+
:param filter_path:
|
|
2717
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
2718
|
+
:type display_name: typing.Callable
|
|
2719
|
+
:param add_operator:
|
|
2720
|
+
:param add_operator_props:
|
|
1759
2721
|
"""
|
|
1760
2722
|
...
|
|
1761
2723
|
|
|
1762
2724
|
def path_resolve(self):
|
|
1763
|
-
""" """
|
|
2725
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
1764
2726
|
...
|
|
1765
2727
|
|
|
1766
2728
|
def pop(self):
|
|
1767
|
-
"""
|
|
2729
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
2730
|
+
when not found (matches Python's dictionary function of the same name).
|
|
2731
|
+
|
|
2732
|
+
"""
|
|
1768
2733
|
...
|
|
1769
2734
|
|
|
1770
2735
|
def prepend(self, draw_func):
|
|
1771
|
-
"""
|
|
2736
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
2737
|
+
the menus draw function
|
|
1772
2738
|
|
|
1773
|
-
|
|
2739
|
+
:param draw_func:
|
|
1774
2740
|
"""
|
|
1775
2741
|
...
|
|
1776
2742
|
|
|
1777
|
-
def property_overridable_library_set(self):
|
|
1778
|
-
"""
|
|
2743
|
+
def property_overridable_library_set(self) -> bool:
|
|
2744
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
2745
|
+
|
|
2746
|
+
:return: True when the overridable status of the property was successfully set.
|
|
2747
|
+
:rtype: bool
|
|
2748
|
+
"""
|
|
1779
2749
|
...
|
|
1780
2750
|
|
|
1781
2751
|
def property_unset(self):
|
|
1782
|
-
""" """
|
|
2752
|
+
"""Unset a property, will use default value afterward."""
|
|
1783
2753
|
...
|
|
1784
2754
|
|
|
1785
2755
|
def remove(self, draw_func):
|
|
1786
|
-
"""
|
|
2756
|
+
"""Remove a draw function that has been added to this menu
|
|
1787
2757
|
|
|
1788
2758
|
:param draw_func:
|
|
1789
2759
|
"""
|
|
1790
2760
|
...
|
|
1791
2761
|
|
|
1792
2762
|
def type_recast(self):
|
|
1793
|
-
"""
|
|
2763
|
+
"""Return a new instance, this is needed because types
|
|
2764
|
+
such as textures can be changed at runtime.
|
|
2765
|
+
|
|
2766
|
+
:return: a new instance of this object with the type initialized again.
|
|
2767
|
+
"""
|
|
1794
2768
|
...
|
|
1795
2769
|
|
|
1796
2770
|
def values(self):
|
|
1797
|
-
"""
|
|
2771
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
2772
|
+
dictionary function of the same name).
|
|
2773
|
+
|
|
2774
|
+
:return: custom property values.
|
|
2775
|
+
"""
|
|
1798
2776
|
...
|
|
1799
2777
|
|
|
1800
2778
|
class OUTLINER_MT_liboverride(bpy_types.Menu, bpy_types._GenericUI):
|
|
@@ -1810,22 +2788,35 @@ class OUTLINER_MT_liboverride(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
1810
2788
|
""" """
|
|
1811
2789
|
|
|
1812
2790
|
def append(self, draw_func):
|
|
1813
|
-
"""
|
|
2791
|
+
"""Append a draw function to this menu,
|
|
2792
|
+
takes the same arguments as the menus draw function
|
|
1814
2793
|
|
|
1815
|
-
|
|
2794
|
+
:param draw_func:
|
|
1816
2795
|
"""
|
|
1817
2796
|
...
|
|
1818
2797
|
|
|
1819
|
-
def as_pointer(self):
|
|
1820
|
-
"""
|
|
2798
|
+
def as_pointer(self) -> int:
|
|
2799
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
2800
|
+
|
|
2801
|
+
:return: int (memory address).
|
|
2802
|
+
:rtype: int
|
|
2803
|
+
"""
|
|
1821
2804
|
...
|
|
1822
2805
|
|
|
1823
|
-
def bl_rna_get_subclass(self):
|
|
1824
|
-
"""
|
|
2806
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
2807
|
+
"""
|
|
2808
|
+
|
|
2809
|
+
:return: The RNA type or default when not found.
|
|
2810
|
+
:rtype: bpy.types.Struct
|
|
2811
|
+
"""
|
|
1825
2812
|
...
|
|
1826
2813
|
|
|
1827
|
-
def bl_rna_get_subclass_py(self):
|
|
1828
|
-
"""
|
|
2814
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
2815
|
+
"""
|
|
2816
|
+
|
|
2817
|
+
:return: The class or default when not found.
|
|
2818
|
+
:rtype: typing.Any
|
|
2819
|
+
"""
|
|
1829
2820
|
...
|
|
1830
2821
|
|
|
1831
2822
|
def draw(self, _context):
|
|
@@ -1844,104 +2835,174 @@ class OUTLINER_MT_liboverride(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
1844
2835
|
...
|
|
1845
2836
|
|
|
1846
2837
|
def draw_preset(self, _context):
|
|
1847
|
-
"""
|
|
2838
|
+
"""Define these on the subclass:
|
|
2839
|
+
- preset_operator (string)
|
|
2840
|
+
- preset_subdir (string)Optionally:
|
|
2841
|
+
- preset_add_operator (string)
|
|
2842
|
+
- preset_extensions (set of strings)
|
|
2843
|
+
- preset_operator_defaults (dict of keyword args)
|
|
1848
2844
|
|
|
1849
|
-
|
|
2845
|
+
:param _context:
|
|
1850
2846
|
"""
|
|
1851
2847
|
...
|
|
1852
2848
|
|
|
1853
|
-
def driver_add(self):
|
|
1854
|
-
"""
|
|
2849
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
2850
|
+
"""Adds driver(s) to the given property
|
|
2851
|
+
|
|
2852
|
+
:return: The driver(s) added.
|
|
2853
|
+
:rtype: bpy.types.FCurve
|
|
2854
|
+
"""
|
|
1855
2855
|
...
|
|
1856
2856
|
|
|
1857
|
-
def driver_remove(self):
|
|
1858
|
-
"""
|
|
2857
|
+
def driver_remove(self) -> bool:
|
|
2858
|
+
"""Remove driver(s) from the given property
|
|
2859
|
+
|
|
2860
|
+
:return: Success of driver removal.
|
|
2861
|
+
:rtype: bool
|
|
2862
|
+
"""
|
|
1859
2863
|
...
|
|
1860
2864
|
|
|
1861
2865
|
def get(self):
|
|
1862
|
-
"""
|
|
2866
|
+
"""Returns the value of the custom property assigned to key or default
|
|
2867
|
+
when not found (matches Python's dictionary function of the same name).
|
|
2868
|
+
|
|
2869
|
+
"""
|
|
1863
2870
|
...
|
|
1864
2871
|
|
|
1865
2872
|
def id_properties_clear(self):
|
|
1866
|
-
"""
|
|
2873
|
+
"""
|
|
2874
|
+
|
|
2875
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
2876
|
+
"""
|
|
1867
2877
|
...
|
|
1868
2878
|
|
|
1869
2879
|
def id_properties_ensure(self):
|
|
1870
|
-
"""
|
|
2880
|
+
"""
|
|
2881
|
+
|
|
2882
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
2883
|
+
"""
|
|
1871
2884
|
...
|
|
1872
2885
|
|
|
1873
2886
|
def id_properties_ui(self):
|
|
1874
|
-
"""
|
|
2887
|
+
"""
|
|
2888
|
+
|
|
2889
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
2890
|
+
"""
|
|
1875
2891
|
...
|
|
1876
2892
|
|
|
1877
2893
|
def is_extended(self):
|
|
1878
2894
|
""" """
|
|
1879
2895
|
...
|
|
1880
2896
|
|
|
1881
|
-
def is_property_hidden(self):
|
|
1882
|
-
"""
|
|
2897
|
+
def is_property_hidden(self) -> bool:
|
|
2898
|
+
"""Check if a property is hidden.
|
|
2899
|
+
|
|
2900
|
+
:return: True when the property is hidden.
|
|
2901
|
+
:rtype: bool
|
|
2902
|
+
"""
|
|
1883
2903
|
...
|
|
1884
2904
|
|
|
1885
|
-
def is_property_overridable_library(self):
|
|
1886
|
-
"""
|
|
2905
|
+
def is_property_overridable_library(self) -> bool:
|
|
2906
|
+
"""Check if a property is overridable.
|
|
2907
|
+
|
|
2908
|
+
:return: True when the property is overridable.
|
|
2909
|
+
:rtype: bool
|
|
2910
|
+
"""
|
|
1887
2911
|
...
|
|
1888
2912
|
|
|
1889
|
-
def is_property_readonly(self):
|
|
1890
|
-
"""
|
|
2913
|
+
def is_property_readonly(self) -> bool:
|
|
2914
|
+
"""Check if a property is readonly.
|
|
2915
|
+
|
|
2916
|
+
:return: True when the property is readonly (not writable).
|
|
2917
|
+
:rtype: bool
|
|
2918
|
+
"""
|
|
1891
2919
|
...
|
|
1892
2920
|
|
|
1893
|
-
def is_property_set(self):
|
|
1894
|
-
"""
|
|
2921
|
+
def is_property_set(self) -> bool:
|
|
2922
|
+
"""Check if a property is set, use for testing operator properties.
|
|
2923
|
+
|
|
2924
|
+
:return: True when the property has been set.
|
|
2925
|
+
:rtype: bool
|
|
2926
|
+
"""
|
|
1895
2927
|
...
|
|
1896
2928
|
|
|
1897
2929
|
def items(self):
|
|
1898
|
-
"""
|
|
2930
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
2931
|
+
dictionary function of the same name).
|
|
2932
|
+
|
|
2933
|
+
:return: custom property key, value pairs.
|
|
2934
|
+
"""
|
|
1899
2935
|
...
|
|
1900
2936
|
|
|
1901
|
-
def keyframe_delete(self):
|
|
1902
|
-
"""
|
|
2937
|
+
def keyframe_delete(self) -> bool:
|
|
2938
|
+
"""Remove a keyframe from this properties fcurve.
|
|
2939
|
+
|
|
2940
|
+
:return: Success of keyframe deletion.
|
|
2941
|
+
:rtype: bool
|
|
2942
|
+
"""
|
|
1903
2943
|
...
|
|
1904
2944
|
|
|
1905
|
-
def keyframe_insert(self):
|
|
1906
|
-
"""
|
|
2945
|
+
def keyframe_insert(self) -> bool:
|
|
2946
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
2947
|
+
|
|
2948
|
+
:return: Success of keyframe insertion.
|
|
2949
|
+
:rtype: bool
|
|
2950
|
+
"""
|
|
1907
2951
|
...
|
|
1908
2952
|
|
|
1909
2953
|
def keys(self):
|
|
1910
|
-
"""
|
|
2954
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
2955
|
+
dictionary function of the same name).
|
|
2956
|
+
|
|
2957
|
+
:return: custom property keys.
|
|
2958
|
+
"""
|
|
1911
2959
|
...
|
|
1912
2960
|
|
|
1913
|
-
def path_from_id(self):
|
|
1914
|
-
"""
|
|
2961
|
+
def path_from_id(self) -> str:
|
|
2962
|
+
"""Returns the data path from the ID to this object (string).
|
|
2963
|
+
|
|
2964
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
2965
|
+
to this struct and property (when given).
|
|
2966
|
+
:rtype: str
|
|
2967
|
+
"""
|
|
1915
2968
|
...
|
|
1916
2969
|
|
|
1917
2970
|
def path_menu(
|
|
1918
2971
|
self,
|
|
1919
|
-
searchpaths,
|
|
1920
|
-
operator,
|
|
1921
|
-
props_default,
|
|
1922
|
-
prop_filepath,
|
|
1923
|
-
filter_ext,
|
|
1924
|
-
filter_path,
|
|
1925
|
-
display_name,
|
|
1926
|
-
add_operator,
|
|
1927
|
-
add_operator_props,
|
|
2972
|
+
searchpaths: list[str],
|
|
2973
|
+
operator: str,
|
|
2974
|
+
props_default: dict = None,
|
|
2975
|
+
prop_filepath: str = "filepath",
|
|
2976
|
+
filter_ext: typing.Callable = None,
|
|
2977
|
+
filter_path=None,
|
|
2978
|
+
display_name: typing.Callable = None,
|
|
2979
|
+
add_operator=None,
|
|
2980
|
+
add_operator_props=None,
|
|
1928
2981
|
):
|
|
1929
|
-
"""
|
|
2982
|
+
"""Populate a menu from a list of paths.
|
|
2983
|
+
|
|
2984
|
+
:param searchpaths: Paths to scan.
|
|
2985
|
+
:type searchpaths: list[str]
|
|
2986
|
+
:param operator: The operator id to use with each file.
|
|
2987
|
+
:type operator: str
|
|
2988
|
+
:param props_default: Properties to assign to each operator.
|
|
2989
|
+
:type props_default: dict
|
|
2990
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
2991
|
+
:type prop_filepath: str
|
|
2992
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
1930
2993
|
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
:param add_operator:
|
|
1939
|
-
:param add_operator_props:
|
|
2994
|
+
Returning false excludes the file from the list.
|
|
2995
|
+
:type filter_ext: typing.Callable
|
|
2996
|
+
:param filter_path:
|
|
2997
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
2998
|
+
:type display_name: typing.Callable
|
|
2999
|
+
:param add_operator:
|
|
3000
|
+
:param add_operator_props:
|
|
1940
3001
|
"""
|
|
1941
3002
|
...
|
|
1942
3003
|
|
|
1943
3004
|
def path_resolve(self):
|
|
1944
|
-
""" """
|
|
3005
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
1945
3006
|
...
|
|
1946
3007
|
|
|
1947
3008
|
def poll(self, context):
|
|
@@ -1952,37 +3013,53 @@ class OUTLINER_MT_liboverride(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
1952
3013
|
...
|
|
1953
3014
|
|
|
1954
3015
|
def pop(self):
|
|
1955
|
-
"""
|
|
3016
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
3017
|
+
when not found (matches Python's dictionary function of the same name).
|
|
3018
|
+
|
|
3019
|
+
"""
|
|
1956
3020
|
...
|
|
1957
3021
|
|
|
1958
3022
|
def prepend(self, draw_func):
|
|
1959
|
-
"""
|
|
3023
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
3024
|
+
the menus draw function
|
|
1960
3025
|
|
|
1961
|
-
|
|
3026
|
+
:param draw_func:
|
|
1962
3027
|
"""
|
|
1963
3028
|
...
|
|
1964
3029
|
|
|
1965
|
-
def property_overridable_library_set(self):
|
|
1966
|
-
"""
|
|
3030
|
+
def property_overridable_library_set(self) -> bool:
|
|
3031
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
3032
|
+
|
|
3033
|
+
:return: True when the overridable status of the property was successfully set.
|
|
3034
|
+
:rtype: bool
|
|
3035
|
+
"""
|
|
1967
3036
|
...
|
|
1968
3037
|
|
|
1969
3038
|
def property_unset(self):
|
|
1970
|
-
""" """
|
|
3039
|
+
"""Unset a property, will use default value afterward."""
|
|
1971
3040
|
...
|
|
1972
3041
|
|
|
1973
3042
|
def remove(self, draw_func):
|
|
1974
|
-
"""
|
|
3043
|
+
"""Remove a draw function that has been added to this menu
|
|
1975
3044
|
|
|
1976
3045
|
:param draw_func:
|
|
1977
3046
|
"""
|
|
1978
3047
|
...
|
|
1979
3048
|
|
|
1980
3049
|
def type_recast(self):
|
|
1981
|
-
"""
|
|
3050
|
+
"""Return a new instance, this is needed because types
|
|
3051
|
+
such as textures can be changed at runtime.
|
|
3052
|
+
|
|
3053
|
+
:return: a new instance of this object with the type initialized again.
|
|
3054
|
+
"""
|
|
1982
3055
|
...
|
|
1983
3056
|
|
|
1984
3057
|
def values(self):
|
|
1985
|
-
"""
|
|
3058
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
3059
|
+
dictionary function of the same name).
|
|
3060
|
+
|
|
3061
|
+
:return: custom property values.
|
|
3062
|
+
"""
|
|
1986
3063
|
...
|
|
1987
3064
|
|
|
1988
3065
|
class OUTLINER_MT_object(bpy_types.Menu, bpy_types._GenericUI):
|
|
@@ -1998,22 +3075,35 @@ class OUTLINER_MT_object(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
1998
3075
|
""" """
|
|
1999
3076
|
|
|
2000
3077
|
def append(self, draw_func):
|
|
2001
|
-
"""
|
|
3078
|
+
"""Append a draw function to this menu,
|
|
3079
|
+
takes the same arguments as the menus draw function
|
|
2002
3080
|
|
|
2003
|
-
|
|
3081
|
+
:param draw_func:
|
|
2004
3082
|
"""
|
|
2005
3083
|
...
|
|
2006
3084
|
|
|
2007
|
-
def as_pointer(self):
|
|
2008
|
-
"""
|
|
3085
|
+
def as_pointer(self) -> int:
|
|
3086
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
3087
|
+
|
|
3088
|
+
:return: int (memory address).
|
|
3089
|
+
:rtype: int
|
|
3090
|
+
"""
|
|
2009
3091
|
...
|
|
2010
3092
|
|
|
2011
|
-
def bl_rna_get_subclass(self):
|
|
2012
|
-
"""
|
|
3093
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
3094
|
+
"""
|
|
3095
|
+
|
|
3096
|
+
:return: The RNA type or default when not found.
|
|
3097
|
+
:rtype: bpy.types.Struct
|
|
3098
|
+
"""
|
|
2013
3099
|
...
|
|
2014
3100
|
|
|
2015
|
-
def bl_rna_get_subclass_py(self):
|
|
2016
|
-
"""
|
|
3101
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
3102
|
+
"""
|
|
3103
|
+
|
|
3104
|
+
:return: The class or default when not found.
|
|
3105
|
+
:rtype: typing.Any
|
|
3106
|
+
"""
|
|
2017
3107
|
...
|
|
2018
3108
|
|
|
2019
3109
|
def draw(self, context):
|
|
@@ -2032,138 +3122,224 @@ class OUTLINER_MT_object(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
2032
3122
|
...
|
|
2033
3123
|
|
|
2034
3124
|
def draw_preset(self, _context):
|
|
2035
|
-
"""
|
|
3125
|
+
"""Define these on the subclass:
|
|
3126
|
+
- preset_operator (string)
|
|
3127
|
+
- preset_subdir (string)Optionally:
|
|
3128
|
+
- preset_add_operator (string)
|
|
3129
|
+
- preset_extensions (set of strings)
|
|
3130
|
+
- preset_operator_defaults (dict of keyword args)
|
|
2036
3131
|
|
|
2037
|
-
|
|
3132
|
+
:param _context:
|
|
2038
3133
|
"""
|
|
2039
3134
|
...
|
|
2040
3135
|
|
|
2041
|
-
def driver_add(self):
|
|
2042
|
-
"""
|
|
3136
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
3137
|
+
"""Adds driver(s) to the given property
|
|
3138
|
+
|
|
3139
|
+
:return: The driver(s) added.
|
|
3140
|
+
:rtype: bpy.types.FCurve
|
|
3141
|
+
"""
|
|
2043
3142
|
...
|
|
2044
3143
|
|
|
2045
|
-
def driver_remove(self):
|
|
2046
|
-
"""
|
|
3144
|
+
def driver_remove(self) -> bool:
|
|
3145
|
+
"""Remove driver(s) from the given property
|
|
3146
|
+
|
|
3147
|
+
:return: Success of driver removal.
|
|
3148
|
+
:rtype: bool
|
|
3149
|
+
"""
|
|
2047
3150
|
...
|
|
2048
3151
|
|
|
2049
3152
|
def get(self):
|
|
2050
|
-
"""
|
|
3153
|
+
"""Returns the value of the custom property assigned to key or default
|
|
3154
|
+
when not found (matches Python's dictionary function of the same name).
|
|
3155
|
+
|
|
3156
|
+
"""
|
|
2051
3157
|
...
|
|
2052
3158
|
|
|
2053
3159
|
def id_properties_clear(self):
|
|
2054
|
-
"""
|
|
3160
|
+
"""
|
|
3161
|
+
|
|
3162
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
3163
|
+
"""
|
|
2055
3164
|
...
|
|
2056
3165
|
|
|
2057
3166
|
def id_properties_ensure(self):
|
|
2058
|
-
"""
|
|
3167
|
+
"""
|
|
3168
|
+
|
|
3169
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
3170
|
+
"""
|
|
2059
3171
|
...
|
|
2060
3172
|
|
|
2061
3173
|
def id_properties_ui(self):
|
|
2062
|
-
"""
|
|
3174
|
+
"""
|
|
3175
|
+
|
|
3176
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
3177
|
+
"""
|
|
2063
3178
|
...
|
|
2064
3179
|
|
|
2065
3180
|
def is_extended(self):
|
|
2066
3181
|
""" """
|
|
2067
3182
|
...
|
|
2068
3183
|
|
|
2069
|
-
def is_property_hidden(self):
|
|
2070
|
-
"""
|
|
3184
|
+
def is_property_hidden(self) -> bool:
|
|
3185
|
+
"""Check if a property is hidden.
|
|
3186
|
+
|
|
3187
|
+
:return: True when the property is hidden.
|
|
3188
|
+
:rtype: bool
|
|
3189
|
+
"""
|
|
2071
3190
|
...
|
|
2072
3191
|
|
|
2073
|
-
def is_property_overridable_library(self):
|
|
2074
|
-
"""
|
|
3192
|
+
def is_property_overridable_library(self) -> bool:
|
|
3193
|
+
"""Check if a property is overridable.
|
|
3194
|
+
|
|
3195
|
+
:return: True when the property is overridable.
|
|
3196
|
+
:rtype: bool
|
|
3197
|
+
"""
|
|
2075
3198
|
...
|
|
2076
3199
|
|
|
2077
|
-
def is_property_readonly(self):
|
|
2078
|
-
"""
|
|
3200
|
+
def is_property_readonly(self) -> bool:
|
|
3201
|
+
"""Check if a property is readonly.
|
|
3202
|
+
|
|
3203
|
+
:return: True when the property is readonly (not writable).
|
|
3204
|
+
:rtype: bool
|
|
3205
|
+
"""
|
|
2079
3206
|
...
|
|
2080
3207
|
|
|
2081
|
-
def is_property_set(self):
|
|
2082
|
-
"""
|
|
3208
|
+
def is_property_set(self) -> bool:
|
|
3209
|
+
"""Check if a property is set, use for testing operator properties.
|
|
3210
|
+
|
|
3211
|
+
:return: True when the property has been set.
|
|
3212
|
+
:rtype: bool
|
|
3213
|
+
"""
|
|
2083
3214
|
...
|
|
2084
3215
|
|
|
2085
3216
|
def items(self):
|
|
2086
|
-
"""
|
|
3217
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
3218
|
+
dictionary function of the same name).
|
|
3219
|
+
|
|
3220
|
+
:return: custom property key, value pairs.
|
|
3221
|
+
"""
|
|
2087
3222
|
...
|
|
2088
3223
|
|
|
2089
|
-
def keyframe_delete(self):
|
|
2090
|
-
"""
|
|
3224
|
+
def keyframe_delete(self) -> bool:
|
|
3225
|
+
"""Remove a keyframe from this properties fcurve.
|
|
3226
|
+
|
|
3227
|
+
:return: Success of keyframe deletion.
|
|
3228
|
+
:rtype: bool
|
|
3229
|
+
"""
|
|
2091
3230
|
...
|
|
2092
3231
|
|
|
2093
|
-
def keyframe_insert(self):
|
|
2094
|
-
"""
|
|
3232
|
+
def keyframe_insert(self) -> bool:
|
|
3233
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
3234
|
+
|
|
3235
|
+
:return: Success of keyframe insertion.
|
|
3236
|
+
:rtype: bool
|
|
3237
|
+
"""
|
|
2095
3238
|
...
|
|
2096
3239
|
|
|
2097
3240
|
def keys(self):
|
|
2098
|
-
"""
|
|
3241
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
3242
|
+
dictionary function of the same name).
|
|
3243
|
+
|
|
3244
|
+
:return: custom property keys.
|
|
3245
|
+
"""
|
|
2099
3246
|
...
|
|
2100
3247
|
|
|
2101
|
-
def path_from_id(self):
|
|
2102
|
-
"""
|
|
3248
|
+
def path_from_id(self) -> str:
|
|
3249
|
+
"""Returns the data path from the ID to this object (string).
|
|
3250
|
+
|
|
3251
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
3252
|
+
to this struct and property (when given).
|
|
3253
|
+
:rtype: str
|
|
3254
|
+
"""
|
|
2103
3255
|
...
|
|
2104
3256
|
|
|
2105
3257
|
def path_menu(
|
|
2106
3258
|
self,
|
|
2107
|
-
searchpaths,
|
|
2108
|
-
operator,
|
|
2109
|
-
props_default,
|
|
2110
|
-
prop_filepath,
|
|
2111
|
-
filter_ext,
|
|
2112
|
-
filter_path,
|
|
2113
|
-
display_name,
|
|
2114
|
-
add_operator,
|
|
2115
|
-
add_operator_props,
|
|
3259
|
+
searchpaths: list[str],
|
|
3260
|
+
operator: str,
|
|
3261
|
+
props_default: dict = None,
|
|
3262
|
+
prop_filepath: str = "filepath",
|
|
3263
|
+
filter_ext: typing.Callable = None,
|
|
3264
|
+
filter_path=None,
|
|
3265
|
+
display_name: typing.Callable = None,
|
|
3266
|
+
add_operator=None,
|
|
3267
|
+
add_operator_props=None,
|
|
2116
3268
|
):
|
|
2117
|
-
"""
|
|
3269
|
+
"""Populate a menu from a list of paths.
|
|
3270
|
+
|
|
3271
|
+
:param searchpaths: Paths to scan.
|
|
3272
|
+
:type searchpaths: list[str]
|
|
3273
|
+
:param operator: The operator id to use with each file.
|
|
3274
|
+
:type operator: str
|
|
3275
|
+
:param props_default: Properties to assign to each operator.
|
|
3276
|
+
:type props_default: dict
|
|
3277
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
3278
|
+
:type prop_filepath: str
|
|
3279
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
2118
3280
|
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
:param add_operator:
|
|
2127
|
-
:param add_operator_props:
|
|
3281
|
+
Returning false excludes the file from the list.
|
|
3282
|
+
:type filter_ext: typing.Callable
|
|
3283
|
+
:param filter_path:
|
|
3284
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
3285
|
+
:type display_name: typing.Callable
|
|
3286
|
+
:param add_operator:
|
|
3287
|
+
:param add_operator_props:
|
|
2128
3288
|
"""
|
|
2129
3289
|
...
|
|
2130
3290
|
|
|
2131
3291
|
def path_resolve(self):
|
|
2132
|
-
""" """
|
|
3292
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
2133
3293
|
...
|
|
2134
3294
|
|
|
2135
3295
|
def pop(self):
|
|
2136
|
-
"""
|
|
3296
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
3297
|
+
when not found (matches Python's dictionary function of the same name).
|
|
3298
|
+
|
|
3299
|
+
"""
|
|
2137
3300
|
...
|
|
2138
3301
|
|
|
2139
3302
|
def prepend(self, draw_func):
|
|
2140
|
-
"""
|
|
3303
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
3304
|
+
the menus draw function
|
|
2141
3305
|
|
|
2142
|
-
|
|
3306
|
+
:param draw_func:
|
|
2143
3307
|
"""
|
|
2144
3308
|
...
|
|
2145
3309
|
|
|
2146
|
-
def property_overridable_library_set(self):
|
|
2147
|
-
"""
|
|
3310
|
+
def property_overridable_library_set(self) -> bool:
|
|
3311
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
3312
|
+
|
|
3313
|
+
:return: True when the overridable status of the property was successfully set.
|
|
3314
|
+
:rtype: bool
|
|
3315
|
+
"""
|
|
2148
3316
|
...
|
|
2149
3317
|
|
|
2150
3318
|
def property_unset(self):
|
|
2151
|
-
""" """
|
|
3319
|
+
"""Unset a property, will use default value afterward."""
|
|
2152
3320
|
...
|
|
2153
3321
|
|
|
2154
3322
|
def remove(self, draw_func):
|
|
2155
|
-
"""
|
|
3323
|
+
"""Remove a draw function that has been added to this menu
|
|
2156
3324
|
|
|
2157
3325
|
:param draw_func:
|
|
2158
3326
|
"""
|
|
2159
3327
|
...
|
|
2160
3328
|
|
|
2161
3329
|
def type_recast(self):
|
|
2162
|
-
"""
|
|
3330
|
+
"""Return a new instance, this is needed because types
|
|
3331
|
+
such as textures can be changed at runtime.
|
|
3332
|
+
|
|
3333
|
+
:return: a new instance of this object with the type initialized again.
|
|
3334
|
+
"""
|
|
2163
3335
|
...
|
|
2164
3336
|
|
|
2165
3337
|
def values(self):
|
|
2166
|
-
"""
|
|
3338
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
3339
|
+
dictionary function of the same name).
|
|
3340
|
+
|
|
3341
|
+
:return: custom property values.
|
|
3342
|
+
"""
|
|
2167
3343
|
...
|
|
2168
3344
|
|
|
2169
3345
|
class OUTLINER_MT_view_pie(bpy_types.Menu, bpy_types._GenericUI):
|
|
@@ -2179,22 +3355,35 @@ class OUTLINER_MT_view_pie(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
2179
3355
|
""" """
|
|
2180
3356
|
|
|
2181
3357
|
def append(self, draw_func):
|
|
2182
|
-
"""
|
|
3358
|
+
"""Append a draw function to this menu,
|
|
3359
|
+
takes the same arguments as the menus draw function
|
|
2183
3360
|
|
|
2184
|
-
|
|
3361
|
+
:param draw_func:
|
|
2185
3362
|
"""
|
|
2186
3363
|
...
|
|
2187
3364
|
|
|
2188
|
-
def as_pointer(self):
|
|
2189
|
-
"""
|
|
3365
|
+
def as_pointer(self) -> int:
|
|
3366
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
3367
|
+
|
|
3368
|
+
:return: int (memory address).
|
|
3369
|
+
:rtype: int
|
|
3370
|
+
"""
|
|
2190
3371
|
...
|
|
2191
3372
|
|
|
2192
|
-
def bl_rna_get_subclass(self):
|
|
2193
|
-
"""
|
|
3373
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
3374
|
+
"""
|
|
3375
|
+
|
|
3376
|
+
:return: The RNA type or default when not found.
|
|
3377
|
+
:rtype: bpy.types.Struct
|
|
3378
|
+
"""
|
|
2194
3379
|
...
|
|
2195
3380
|
|
|
2196
|
-
def bl_rna_get_subclass_py(self):
|
|
2197
|
-
"""
|
|
3381
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
3382
|
+
"""
|
|
3383
|
+
|
|
3384
|
+
:return: The class or default when not found.
|
|
3385
|
+
:rtype: typing.Any
|
|
3386
|
+
"""
|
|
2198
3387
|
...
|
|
2199
3388
|
|
|
2200
3389
|
def draw(self, _context):
|
|
@@ -2213,138 +3402,224 @@ class OUTLINER_MT_view_pie(bpy_types.Menu, bpy_types._GenericUI):
|
|
|
2213
3402
|
...
|
|
2214
3403
|
|
|
2215
3404
|
def draw_preset(self, _context):
|
|
2216
|
-
"""
|
|
3405
|
+
"""Define these on the subclass:
|
|
3406
|
+
- preset_operator (string)
|
|
3407
|
+
- preset_subdir (string)Optionally:
|
|
3408
|
+
- preset_add_operator (string)
|
|
3409
|
+
- preset_extensions (set of strings)
|
|
3410
|
+
- preset_operator_defaults (dict of keyword args)
|
|
2217
3411
|
|
|
2218
|
-
|
|
3412
|
+
:param _context:
|
|
2219
3413
|
"""
|
|
2220
3414
|
...
|
|
2221
3415
|
|
|
2222
|
-
def driver_add(self):
|
|
2223
|
-
"""
|
|
3416
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
3417
|
+
"""Adds driver(s) to the given property
|
|
3418
|
+
|
|
3419
|
+
:return: The driver(s) added.
|
|
3420
|
+
:rtype: bpy.types.FCurve
|
|
3421
|
+
"""
|
|
2224
3422
|
...
|
|
2225
3423
|
|
|
2226
|
-
def driver_remove(self):
|
|
2227
|
-
"""
|
|
3424
|
+
def driver_remove(self) -> bool:
|
|
3425
|
+
"""Remove driver(s) from the given property
|
|
3426
|
+
|
|
3427
|
+
:return: Success of driver removal.
|
|
3428
|
+
:rtype: bool
|
|
3429
|
+
"""
|
|
2228
3430
|
...
|
|
2229
3431
|
|
|
2230
3432
|
def get(self):
|
|
2231
|
-
"""
|
|
3433
|
+
"""Returns the value of the custom property assigned to key or default
|
|
3434
|
+
when not found (matches Python's dictionary function of the same name).
|
|
3435
|
+
|
|
3436
|
+
"""
|
|
2232
3437
|
...
|
|
2233
3438
|
|
|
2234
3439
|
def id_properties_clear(self):
|
|
2235
|
-
"""
|
|
3440
|
+
"""
|
|
3441
|
+
|
|
3442
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
3443
|
+
"""
|
|
2236
3444
|
...
|
|
2237
3445
|
|
|
2238
3446
|
def id_properties_ensure(self):
|
|
2239
|
-
"""
|
|
3447
|
+
"""
|
|
3448
|
+
|
|
3449
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
3450
|
+
"""
|
|
2240
3451
|
...
|
|
2241
3452
|
|
|
2242
3453
|
def id_properties_ui(self):
|
|
2243
|
-
"""
|
|
3454
|
+
"""
|
|
3455
|
+
|
|
3456
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
3457
|
+
"""
|
|
2244
3458
|
...
|
|
2245
3459
|
|
|
2246
3460
|
def is_extended(self):
|
|
2247
3461
|
""" """
|
|
2248
3462
|
...
|
|
2249
3463
|
|
|
2250
|
-
def is_property_hidden(self):
|
|
2251
|
-
"""
|
|
3464
|
+
def is_property_hidden(self) -> bool:
|
|
3465
|
+
"""Check if a property is hidden.
|
|
3466
|
+
|
|
3467
|
+
:return: True when the property is hidden.
|
|
3468
|
+
:rtype: bool
|
|
3469
|
+
"""
|
|
2252
3470
|
...
|
|
2253
3471
|
|
|
2254
|
-
def is_property_overridable_library(self):
|
|
2255
|
-
"""
|
|
3472
|
+
def is_property_overridable_library(self) -> bool:
|
|
3473
|
+
"""Check if a property is overridable.
|
|
3474
|
+
|
|
3475
|
+
:return: True when the property is overridable.
|
|
3476
|
+
:rtype: bool
|
|
3477
|
+
"""
|
|
2256
3478
|
...
|
|
2257
3479
|
|
|
2258
|
-
def is_property_readonly(self):
|
|
2259
|
-
"""
|
|
3480
|
+
def is_property_readonly(self) -> bool:
|
|
3481
|
+
"""Check if a property is readonly.
|
|
3482
|
+
|
|
3483
|
+
:return: True when the property is readonly (not writable).
|
|
3484
|
+
:rtype: bool
|
|
3485
|
+
"""
|
|
2260
3486
|
...
|
|
2261
3487
|
|
|
2262
|
-
def is_property_set(self):
|
|
2263
|
-
"""
|
|
3488
|
+
def is_property_set(self) -> bool:
|
|
3489
|
+
"""Check if a property is set, use for testing operator properties.
|
|
3490
|
+
|
|
3491
|
+
:return: True when the property has been set.
|
|
3492
|
+
:rtype: bool
|
|
3493
|
+
"""
|
|
2264
3494
|
...
|
|
2265
3495
|
|
|
2266
3496
|
def items(self):
|
|
2267
|
-
"""
|
|
3497
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
3498
|
+
dictionary function of the same name).
|
|
3499
|
+
|
|
3500
|
+
:return: custom property key, value pairs.
|
|
3501
|
+
"""
|
|
2268
3502
|
...
|
|
2269
3503
|
|
|
2270
|
-
def keyframe_delete(self):
|
|
2271
|
-
"""
|
|
3504
|
+
def keyframe_delete(self) -> bool:
|
|
3505
|
+
"""Remove a keyframe from this properties fcurve.
|
|
3506
|
+
|
|
3507
|
+
:return: Success of keyframe deletion.
|
|
3508
|
+
:rtype: bool
|
|
3509
|
+
"""
|
|
2272
3510
|
...
|
|
2273
3511
|
|
|
2274
|
-
def keyframe_insert(self):
|
|
2275
|
-
"""
|
|
3512
|
+
def keyframe_insert(self) -> bool:
|
|
3513
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
3514
|
+
|
|
3515
|
+
:return: Success of keyframe insertion.
|
|
3516
|
+
:rtype: bool
|
|
3517
|
+
"""
|
|
2276
3518
|
...
|
|
2277
3519
|
|
|
2278
3520
|
def keys(self):
|
|
2279
|
-
"""
|
|
3521
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
3522
|
+
dictionary function of the same name).
|
|
3523
|
+
|
|
3524
|
+
:return: custom property keys.
|
|
3525
|
+
"""
|
|
2280
3526
|
...
|
|
2281
3527
|
|
|
2282
|
-
def path_from_id(self):
|
|
2283
|
-
"""
|
|
3528
|
+
def path_from_id(self) -> str:
|
|
3529
|
+
"""Returns the data path from the ID to this object (string).
|
|
3530
|
+
|
|
3531
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
3532
|
+
to this struct and property (when given).
|
|
3533
|
+
:rtype: str
|
|
3534
|
+
"""
|
|
2284
3535
|
...
|
|
2285
3536
|
|
|
2286
3537
|
def path_menu(
|
|
2287
3538
|
self,
|
|
2288
|
-
searchpaths,
|
|
2289
|
-
operator,
|
|
2290
|
-
props_default,
|
|
2291
|
-
prop_filepath,
|
|
2292
|
-
filter_ext,
|
|
2293
|
-
filter_path,
|
|
2294
|
-
display_name,
|
|
2295
|
-
add_operator,
|
|
2296
|
-
add_operator_props,
|
|
3539
|
+
searchpaths: list[str],
|
|
3540
|
+
operator: str,
|
|
3541
|
+
props_default: dict = None,
|
|
3542
|
+
prop_filepath: str = "filepath",
|
|
3543
|
+
filter_ext: typing.Callable = None,
|
|
3544
|
+
filter_path=None,
|
|
3545
|
+
display_name: typing.Callable = None,
|
|
3546
|
+
add_operator=None,
|
|
3547
|
+
add_operator_props=None,
|
|
2297
3548
|
):
|
|
2298
|
-
"""
|
|
3549
|
+
"""Populate a menu from a list of paths.
|
|
2299
3550
|
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
3551
|
+
:param searchpaths: Paths to scan.
|
|
3552
|
+
:type searchpaths: list[str]
|
|
3553
|
+
:param operator: The operator id to use with each file.
|
|
3554
|
+
:type operator: str
|
|
3555
|
+
:param props_default: Properties to assign to each operator.
|
|
3556
|
+
:type props_default: dict
|
|
3557
|
+
:param prop_filepath: Optional operator filepath property (defaults to "filepath").
|
|
3558
|
+
:type prop_filepath: str
|
|
3559
|
+
:param filter_ext: Optional callback that takes the file extensions.
|
|
3560
|
+
|
|
3561
|
+
Returning false excludes the file from the list.
|
|
3562
|
+
:type filter_ext: typing.Callable
|
|
3563
|
+
:param filter_path:
|
|
3564
|
+
:param display_name: Optional callback that takes the full path, returns the name to display.
|
|
3565
|
+
:type display_name: typing.Callable
|
|
3566
|
+
:param add_operator:
|
|
3567
|
+
:param add_operator_props:
|
|
2309
3568
|
"""
|
|
2310
3569
|
...
|
|
2311
3570
|
|
|
2312
3571
|
def path_resolve(self):
|
|
2313
|
-
""" """
|
|
3572
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
2314
3573
|
...
|
|
2315
3574
|
|
|
2316
3575
|
def pop(self):
|
|
2317
|
-
"""
|
|
3576
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
3577
|
+
when not found (matches Python's dictionary function of the same name).
|
|
3578
|
+
|
|
3579
|
+
"""
|
|
2318
3580
|
...
|
|
2319
3581
|
|
|
2320
3582
|
def prepend(self, draw_func):
|
|
2321
|
-
"""
|
|
3583
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
3584
|
+
the menus draw function
|
|
2322
3585
|
|
|
2323
|
-
|
|
3586
|
+
:param draw_func:
|
|
2324
3587
|
"""
|
|
2325
3588
|
...
|
|
2326
3589
|
|
|
2327
|
-
def property_overridable_library_set(self):
|
|
2328
|
-
"""
|
|
3590
|
+
def property_overridable_library_set(self) -> bool:
|
|
3591
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
3592
|
+
|
|
3593
|
+
:return: True when the overridable status of the property was successfully set.
|
|
3594
|
+
:rtype: bool
|
|
3595
|
+
"""
|
|
2329
3596
|
...
|
|
2330
3597
|
|
|
2331
3598
|
def property_unset(self):
|
|
2332
|
-
""" """
|
|
3599
|
+
"""Unset a property, will use default value afterward."""
|
|
2333
3600
|
...
|
|
2334
3601
|
|
|
2335
3602
|
def remove(self, draw_func):
|
|
2336
|
-
"""
|
|
3603
|
+
"""Remove a draw function that has been added to this menu
|
|
2337
3604
|
|
|
2338
3605
|
:param draw_func:
|
|
2339
3606
|
"""
|
|
2340
3607
|
...
|
|
2341
3608
|
|
|
2342
3609
|
def type_recast(self):
|
|
2343
|
-
"""
|
|
3610
|
+
"""Return a new instance, this is needed because types
|
|
3611
|
+
such as textures can be changed at runtime.
|
|
3612
|
+
|
|
3613
|
+
:return: a new instance of this object with the type initialized again.
|
|
3614
|
+
"""
|
|
2344
3615
|
...
|
|
2345
3616
|
|
|
2346
3617
|
def values(self):
|
|
2347
|
-
"""
|
|
3618
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
3619
|
+
dictionary function of the same name).
|
|
3620
|
+
|
|
3621
|
+
:return: custom property values.
|
|
3622
|
+
"""
|
|
2348
3623
|
...
|
|
2349
3624
|
|
|
2350
3625
|
class OUTLINER_PT_filter(bpy_types.Panel, bpy_types._GenericUI):
|
|
@@ -2366,22 +3641,35 @@ class OUTLINER_PT_filter(bpy_types.Panel, bpy_types._GenericUI):
|
|
|
2366
3641
|
""" """
|
|
2367
3642
|
|
|
2368
3643
|
def append(self, draw_func):
|
|
2369
|
-
"""
|
|
3644
|
+
"""Append a draw function to this menu,
|
|
3645
|
+
takes the same arguments as the menus draw function
|
|
2370
3646
|
|
|
2371
|
-
|
|
3647
|
+
:param draw_func:
|
|
2372
3648
|
"""
|
|
2373
3649
|
...
|
|
2374
3650
|
|
|
2375
|
-
def as_pointer(self):
|
|
2376
|
-
"""
|
|
3651
|
+
def as_pointer(self) -> int:
|
|
3652
|
+
"""Returns the memory address which holds a pointer to Blender's internal data
|
|
3653
|
+
|
|
3654
|
+
:return: int (memory address).
|
|
3655
|
+
:rtype: int
|
|
3656
|
+
"""
|
|
2377
3657
|
...
|
|
2378
3658
|
|
|
2379
|
-
def bl_rna_get_subclass(self):
|
|
2380
|
-
"""
|
|
3659
|
+
def bl_rna_get_subclass(self) -> bpy.types.Struct:
|
|
3660
|
+
"""
|
|
3661
|
+
|
|
3662
|
+
:return: The RNA type or default when not found.
|
|
3663
|
+
:rtype: bpy.types.Struct
|
|
3664
|
+
"""
|
|
2381
3665
|
...
|
|
2382
3666
|
|
|
2383
|
-
def bl_rna_get_subclass_py(self):
|
|
2384
|
-
"""
|
|
3667
|
+
def bl_rna_get_subclass_py(self) -> typing.Any:
|
|
3668
|
+
"""
|
|
3669
|
+
|
|
3670
|
+
:return: The class or default when not found.
|
|
3671
|
+
:rtype: typing.Any
|
|
3672
|
+
"""
|
|
2385
3673
|
...
|
|
2386
3674
|
|
|
2387
3675
|
def draw(self, context):
|
|
@@ -2391,106 +3679,179 @@ class OUTLINER_PT_filter(bpy_types.Panel, bpy_types._GenericUI):
|
|
|
2391
3679
|
"""
|
|
2392
3680
|
...
|
|
2393
3681
|
|
|
2394
|
-
def driver_add(self):
|
|
2395
|
-
"""
|
|
3682
|
+
def driver_add(self) -> bpy.types.FCurve:
|
|
3683
|
+
"""Adds driver(s) to the given property
|
|
3684
|
+
|
|
3685
|
+
:return: The driver(s) added.
|
|
3686
|
+
:rtype: bpy.types.FCurve
|
|
3687
|
+
"""
|
|
2396
3688
|
...
|
|
2397
3689
|
|
|
2398
|
-
def driver_remove(self):
|
|
2399
|
-
"""
|
|
3690
|
+
def driver_remove(self) -> bool:
|
|
3691
|
+
"""Remove driver(s) from the given property
|
|
3692
|
+
|
|
3693
|
+
:return: Success of driver removal.
|
|
3694
|
+
:rtype: bool
|
|
3695
|
+
"""
|
|
2400
3696
|
...
|
|
2401
3697
|
|
|
2402
3698
|
def get(self):
|
|
2403
|
-
"""
|
|
3699
|
+
"""Returns the value of the custom property assigned to key or default
|
|
3700
|
+
when not found (matches Python's dictionary function of the same name).
|
|
3701
|
+
|
|
3702
|
+
"""
|
|
2404
3703
|
...
|
|
2405
3704
|
|
|
2406
3705
|
def id_properties_clear(self):
|
|
2407
|
-
"""
|
|
3706
|
+
"""
|
|
3707
|
+
|
|
3708
|
+
:return: Remove the parent group for an RNA struct's custom IDProperties.
|
|
3709
|
+
"""
|
|
2408
3710
|
...
|
|
2409
3711
|
|
|
2410
3712
|
def id_properties_ensure(self):
|
|
2411
|
-
"""
|
|
3713
|
+
"""
|
|
3714
|
+
|
|
3715
|
+
:return: the parent group for an RNA struct's custom IDProperties.
|
|
3716
|
+
"""
|
|
2412
3717
|
...
|
|
2413
3718
|
|
|
2414
3719
|
def id_properties_ui(self):
|
|
2415
|
-
"""
|
|
3720
|
+
"""
|
|
3721
|
+
|
|
3722
|
+
:return: Return an object used to manage an IDProperty's UI data.
|
|
3723
|
+
"""
|
|
2416
3724
|
...
|
|
2417
3725
|
|
|
2418
3726
|
def is_extended(self):
|
|
2419
3727
|
""" """
|
|
2420
3728
|
...
|
|
2421
3729
|
|
|
2422
|
-
def is_property_hidden(self):
|
|
2423
|
-
"""
|
|
3730
|
+
def is_property_hidden(self) -> bool:
|
|
3731
|
+
"""Check if a property is hidden.
|
|
3732
|
+
|
|
3733
|
+
:return: True when the property is hidden.
|
|
3734
|
+
:rtype: bool
|
|
3735
|
+
"""
|
|
2424
3736
|
...
|
|
2425
3737
|
|
|
2426
|
-
def is_property_overridable_library(self):
|
|
2427
|
-
"""
|
|
3738
|
+
def is_property_overridable_library(self) -> bool:
|
|
3739
|
+
"""Check if a property is overridable.
|
|
3740
|
+
|
|
3741
|
+
:return: True when the property is overridable.
|
|
3742
|
+
:rtype: bool
|
|
3743
|
+
"""
|
|
2428
3744
|
...
|
|
2429
3745
|
|
|
2430
|
-
def is_property_readonly(self):
|
|
2431
|
-
"""
|
|
3746
|
+
def is_property_readonly(self) -> bool:
|
|
3747
|
+
"""Check if a property is readonly.
|
|
3748
|
+
|
|
3749
|
+
:return: True when the property is readonly (not writable).
|
|
3750
|
+
:rtype: bool
|
|
3751
|
+
"""
|
|
2432
3752
|
...
|
|
2433
3753
|
|
|
2434
|
-
def is_property_set(self):
|
|
2435
|
-
"""
|
|
3754
|
+
def is_property_set(self) -> bool:
|
|
3755
|
+
"""Check if a property is set, use for testing operator properties.
|
|
3756
|
+
|
|
3757
|
+
:return: True when the property has been set.
|
|
3758
|
+
:rtype: bool
|
|
3759
|
+
"""
|
|
2436
3760
|
...
|
|
2437
3761
|
|
|
2438
3762
|
def items(self):
|
|
2439
|
-
"""
|
|
3763
|
+
"""Returns the items of this objects custom properties (matches Python's
|
|
3764
|
+
dictionary function of the same name).
|
|
3765
|
+
|
|
3766
|
+
:return: custom property key, value pairs.
|
|
3767
|
+
"""
|
|
2440
3768
|
...
|
|
2441
3769
|
|
|
2442
|
-
def keyframe_delete(self):
|
|
2443
|
-
"""
|
|
3770
|
+
def keyframe_delete(self) -> bool:
|
|
3771
|
+
"""Remove a keyframe from this properties fcurve.
|
|
3772
|
+
|
|
3773
|
+
:return: Success of keyframe deletion.
|
|
3774
|
+
:rtype: bool
|
|
3775
|
+
"""
|
|
2444
3776
|
...
|
|
2445
3777
|
|
|
2446
|
-
def keyframe_insert(self):
|
|
2447
|
-
"""
|
|
3778
|
+
def keyframe_insert(self) -> bool:
|
|
3779
|
+
"""Insert a keyframe on the property given, adding fcurves and animation data when necessary.
|
|
3780
|
+
|
|
3781
|
+
:return: Success of keyframe insertion.
|
|
3782
|
+
:rtype: bool
|
|
3783
|
+
"""
|
|
2448
3784
|
...
|
|
2449
3785
|
|
|
2450
3786
|
def keys(self):
|
|
2451
|
-
"""
|
|
3787
|
+
"""Returns the keys of this objects custom properties (matches Python's
|
|
3788
|
+
dictionary function of the same name).
|
|
3789
|
+
|
|
3790
|
+
:return: custom property keys.
|
|
3791
|
+
"""
|
|
2452
3792
|
...
|
|
2453
3793
|
|
|
2454
|
-
def path_from_id(self):
|
|
2455
|
-
"""
|
|
3794
|
+
def path_from_id(self) -> str:
|
|
3795
|
+
"""Returns the data path from the ID to this object (string).
|
|
3796
|
+
|
|
3797
|
+
:return: The path from `bpy.types.bpy_struct.id_data`
|
|
3798
|
+
to this struct and property (when given).
|
|
3799
|
+
:rtype: str
|
|
3800
|
+
"""
|
|
2456
3801
|
...
|
|
2457
3802
|
|
|
2458
3803
|
def path_resolve(self):
|
|
2459
|
-
""" """
|
|
3804
|
+
"""Returns the property from the path, raise an exception when not found."""
|
|
2460
3805
|
...
|
|
2461
3806
|
|
|
2462
3807
|
def pop(self):
|
|
2463
|
-
"""
|
|
3808
|
+
"""Remove and return the value of the custom property assigned to key or default
|
|
3809
|
+
when not found (matches Python's dictionary function of the same name).
|
|
3810
|
+
|
|
3811
|
+
"""
|
|
2464
3812
|
...
|
|
2465
3813
|
|
|
2466
3814
|
def prepend(self, draw_func):
|
|
2467
|
-
"""
|
|
3815
|
+
"""Prepend a draw function to this menu, takes the same arguments as
|
|
3816
|
+
the menus draw function
|
|
2468
3817
|
|
|
2469
|
-
|
|
3818
|
+
:param draw_func:
|
|
2470
3819
|
"""
|
|
2471
3820
|
...
|
|
2472
3821
|
|
|
2473
|
-
def property_overridable_library_set(self):
|
|
2474
|
-
"""
|
|
3822
|
+
def property_overridable_library_set(self) -> bool:
|
|
3823
|
+
"""Define a property as overridable or not (only for custom properties!).
|
|
3824
|
+
|
|
3825
|
+
:return: True when the overridable status of the property was successfully set.
|
|
3826
|
+
:rtype: bool
|
|
3827
|
+
"""
|
|
2475
3828
|
...
|
|
2476
3829
|
|
|
2477
3830
|
def property_unset(self):
|
|
2478
|
-
""" """
|
|
3831
|
+
"""Unset a property, will use default value afterward."""
|
|
2479
3832
|
...
|
|
2480
3833
|
|
|
2481
3834
|
def remove(self, draw_func):
|
|
2482
|
-
"""
|
|
3835
|
+
"""Remove a draw function that has been added to this menu
|
|
2483
3836
|
|
|
2484
3837
|
:param draw_func:
|
|
2485
3838
|
"""
|
|
2486
3839
|
...
|
|
2487
3840
|
|
|
2488
3841
|
def type_recast(self):
|
|
2489
|
-
"""
|
|
3842
|
+
"""Return a new instance, this is needed because types
|
|
3843
|
+
such as textures can be changed at runtime.
|
|
3844
|
+
|
|
3845
|
+
:return: a new instance of this object with the type initialized again.
|
|
3846
|
+
"""
|
|
2490
3847
|
...
|
|
2491
3848
|
|
|
2492
3849
|
def values(self):
|
|
2493
|
-
"""
|
|
3850
|
+
"""Returns the values of this objects custom properties (matches Python's
|
|
3851
|
+
dictionary function of the same name).
|
|
3852
|
+
|
|
3853
|
+
:return: custom property values.
|
|
3854
|
+
"""
|
|
2494
3855
|
...
|
|
2495
3856
|
|
|
2496
3857
|
def has_selected_ids_in_context(context):
|