diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 5 | ||||
-rw-r--r-- | source/tests/batch_import.py | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 543ddebe61f..632018f2bf0 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -765,6 +765,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult * //result->ptr = ((BPy_StructRNA *)item)->ptr; CTX_data_pointer_set(result, ptr->id.data, ptr->type, ptr->data); + CTX_data_type_set(result, CTX_DATA_TYPE_POINTER); done = true; } else if (PySequence_Check(item)) { @@ -795,12 +796,12 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult * } Py_DECREF(seq_fast); - + CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION); done = true; } } - if (done == 0) { + if (done == false) { if (item) printf("PyContext '%s' not a valid type\n", member); else printf("PyContext '%s' not found\n", member); } diff --git a/source/tests/batch_import.py b/source/tests/batch_import.py index 77595bd091f..a2c5fb59055 100644 --- a/source/tests/batch_import.py +++ b/source/tests/batch_import.py @@ -134,8 +134,7 @@ def batch_import(operator="", print("\tSaving: %r" % fout_blend) fout_dir = os.path.dirname(fout_blend) - if not os.path.exists(fout_dir): - os.makedirs(fout_dir) + os.makedirs(fout_dir, exist_ok=True) bpy.ops.wm.save_as_mainfile(filepath=fout_blend) |