Blender V5.3
blender::FileIndexerType Struct Reference

#include <ED_file_indexer.hh>

Public Attributes

FileIndexerInitUserDataFunc init_user_data
FileIndexerFreeUserDataFunc free_user_data
FileIndexerFinishedFunc filelist_finished
FileIndexerReadIndexFunc read_index
FileIndexerUpdateIndexFunc update_index

Detailed Description

Definition at line 71 of file ED_file_indexer.hh.

Member Data Documentation

◆ filelist_finished

FileIndexerFinishedFunc blender::FileIndexerType::filelist_finished

Is called at the end of the file listing process (before the free_user_data) where indexes can perform clean-ups.

This is an optional callback. Called when listing files completed.

Definition at line 94 of file ED_file_indexer.hh.

Referenced by blender::ed::asset::index::asset_indexer(), and blender::filelist_readjob_recursive_dir_add_items().

◆ free_user_data

FileIndexerFreeUserDataFunc blender::FileIndexerType::free_user_data

Is called at the end of the file listing process. An indexer can free the data that it created during the file listing process.

This is an optional callback.

Definition at line 86 of file ED_file_indexer.hh.

Referenced by blender::ed::asset::index::asset_indexer(), and blender::filelist_readjob_recursive_dir_add_items().

◆ init_user_data

FileIndexerInitUserDataFunc blender::FileIndexerType::init_user_data

Is called at the beginning of the file listing process. An indexer can setup needed data. The result of this function will be passed around as user_data parameter.

This is an optional callback.

Definition at line 78 of file ED_file_indexer.hh.

Referenced by blender::ed::asset::index::asset_indexer(), and blender::filelist_readjob_recursive_dir_add_items().

◆ read_index

FileIndexerReadIndexFunc blender::FileIndexerType::read_index

Is called for each blend file being listed to read data from the index.

Read entries should be added to given entries parameter (type: FileIndexerEntries). *r_read_entries_len must be set to the number of read entries. and the function must return eFileIndexerResult::FILE_INDEXER_ENTRIES_LOADED. In this case the blend file will not be opened and the FileIndexerEntry added to entries will be used as the content of the file.

When the index isn't available or could not be used no entries must be added to the entries field, r_read_entries_len must be set to 0 and the function must return eFileIndexerResult::FILE_INDEXER_NEEDS_UPDATE. In this case the blend file will read from the blend file and the update_index function will be called.

Definition at line 110 of file ED_file_indexer.hh.

Referenced by blender::ed::asset::index::asset_indexer(), and blender::filelist_readjob_list_lib().

◆ update_index

FileIndexerUpdateIndexFunc blender::FileIndexerType::update_index

Update an index of a blend file.

Is called after reading entries from the file when the result of read_index was eFileIndexerResult::FILE_INDEXER_NEED_UPDATE. The callback should update the index so the next time that read_index is called it will read the entries from the index.

Definition at line 119 of file ED_file_indexer.hh.

Referenced by blender::ed::asset::index::asset_indexer(), and blender::filelist_readjob_list_lib().


The documentation for this struct was generated from the following file: