fix for incorrect prints with RNA errors (own fault, CONTAINER_RNA_ID was incorrect) & close keymap file after running.
This commit is contained in:
@@ -352,7 +352,9 @@ def keyconfig_set(filepath):
|
||||
keyconfigs_old = keyconfigs[:]
|
||||
|
||||
try:
|
||||
exec(compile(open(filepath).read(), filepath, 'exec'), {"__file__": filepath})
|
||||
file = open(filepath)
|
||||
exec(compile(file.read(), filepath, 'exec'), {"__file__": filepath})
|
||||
file.close()
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
@@ -346,6 +346,6 @@ struct BlenderRNA {
|
||||
ListBase structs;
|
||||
};
|
||||
|
||||
#define CONTAINER_RNA_ID(cont) (const char *)(((ContainerRNA *)(cont))+1)
|
||||
#define CONTAINER_RNA_ID(cont) (*(const char **)(((ContainerRNA *)(cont))+1))
|
||||
|
||||
#endif /* RNA_INTERNAL_TYPES_H */
|
||||
|
||||
@@ -235,7 +235,7 @@ void BPY_python_start(int argc, const char **argv)
|
||||
utf8towchar(bprogname_wchar, bprogname);
|
||||
Py_SetProgramName(bprogname_wchar);
|
||||
|
||||
/* builtin modules */
|
||||
/* must run before python initializes */
|
||||
PyImport_ExtendInittab(bpy_internal_modules);
|
||||
|
||||
bpy_python_start_path(); /* allow to use our own included python */
|
||||
@@ -264,7 +264,8 @@ void BPY_python_start(int argc, const char **argv)
|
||||
#else
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
|
||||
/* must run before python initializes */
|
||||
PyImport_ExtendInittab(bpy_internal_modules);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user