svn merge ^/trunk/blender -r40405:40431

This commit is contained in:
2011-09-23 11:30:55 +00:00
92 changed files with 644 additions and 677 deletions

View File

@@ -95,4 +95,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}")

View File

@@ -79,7 +79,7 @@ static void atexit_func_call(const char *func_name, PyObject *atexit_func_arg)
void BPY_atexit_register(void)
{
/* atexit module owns this new function reference */
BLI_assert(func_bpy_atregister ==NULL);
BLI_assert(func_bpy_atregister == NULL);
func_bpy_atregister= (PyObject *)PyCFunction_New(&meth_bpy_atexit, NULL);
atexit_func_call("register", func_bpy_atregister);
@@ -87,6 +87,8 @@ void BPY_atexit_register(void)
void BPY_atexit_unregister(void)
{
BLI_assert(func_bpy_atregister != NULL);
atexit_func_call("unregister", func_bpy_atregister);
func_bpy_atregister= NULL; /* don't really need to set but just incase */
}

View File

@@ -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}};

View File

@@ -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);