Blender V5.0
blender::bke::FileHandlerType Struct Reference

#include <BKE_file_handler.hh>

Public Member Functions

blender::Vector< int64_tfilter_supported_paths (const blender::Span< std::string > paths) const
std::string get_default_filename (StringRefNull name)

Public Attributes

char idname [OP_MAX_TYPENAME]
char label [OP_MAX_TYPENAME]
char import_operator [OP_MAX_TYPENAME]
char export_operator [OP_MAX_TYPENAME]
char file_extensions_str [FH_MAX_FILE_EXTENSIONS_STR]
bool(* poll_drop )(const bContext *C, FileHandlerType *file_handle_type)
Vector< std::string > file_extensions
ExtensionRNA rna_ext

Detailed Description

Definition at line 23 of file BKE_file_handler.hh.

Member Function Documentation

◆ filter_supported_paths()

blender::Vector< int64_t > blender::bke::FileHandlerType::filter_supported_paths ( const blender::Span< std::string > paths) const

Return a vector of indices in #paths of file paths supported by the file handler.

Definition at line 107 of file file_handler.cc.

References BLI_path_extension(), BLI_strcaseeq(), file_extensions, blender::Span< T >::index_range(), and indices.

Referenced by file_handler_import_operator_write_ptr().

◆ get_default_filename()

std::string blender::bke::FileHandlerType::get_default_filename ( StringRefNull name)

Generate a default file name for use with this file handler.

Definition at line 128 of file file_handler.cc.

References BLI_path_extension_ensure(), BLI_path_make_safe_filename(), DATA_, file_extensions, FILE_MAXFILE, name, and STRNCPY().

Referenced by blender::ed::object::collection_exporter_export(), and uiTemplateCollectionExporters().

Member Data Documentation

◆ export_operator

char blender::bke::FileHandlerType::export_operator[OP_MAX_TYPENAME]

◆ file_extensions

Vector<std::string> blender::bke::FileHandlerType::file_extensions

List of file extensions supported by the file handler.

Definition at line 42 of file BKE_file_handler.hh.

Referenced by blender::bke::file_handlers_poll_file_drop(), filter_supported_paths(), and get_default_filename().

◆ file_extensions_str

char blender::bke::FileHandlerType::file_extensions_str[FH_MAX_FILE_EXTENSIONS_STR]

Formatted string of file extensions supported by the file handler, each extension should start with a . and be separated by ;. For Example: ".blend;.ble".

Definition at line 36 of file BKE_file_handler.hh.

◆ idname

char blender::bke::FileHandlerType::idname[OP_MAX_TYPENAME]

◆ import_operator

char blender::bke::FileHandlerType::import_operator[OP_MAX_TYPENAME]

Import operator name.

Definition at line 29 of file BKE_file_handler.hh.

Referenced by drop_import_file_poll_file_handlers(), and file_handler_import_operator_write_ptr().

◆ label

char blender::bke::FileHandlerType::label[OP_MAX_TYPENAME]

◆ poll_drop

bool(* blender::bke::FileHandlerType::poll_drop) (const bContext *C, FileHandlerType *file_handle_type)

Check if file handler can be used on file drop.

Definition at line 39 of file BKE_file_handler.hh.

Referenced by blender::bke::file_handlers_poll_file_drop().

◆ rna_ext

ExtensionRNA blender::bke::FileHandlerType::rna_ext

RNA integration.

Definition at line 45 of file BKE_file_handler.hh.


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