bpy_extras submodule (bpy_extras.id_map_utils)
- bpy_extras.id_map_utils.get_id_reference_map()
Return a dictionary of direct data-block references for every data-block in the blend file.
- return:
Each datablock of the .blend file mapped to the set of IDs they directly reference.
- rtype:
dict[bpy.types.ID, set[bpy.types.ID]]
- bpy_extras.id_map_utils.get_all_referenced_ids(id, ref_map)
Return a set of IDs directly or indirectly referenced by id.
- Parameters:
id (bpy.types.ID) – Datablock whose references we’re interested in.
ref_map (dict[bpy.types.ID, set[bpy.types.ID]]) – The global ID reference map, retrieved from get_id_reference_map()
- Returns:
Set of datablocks referenced by id.
- Return type:
set[bpy.types.ID]