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:
authorDalai Felinto <dfelinto@gmail.com>2018-10-05 17:51:04 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-10-05 18:37:07 +0300
commit149e912b1fa84b2d008c52c1ed13334fa7eeb7b5 (patch)
treec4361bc1689f2ae9ed8bce5d0a205b97c73a0bd5 /source/blender/makesrna/intern/rna_userdef.c
parenteab00bf2025284249c97c62b53a49a0d36cba54e (diff)
Special enum item when no sound is found
This happens when you build without sound libraries and such. Without that the console is spammed with tons of RNA messages because the enum is empty.
Diffstat (limited to 'source/blender/makesrna/intern/rna_userdef.c')
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index a2840b0443c..5eee0ccec37 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -486,6 +486,13 @@ static const EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C
RNA_enum_item_add(&item, &totitem, &new_item);
}
+#ifndef NDEBUG
+ if (i == 0) {
+ EnumPropertyItem new_item = {i, "SOUND_NONE", 0, "No Sound", ""};
+ RNA_enum_item_add(&item, &totitem, &new_item);
+ }
+#endif
+
/* may be unused */
UNUSED_VARS(index, audio_device_items);