Merged changes in the trunk up to revision 40520.
This commit is contained in:
@@ -96,4 +96,8 @@ if(WITH_AUDASPACE)
|
||||
add_definitions(-DWITH_AUDASPACE)
|
||||
endif()
|
||||
|
||||
if(WITH_INTERNATIONAL)
|
||||
add_definitions(-DINTERNATIONAL)
|
||||
endif()
|
||||
|
||||
blender_add_lib(bf_python "${SRC}" "${INC}" "${INC_SYS}")
|
||||
|
||||
@@ -72,6 +72,7 @@ static EnumPropertyItem property_subtype_string_items[]= {
|
||||
{PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""},
|
||||
{PROP_DIRPATH, "DIR_PATH", 0, "Directory Path", ""},
|
||||
{PROP_FILENAME, "FILENAME", 0, "Filename", ""},
|
||||
{PROP_TRANSLATE, "TRANSLATE", 0, "Translate", ""},
|
||||
|
||||
{PROP_NONE, "NONE", 0, "None", ""},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
@@ -73,6 +73,10 @@
|
||||
#include "../generic/IDProp.h" /* for IDprop lookups */
|
||||
#include "../generic/py_capi_utils.h"
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
#include "UI_interface.h" /* bad level call into editors */
|
||||
#endif
|
||||
|
||||
#define USE_PEDANTIC_WRITE
|
||||
#define USE_MATHUTILS
|
||||
#define USE_STRING_COERCE
|
||||
@@ -1519,6 +1523,12 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
|
||||
}
|
||||
else {
|
||||
param= _PyUnicode_AsString(value);
|
||||
#ifdef INTERNATIONAL
|
||||
if(subtype == PROP_TRANSLATE) {
|
||||
param= UI_translate_do_iface(param);
|
||||
}
|
||||
#endif // INTERNATIONAL
|
||||
|
||||
}
|
||||
#else // USE_STRING_COERCE
|
||||
param= _PyUnicode_AsString(value);
|
||||
|
||||
Reference in New Issue
Block a user