Expose rna_translate_ui_text to be used for interface templates
This commit is contained in:
parent
bdeeb29482
commit
eb48eeba84
|
@ -1197,6 +1197,10 @@ int RNA_function_call_direct_va(struct bContext *C, struct ReportList *reports,
|
|||
int RNA_function_call_direct_va_lookup(struct bContext *C, struct ReportList *reports, PointerRNA *ptr,
|
||||
const char *identifier, const char *format, va_list args);
|
||||
|
||||
const char *RNA_translate_ui_text(const char *text, const char *text_ctxt,
|
||||
struct StructRNA *type, struct PropertyRNA *prop,
|
||||
int translate);
|
||||
|
||||
/* ID */
|
||||
|
||||
short RNA_type_to_ID_code(const StructRNA *type);
|
||||
|
|
|
@ -6720,6 +6720,13 @@ int RNA_function_call_direct_va_lookup(bContext *C, ReportList *reports, Pointer
|
|||
return 0;
|
||||
}
|
||||
|
||||
const char *RNA_translate_ui_text(
|
||||
const char *text, const char *text_ctxt, StructRNA *type, PropertyRNA *prop,
|
||||
int translate)
|
||||
{
|
||||
return rna_translate_ui_text(text, text_ctxt, type, prop, translate);
|
||||
}
|
||||
|
||||
bool RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index)
|
||||
{
|
||||
int len;
|
||||
|
|
|
@ -420,6 +420,8 @@ void rna_mtex_texture_slots_clear(struct ID *self, struct bContext *C, struct Re
|
|||
|
||||
int rna_IDMaterials_assign_int(struct PointerRNA *ptr, int key, const struct PointerRNA *assign_ptr);
|
||||
|
||||
const char *rna_translate_ui_text(
|
||||
const char *text, const char *text_ctxt, struct StructRNA *type, struct PropertyRNA *prop, int translate);
|
||||
|
||||
/* Internal functions that cycles uses so we need to declare (tsk tsk) */
|
||||
void rna_RenderLayer_rect_set(PointerRNA *ptr, const float *values);
|
||||
|
|
|
@ -60,7 +60,7 @@ EnumPropertyItem rna_enum_icon_items[] = {
|
|||
|
||||
#ifdef RNA_RUNTIME
|
||||
|
||||
static const char *rna_translate_ui_text(const char *text, const char *text_ctxt, StructRNA *type, PropertyRNA *prop,
|
||||
const char *rna_translate_ui_text(const char *text, const char *text_ctxt, StructRNA *type, PropertyRNA *prop,
|
||||
int translate)
|
||||
{
|
||||
/* Also return text if UI labels translation is disabled. */
|
||||
|
|
Loading…
Reference in New Issue