RNA: expose the language enum to Python scripts
As far as I know it wasn't possible for scripts to access language ID's and their names using documented API's. Ref !147769
This commit is contained in:
@@ -5340,6 +5340,8 @@ static void rna_def_userdef_view(BlenderRNA *brna)
|
||||
/* Language. */
|
||||
|
||||
prop = RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
|
||||
/* Set this flag so scripts can access language information at run-time via `enum_items`. */
|
||||
RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT);
|
||||
RNA_def_property_enum_items(prop, rna_enum_language_default_items);
|
||||
# ifdef WITH_INTERNATIONAL
|
||||
RNA_def_property_enum_funcs(prop, nullptr, nullptr, "rna_lang_enum_properties_itemf");
|
||||
|
||||
Reference in New Issue
Block a user