Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/file_draw.c
| Show First 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | else if (sfile->browse_mode == FILE_BROWSE_MODE_ASSETS && | ||||
| char blend_path[FILE_MAX_LIBEXTRA]; | char blend_path[FILE_MAX_LIBEXTRA]; | ||||
| if (BLO_library_path_explode(path, blend_path, NULL, NULL)) { | if (BLO_library_path_explode(path, blend_path, NULL, NULL)) { | ||||
| const FileAssetSelectParams *asset_params = ED_fileselect_get_asset_params(sfile); | const FileAssetSelectParams *asset_params = ED_fileselect_get_asset_params(sfile); | ||||
| BLI_assert(asset_params != NULL); | BLI_assert(asset_params != NULL); | ||||
| UI_but_drag_set_asset(but, | UI_but_drag_set_asset(but, | ||||
| &(AssetHandle){.file_data = file}, | &(AssetHandle){.file_data = file}, | ||||
| BLI_strdup(blend_path), | BLI_strdup(blend_path), | ||||
| file->asset_data, | |||||
| asset_params->import_type, | asset_params->import_type, | ||||
| icon, | icon, | ||||
| preview_image, | preview_image, | ||||
| UI_DPI_FAC); | UI_DPI_FAC); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| /* path is no more static, cannot give it directly to but... */ | /* path is no more static, cannot give it directly to but... */ | ||||
| ▲ Show 20 Lines • Show All 298 Lines • ▼ Show 20 Lines | else if (sfile->browse_mode == FILE_BROWSE_MODE_ASSETS && | ||||
| if (BLO_library_path_explode(path, blend_path, NULL, NULL)) { | if (BLO_library_path_explode(path, blend_path, NULL, NULL)) { | ||||
| const FileAssetSelectParams *asset_params = ED_fileselect_get_asset_params(sfile); | const FileAssetSelectParams *asset_params = ED_fileselect_get_asset_params(sfile); | ||||
| BLI_assert(asset_params != NULL); | BLI_assert(asset_params != NULL); | ||||
| UI_but_drag_set_asset(but, | UI_but_drag_set_asset(but, | ||||
| &(AssetHandle){.file_data = file}, | &(AssetHandle){.file_data = file}, | ||||
| BLI_strdup(blend_path), | BLI_strdup(blend_path), | ||||
| file->asset_data, | |||||
| asset_params->import_type, | asset_params->import_type, | ||||
| icon, | icon, | ||||
| imb, | imb, | ||||
| scale); | scale); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| UI_but_drag_set_image(but, BLI_strdup(path), icon, imb, scale, true); | UI_but_drag_set_image(but, BLI_strdup(path), icon, imb, scale, true); | ||||
| ▲ Show 20 Lines • Show All 603 Lines • Show Last 20 Lines | |||||