Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_asset.c
| Show All 11 Lines | |||||
| #include "DNA_asset_types.h" | #include "DNA_asset_types.h" | ||||
| #include "DNA_defs.h" | #include "DNA_defs.h" | ||||
| #include "DNA_space_types.h" | #include "DNA_space_types.h" | ||||
| #include "rna_internal.h" | #include "rna_internal.h" | ||||
| #ifdef RNA_RUNTIME | #ifdef RNA_RUNTIME | ||||
| # include "AS_asset_library.h" | |||||
| # include "BKE_asset.h" | # include "BKE_asset.h" | ||||
| # include "BKE_asset_library.h" | |||||
| # include "BKE_context.h" | # include "BKE_context.h" | ||||
| # include "BKE_idprop.h" | # include "BKE_idprop.h" | ||||
| # include "BLI_listbase.h" | # include "BLI_listbase.h" | ||||
| # include "BLI_uuid.h" | # include "BLI_uuid.h" | ||||
| # include "ED_asset.h" | # include "ED_asset.h" | ||||
| # include "ED_fileselect.h" | # include "ED_fileselect.h" | ||||
| ▲ Show 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | void rna_AssetMetaData_catalog_id_update(struct bContext *C, struct PointerRNA *ptr) | ||||
| AssetLibrary *asset_library = ED_fileselect_active_asset_library_get(sfile); | AssetLibrary *asset_library = ED_fileselect_active_asset_library_get(sfile); | ||||
| if (asset_library == NULL) { | if (asset_library == NULL) { | ||||
| /* The SpaceFile may not be an asset browser but a regular file browser. */ | /* The SpaceFile may not be an asset browser but a regular file browser. */ | ||||
| return; | return; | ||||
| } | } | ||||
| AssetMetaData *asset_data = ptr->data; | AssetMetaData *asset_data = ptr->data; | ||||
| BKE_asset_library_refresh_catalog_simplename(asset_library, asset_data); | AS_asset_library_refresh_catalog_simplename(asset_library, asset_data); | ||||
| } | } | ||||
| static PointerRNA rna_AssetHandle_file_data_get(PointerRNA *ptr) | static PointerRNA rna_AssetHandle_file_data_get(PointerRNA *ptr) | ||||
| { | { | ||||
| AssetHandle *asset_handle = ptr->data; | AssetHandle *asset_handle = ptr->data; | ||||
| /* Have to cast away const, but the file entry API doesn't allow modifications anyway. */ | /* Have to cast away const, but the file entry API doesn't allow modifications anyway. */ | ||||
| return rna_pointer_inherit_refine( | return rna_pointer_inherit_refine( | ||||
| ptr, &RNA_FileSelectEntry, (FileDirEntry *)asset_handle->file_data); | ptr, &RNA_FileSelectEntry, (FileDirEntry *)asset_handle->file_data); | ||||
| ▲ Show 20 Lines • Show All 250 Lines • Show Last 20 Lines | |||||