BlendData(bpy_struct)
base class — bpy_struct
- class bpy.types.BlendData(bpy_struct)
Main data structure representing a .blend file and all its data-blocks
- actions
Action data-blocks
- Type
BlendDataActionsbpy_prop_collectionofAction, (readonly)
- armatures
Armature data-blocks
- Type
BlendDataArmaturesbpy_prop_collectionofArmature, (readonly)
- brushes
Brush data-blocks
- Type
BlendDataBrushesbpy_prop_collectionofBrush, (readonly)
- cache_files
Cache Files data-blocks
- Type
BlendDataCacheFilesbpy_prop_collectionofCacheFile, (readonly)
- cameras
Camera data-blocks
- Type
BlendDataCamerasbpy_prop_collectionofCamera, (readonly)
- collections
Collection data-blocks
- Type
BlendDataCollectionsbpy_prop_collectionofCollection, (readonly)
- curves
Curve data-blocks
- Type
BlendDataCurvesbpy_prop_collectionofCurve, (readonly)
- filepath
Path to the .blend file
- Type
string, default “”, (readonly, never None)
- fonts
Vector font data-blocks
- Type
BlendDataFontsbpy_prop_collectionofVectorFont, (readonly)
- grease_pencils
Grease Pencil data-blocks
- Type
BlendDataGreasePencilsbpy_prop_collectionofGreasePencil, (readonly)
- hairs
Hair data-blocks
- Type
BlendDataHairsbpy_prop_collectionofHair, (readonly)
- images
Image data-blocks
- Type
BlendDataImagesbpy_prop_collectionofImage, (readonly)
- is_dirty
Have recent edits been saved to disk
- Type
boolean, default False, (readonly)
- is_saved
Has the current session been saved to disk as a .blend file
- Type
boolean, default False, (readonly)
- lattices
Lattice data-blocks
- Type
BlendDataLatticesbpy_prop_collectionofLattice, (readonly)
- libraries
Library data-blocks
- Type
BlendDataLibrariesbpy_prop_collectionofLibrary, (readonly)
- lightprobes
Light Probe data-blocks
- Type
BlendDataProbesbpy_prop_collectionofLightProbe, (readonly)
- lights
Light data-blocks
- Type
BlendDataLightsbpy_prop_collectionofLight, (readonly)
- linestyles
Line Style data-blocks
- Type
BlendDataLineStylesbpy_prop_collectionofFreestyleLineStyle, (readonly)
- masks
Masks data-blocks
- Type
BlendDataMasksbpy_prop_collectionofMask, (readonly)
- materials
Material data-blocks
- Type
BlendDataMaterialsbpy_prop_collectionofMaterial, (readonly)
- meshes
Mesh data-blocks
- Type
BlendDataMeshesbpy_prop_collectionofMesh, (readonly)
- metaballs
Metaball data-blocks
- Type
BlendDataMetaBallsbpy_prop_collectionofMetaBall, (readonly)
- movieclips
Movie Clip data-blocks
- Type
BlendDataMovieClipsbpy_prop_collectionofMovieClip, (readonly)
- node_groups
Node group data-blocks
- Type
BlendDataNodeTreesbpy_prop_collectionofNodeTree, (readonly)
- objects
Object data-blocks
- Type
BlendDataObjectsbpy_prop_collectionofObject, (readonly)
- paint_curves
Paint Curves data-blocks
- Type
BlendDataPaintCurvesbpy_prop_collectionofPaintCurve, (readonly)
- palettes
Palette data-blocks
- Type
BlendDataPalettesbpy_prop_collectionofPalette, (readonly)
- particles
Particle data-blocks
- Type
BlendDataParticlesbpy_prop_collectionofParticleSettings, (readonly)
- pointclouds
Point cloud data-blocks
- Type
BlendDataPointCloudsbpy_prop_collectionofPointCloud, (readonly)
- scenes
Scene data-blocks
- Type
BlendDataScenesbpy_prop_collectionofScene, (readonly)
- screens
Screen data-blocks
- Type
BlendDataScreensbpy_prop_collectionofScreen, (readonly)
- shape_keys
Shape Key data-blocks
- Type
bpy_prop_collectionofKey, (readonly)
- simulations
Simulation data-blocks
- Type
BlendDataSimulationsbpy_prop_collectionofSimulation, (readonly)
- sounds
Sound data-blocks
- Type
BlendDataSoundsbpy_prop_collectionofSound, (readonly)
- speakers
Speaker data-blocks
- Type
BlendDataSpeakersbpy_prop_collectionofSpeaker, (readonly)
- texts
Text data-blocks
- Type
BlendDataTextsbpy_prop_collectionofText, (readonly)
- textures
Texture data-blocks
- Type
BlendDataTexturesbpy_prop_collectionofTexture, (readonly)
- use_autopack
Automatically pack all external data into .blend file
- Type
boolean, default False
- version
File format version the .blend file was saved with
- Type
int array of 3 items in [0, inf], default (0, 0, 0), (readonly)
- volumes
Volume data-blocks
- Type
BlendDataVolumesbpy_prop_collectionofVolume, (readonly)
- window_managers
Window manager data-blocks
- Type
BlendDataWindowManagersbpy_prop_collectionofWindowManager, (readonly)
- workspaces
Workspace data-blocks
- Type
BlendDataWorkSpacesbpy_prop_collectionofWorkSpace, (readonly)
- worlds
World data-blocks
- Type
BlendDataWorldsbpy_prop_collectionofWorld, (readonly)
- batch_remove(ids)
Remove (delete) several IDs at once.
WARNING: Considered experimental feature currently.
Note that this function is quicker than individual calls to
remove()(frombpy.types.BlendDataID collections), but less safe/versatile (it can break Blender, e.g. by removing all scenes…).- Parameters
ids – Iterables of IDs (types can be mixed).
- classmethod bl_rna_get_subclass(id, default=None)
- Parameters
id (string) – 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 (string) – The RNA type identifier.
- Returns
The class or default when not found.
- Return type
type
- orphans_purge()
Remove (delete) all IDs with no user.
- Parameters
do_local_ids (bool, optional) – Include unused local IDs in the deletion, defaults to True
do_linked_ids (bool, optional) – Include unused linked IDs in the deletion, defaults to True
do_recursive (bool, optional) – Recursively check for unused IDs, ensuring no orphaned one remain after a single run of that function, defaults to False
- Returns
The number of deleted IDs.
- temp_data(filepath=None)
A context manager that temporarily creates blender file data.
- Parameters
filepath (str or NoneType) – The file path for the newly temporary data. When None, the path of the currently open file is used.
- Returns
Blend file data which is freed once the context exists.
- Return type
- user_map(subset, key_types, value_types)
Returns a mapping of all ID data-blocks in current
bpy.datato a set of all datablocks using them.For list of valid set members for key_types & value_types, see:
bpy.types.KeyingSetPath.id_type.- Parameters
subset (sequence) – When passed, only these data-blocks and their users will be included as keys/values in the map.
key_types (set of strings) – Filter the keys mapped by ID types.
value_types (set of strings) – Filter the values in the set by ID types.
- Returns
dictionary of
bpy.types.IDinstances, with sets of ID’s as their values.- Return type
dict
Inherited Properties
Inherited Functions
References