Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-06-17 02:08:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-06-17 02:08:17 +0300
commit12da679fa094bdee5e0d55bac51a95a7abfc6d13 (patch)
treeb6ccfb4b19a1d6822297bcc65f74efefab429053
parente85635b8825f9ca52a43408b58c5f66c4e3742e6 (diff)
UI: remove redundant RNA_TYPE property in the key-map editor
-rw-r--r--.clang-format1
-rw-r--r--source/blender/editors/interface/interface_templates.c2
-rw-r--r--source/blender/makesrna/RNA_access.h11
3 files changed, 13 insertions, 1 deletions
diff --git a/.clang-format b/.clang-format
index 36c5643a52b..6286087c5e3 100644
--- a/.clang-format
+++ b/.clang-format
@@ -236,6 +236,7 @@ ForEachMacros:
- RNA_BEGIN
- RNA_PROP_BEGIN
- RNA_STRUCT_BEGIN
+ - RNA_STRUCT_BEGIN_SKIP_RNA_TYPE
- SEQP_BEGIN
- SEQ_BEGIN
- foreach
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 58d352ac8d1..5d3ef5c625e 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -6450,7 +6450,7 @@ static void template_keymap_item_properties(uiLayout *layout, const char *title,
flow = uiLayoutColumnFlow(layout, 2, false);
- RNA_STRUCT_BEGIN (ptr, prop) {
+ RNA_STRUCT_BEGIN_SKIP_RNA_TYPE (ptr, prop) {
const bool is_set = RNA_property_is_set(ptr, prop);
uiBut *but;
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 9316f27eb66..5045137fd95 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -1264,6 +1264,17 @@ void RNA_collection_clear(PointerRNA *ptr, const char *name);
RNA_property_collection_next(&rna_macro_iter)) { \
PropertyRNA *prop = (PropertyRNA *)rna_macro_iter.ptr.data;
+#define RNA_STRUCT_BEGIN_SKIP_RNA_TYPE(sptr, prop) \
+ { \
+ CollectionPropertyIterator rna_macro_iter; \
+ RNA_property_collection_begin( \
+ sptr, RNA_struct_iterator_property((sptr)->type), &rna_macro_iter); \
+ if (rna_macro_iter.valid) { \
+ RNA_property_collection_next(&rna_macro_iter); \
+ } \
+ for (; rna_macro_iter.valid; RNA_property_collection_next(&rna_macro_iter)) { \
+ PropertyRNA *prop = (PropertyRNA *)rna_macro_iter.ptr.data;
+
#define RNA_STRUCT_END \
} \
RNA_property_collection_end(&rna_macro_iter); \