me-main #1

Merged
Nate Rupsis merged 123 commits from me-main into main 2023-02-13 18:39:11 +01:00
Showing only changes of commit c2c62c3618 - Show all commits

View File

@ -762,6 +762,13 @@ static const EnumPropertyItem *rna_lang_enum_properties_itemf(bContext *UNUSED(C
}
return items;
}
# else
static int rna_lang_enum_properties_get_no_international(PointerRNA *UNUSED(ptr))
{
/* This simply prevents warnings when accessing language
* (since the actual value wont be in the enum, unless already `DEFAULT`). */
return 0;
}
# endif
static IDProperty **rna_AddonPref_idprops(PointerRNA *ptr)
@ -4880,6 +4887,8 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_enum_items(prop, rna_enum_language_default_items);
# ifdef WITH_INTERNATIONAL
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_lang_enum_properties_itemf");
# else
RNA_def_property_enum_funcs(prop, "rna_lang_enum_properties_get_no_international", NULL, NULL);
# endif
RNA_def_property_ui_text(prop, "Language", "Language used for translation");
RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");