Fix BPY enum property definiton failing if items contain spaces
Mistake in 03a4d3c33f
, turns out this actually is called from BPY
(which I didn't think it was). So only error out during makesrna, not at
runtime.
This commit is contained in:
parent
406026abba
commit
dd416681fb
Notes:
blender-bot
2023-02-14 18:59:57 +01:00
Referenced by issue blender/blender-addons#74829, Blender crashes when switching to add-on tab
|
@ -1850,7 +1850,8 @@ void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item
|
|||
eprop->totitem++;
|
||||
|
||||
if (item[i].identifier[0]) {
|
||||
if (strstr(item[i].identifier, " ")) {
|
||||
/* Don't allow spaces in internal enum items (it's fine for Python ones). */
|
||||
if (DefRNA.preprocess && strstr(item[i].identifier, " ")) {
|
||||
CLOG_ERROR(&LOG,
|
||||
"\"%s.%s\", enum identifiers must not contain spaces.",
|
||||
srna->identifier,
|
||||
|
|
Loading…
Reference in New Issue