Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/filesel.c
| Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | static void fileselect_ensure_updated_asset_params(SpaceFile *sfile) | ||||
| FileAssetSelectParams *asset_params = sfile->asset_params; | FileAssetSelectParams *asset_params = sfile->asset_params; | ||||
| if (!asset_params) { | if (!asset_params) { | ||||
| asset_params = sfile->asset_params = MEM_callocN(sizeof(*asset_params), | asset_params = sfile->asset_params = MEM_callocN(sizeof(*asset_params), | ||||
| "FileAssetSelectParams"); | "FileAssetSelectParams"); | ||||
| asset_params->base_params.details_flags = U_default.file_space_data.details_flags; | asset_params->base_params.details_flags = U_default.file_space_data.details_flags; | ||||
| asset_params->asset_library_ref.type = ASSET_LIBRARY_LOCAL; | asset_params->asset_library_ref.type = ASSET_LIBRARY_LOCAL; | ||||
| asset_params->asset_library_ref.custom_library_index = -1; | asset_params->asset_library_ref.custom_library_index = -1; | ||||
| asset_params->import_type = FILE_ASSET_IMPORT_APPEND; | asset_params->import_type = FILE_ASSET_IMPORT_APPEND_REUSE; | ||||
| } | } | ||||
| FileSelectParams *base_params = &asset_params->base_params; | FileSelectParams *base_params = &asset_params->base_params; | ||||
| base_params->file[0] = '\0'; | base_params->file[0] = '\0'; | ||||
| base_params->filter_glob[0] = '\0'; | base_params->filter_glob[0] = '\0'; | ||||
| /* TODO: this way of using filters to form categories is notably slower than specifying a | /* TODO: this way of using filters to form categories is notably slower than specifying a | ||||
| * "group" to read. That's because all types are read and filtering is applied afterwards. Would | * "group" to read. That's because all types are read and filtering is applied afterwards. Would | ||||
| * be nice if we could lazy-read individual groups. */ | * be nice if we could lazy-read individual groups. */ | ||||
| ▲ Show 20 Lines • Show All 1,220 Lines • Show Last 20 Lines | |||||