diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-01 08:23:55 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-02 08:58:44 +0300 |
commit | 428a1aaf7372aaad793fe7cc03128db18e3ae602 (patch) | |
tree | 8ff7b138f3d666d9533e63b448519611c673d009 /source/blender/python/intern/bpy_rna_types_capi.c | |
parent | 89ed6b12936bc2a89b18cf6dbd7b86e0fbc760d3 (diff) |
UI: add back Layout.introspect
Add back this function, removed 2e14b7fb9770b.
Useful for checking operators used in menus.
Diffstat (limited to 'source/blender/python/intern/bpy_rna_types_capi.c')
-rw-r--r-- | source/blender/python/intern/bpy_rna_types_capi.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_rna_types_capi.c b/source/blender/python/intern/bpy_rna_types_capi.c index 5a2ba4a5cdb..30623724593 100644 --- a/source/blender/python/intern/bpy_rna_types_capi.c +++ b/source/blender/python/intern/bpy_rna_types_capi.c @@ -38,6 +38,7 @@ #include "bpy_rna_callback.h" #include "bpy_rna_id_collection.h" #include "bpy_rna_types_capi.h" +#include "bpy_rna_ui.h" #include "../generic/py_capi_utils.h" @@ -73,6 +74,17 @@ static struct PyMethodDef pyrna_blenddatalibraries_methods[] = { /** \} */ /* -------------------------------------------------------------------- */ +/** \name UI Layout + * \{ */ + +static struct PyMethodDef pyrna_uilayout_methods[] = { + {NULL, NULL, 0, NULL}, /* #BPY_rna_uilayout_introspect_method_def */ + {NULL, NULL, 0, NULL}, +}; + +/** \} */ + +/* -------------------------------------------------------------------- */ /** \name Window Manager Clipboard Property * * Avoid using the RNA API because this value may change between checking it's length @@ -205,6 +217,11 @@ void BPY_rna_types_extend_capi(void) BLI_assert(ARRAY_SIZE(pyrna_blenddatalibraries_methods) == 3); pyrna_struct_type_extend_capi(&RNA_BlendDataLibraries, pyrna_blenddatalibraries_methods, NULL); + /* uiLayout */ + ARRAY_SET_ITEMS(pyrna_uilayout_methods, BPY_rna_uilayout_introspect_method_def); + BLI_assert(ARRAY_SIZE(pyrna_uilayout_methods) == 2); + pyrna_struct_type_extend_capi(&RNA_UILayout, pyrna_uilayout_methods, NULL); + /* Space */ pyrna_struct_type_extend_capi(&RNA_Space, pyrna_space_methods, NULL); |