[Bf-blender-cvs] [eb48eeba841] blender2.8: Expose rna_translate_ui_text to be used for interface templates
Dalai Felinto
noreply at git.blender.org
Wed Jul 5 17:58:44 CEST 2017
Commit: eb48eeba8414b77463319236ae9e8ae19d74c4c9
Author: Dalai Felinto
Date: Wed Jul 5 14:43:43 2017 +0200
Branches: blender2.8
https://developer.blender.org/rBeb48eeba8414b77463319236ae9e8ae19d74c4c9
Expose rna_translate_ui_text to be used for interface templates
===================================================================
M source/blender/makesrna/RNA_access.h
M source/blender/makesrna/intern/rna_access.c
M source/blender/makesrna/intern/rna_internal.h
M source/blender/makesrna/intern/rna_ui_api.c
===================================================================
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index d1a76d8b216..a07cb86fdf7 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 8f333b3af15..f349d4a44dc 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -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;
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 7b8073d80b8..7a5d3613cff 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -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);
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index b6abc417651..76ff2915276 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -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. */
More information about the Bf-blender-cvs
mailing list