From db6f1f52a713323cf852a908de64a3ee6f066076 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Jul 2010 04:02:09 +0000 Subject: [PATCH] bugfix [#22027] Group disappears in render after adding a group instance --- source/blender/editors/object/object_add.c | 5 ++++- source/blender/python/intern/bpy_interface.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 1f4aff08183..e08661b1795 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -756,7 +756,10 @@ static int group_instance_add_exec(bContext *C, wmOperator *op) ob->transflag |= OB_DUPLIGROUP; id_lib_extern(&group->id); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + /* works without this except if you try render right after, see: 22027 */ + DAG_scene_sort(CTX_data_scene(C)); + + WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, CTX_data_scene(C)); return OPERATOR_FINISHED; } diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index d01eaa56d34..5f2f37be062 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -207,7 +207,9 @@ void BPY_start_python_path(void) { static wchar_t py_path_bundle_wchar[FILE_MAX]; - /* mbstowcs(py_path_bundle_wchar, py_path_bundle, FILE_MAXDIR); */ /* cant use this, on linux gives bug: #23018 */ + /* cant use this, on linux gives bug: #23018, TODO: try LANG="en_US.UTF-8" /usr/bin/blender, suggested 22008 */ + /* mbstowcs(py_path_bundle_wchar, py_path_bundle, FILE_MAXDIR); */ + utf8towchar(py_path_bundle_wchar, py_path_bundle); Py_SetPythonHome(py_path_bundle_wchar);