BlendImportContext(bpy_struct)
base class — bpy_struct
- class bpy.types.BlendImportContext(bpy_struct)
Contextual data for a blendfile library/linked-data related operation. Currently only exposed as read-only data for the pre/post blendimport handlers
- import_items
- Type:
BlendImportContextItemsbpy_prop_collectionofBlendImportContextItem, (readonly)
- options
Options for this blendfile import operation
LINKOnly link data, instead of appending it.MAKE_PATHS_RELATIVEMake paths of used library blendfiles relative to current blendfile.USE_PLACEHOLDERSGenerate a placeholder (empty ID) if not found in any library files.FORCE_INDIRECTForce loaded ID to be tagged as indirectly linked (used in reload context only).APPEND_SET_FAKEUSERSet fake user on appended IDs.APPEND_RECURSIVEAppend (make local) also indirect dependencies of appended IDs coming from other libraries. NOTE: All IDs (including indirectly linked ones) coming from the same initial library are always made local.APPEND_LOCAL_ID_REUSETry to re-use previously appended matching IDs when appending them again, instead of creating local duplicates.APPEND_ASSET_DATA_CLEARClear the asset data on append (it is always kept for linked data).SELECT_OBJECTSAutomatically select imported objects.USE_ACTIVE_COLLECTIONUse the active Collection of the current View Layer to instantiate imported collections and objects.OBDATA_INSTANCEInstantiate object data IDs (i.e. create objects for them if needed).COLLECTION_INSTANCEInstantiate collections as empties, instead of linking them into the current view layer.
- Type:
enum set in {
'LINK','MAKE_PATHS_RELATIVE','USE_PLACEHOLDERS','FORCE_INDIRECT','APPEND_SET_FAKEUSER','APPEND_RECURSIVE','APPEND_LOCAL_ID_REUSE','APPEND_ASSET_DATA_CLEAR','SELECT_OBJECTS','USE_ACTIVE_COLLECTION','OBDATA_INSTANCE','COLLECTION_INSTANCE'}, default'{}', (readonly)
- process_stage
Current stage of the import process
INITBlendfile import context has been initialized and filled with a list of items to import, no data has been linked or appended yet.DONEAll data has been imported and is available in the list of “import_items”.
- Type:
enum in [
'INIT','DONE'], default"'INIT'", (readonly)
- classmethod bl_rna_get_subclass(id, default=None, /)
- Parameters:
id (str) – The RNA type identifier.
- Returns:
The RNA type or default when not found.
- Return type:
bpy.types.Structsubclass
- classmethod bl_rna_get_subclass_py(id, default=None, /)
- Parameters:
id (str) – The RNA type identifier.
- Returns:
The class or default when not found.
- Return type:
type