diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake index d2b791baede..f09a8058f14 100644 --- a/build_files/cmake/config/blender_lite.cmake +++ b/build_files/cmake/config/blender_lite.cmake @@ -1,4 +1,4 @@ -# turn everything OFF CACHE FORCE BOOL) except for python which defaults to ON +# turn everything OFF except for python which defaults to ON # and is needed for the UI # # Example usage: diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 4dd97c63d40..a34335a031d 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -621,25 +621,31 @@ void file_sfile_to_operator(wmOperator *op, SpaceFile *sfile, char *filepath) } /* some ops have multiple files to select */ + /* this is called on operators check() so clear collections first since + * they may be already set. */ { PointerRNA itemptr; + PropertyRNA *prop_files= RNA_struct_find_property(op->ptr, "files"); + PropertyRNA *prop_dirs= RNA_struct_find_property(op->ptr, "dirs"); int i, numfiles = filelist_numfiles(sfile->files); - if(RNA_struct_find_property(op->ptr, "files")) { + if(prop_files) { + RNA_property_collection_clear(op->ptr, prop_files); for (i=0; ifiles, i, CHECK_FILES)) { struct direntry *file= filelist_file(sfile->files, i); - RNA_collection_add(op->ptr, "files", &itemptr); + RNA_property_collection_add(op->ptr, prop_files, &itemptr); RNA_string_set(&itemptr, "name", file->relname); } } } - - if(RNA_struct_find_property(op->ptr, "dirs")) { + + if(prop_dirs) { + RNA_property_collection_clear(op->ptr, prop_dirs); for (i=0; ifiles, i, CHECK_DIRS)) { struct direntry *file= filelist_file(sfile->files, i); - RNA_collection_add(op->ptr, "dirs", &itemptr); + RNA_property_collection_add(op->ptr, prop_dirs, &itemptr); RNA_string_set(&itemptr, "name", file->relname); } } diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 72553872057..831d6a281ee 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -4320,7 +4320,6 @@ static PyObject *small_dict_get_item_string(PyObject *dict, const char *key_look Py_ssize_t pos = 0; PyObject *value = NULL; - /* case not, search for it in the script's global dictionary */ while (PyDict_Next(dict, &pos, &key, &value)) { if(PyUnicode_Check(key)) { if(strcmp(key_lookup, _PyUnicode_AsString(key))==0) {