user: Give a detailed overview of Bpy.Types.Id: syntax, arguments, return values, common patterns.

assistant: D whose name would conflict, the currently renamed ID will get a numeric suffix appended to its new name. ALWAYS Always Rename – Always rename an existing ID whose name would conflict, ensuring that the currently renamed ID will get requested name. SAME_ROOT Rename If Same Root – Only rename an existing ID whose name would conflict if its name root (everything besides the numerical suffix) is the same as the existing name of the currently renamed ID. Returns : How did the renaming of the data-block went on UNCHANGED Unchanged – The ID was not renamed, e.g. because it is already named as requested. UNCHANGED_COLLISION Unchanged Due to Collision – The ID was not renamed, because requested name would have collided with another existing ID’s name, and the automatically adjusted name was the same as the current ID’s name. RENAMED_NO_COLLISION Renamed Without Collision – The ID was renamed as requested, without creating any name collision. RENAMED_COLLISION_ADJUSTED Renamed With Collision – The ID was renamed with adjustment of the requested name, to avoid a name collision. RENAMED_COLLISION_FORCED Renamed Enforced With Collision – The ID was renamed as requested, also renaming another ID to avoid a name collision. Return type : enum in [ 'UNCHANGED' , 'UNCHANGED_COLLISION' , 'RENAMED_NO_COLLISION' , 'RENAMED_COLLISION_ADJUSTED' , 'RENAMED_COLLISION_FORCED' ] evaluated_get ( depsgraph ) ¶ Get corresponding evaluated ID from the given dependency graph. Note that this does not ensure the dependency graph is fully evaluated, it just returns the result of the last evaluation. Parameters : depsgraph ( Depsgraph , (never None)) – Dependency graph to perform lookup in Returns : New copy of the ID Return type : ID copy ( ) ¶ Create a copy of this data-block (not supported for all data-blocks). The result is added to the Blend-File Data (Main database), with all references to other data-blocks ensured to be from within the same Blend-File Data. Returns : New copy of the ID Return type : ID asset_mark ( ) ¶ Enable easier reuse of the data-block through the Asset Browser, with the help of customizable metadata (like previews, descriptions and tags) asset_clear ( ) ¶ Delete all asset metadata and turn the asset data-block back into a normal data-block asset_generate_preview ( ) ¶ Generate preview image (might be scheduled in a background thread) override_create ( * , remap_local_usages = False ) ¶ Create an overridden local copy of this linked data-block (not supported for all data-blocks) Parameters : remap_local_usages ( boolean , ( optional ) ) – Whether local usages of the linked ID should be remapped to the new library override of it Returns : New overridden local copy of the ID Return type : ID override_hierarchy_create ( scene , view_layer , * , reference = None , do_fully_editable = False ) ¶ Create an overridden local copy of this linked data-block, and most of its dependencies when it is a Collection or and Object Parameters : scene ( Scene , (never None)) – In which scene the new overrides should be instantiated view_layer ( ViewLayer , (never None)) – In which view layer the new overrides should be instantiated reference ( ID , (optional)) – Another ID (usually an Object or Collection) used as a hint to decide where to instantiate the new overrides do_fully_editable ( boolean , ( optional ) ) – Make all library overrides generated by this call fully editable by the user (none will be ‘system overrides’) Returns : New overridden local copy of the root ID Return type : ID user_clear ( ) ¶ Clear the user count of a data-block so its not saved, on reload the data will be removed This function is for advanced use only, misuse can crash Blender since the user count is used to prevent data being removed when it is used. # This example shows what _not_ to do, and will crash Blender. import bpy # Object which is in the scene. obj = bpy . data . objects [ "Cube" ] # Without this, removal would raise an error. obj . user_clear () # Runs without an exception but will crash on redraw. bpy . data . objects . remove ( obj ) user_remap ( new_id ) ¶ Replace all usage in the .blend file of this ID by new given one Parameters : new_id ( ID , (never None)) – New ID to use make_local ( * , clear_proxy = True , clear_liboverride = False , clear_asset_data = True ) ¶ Make this data-block local, return local one (may be a copy of the original, in case it is also indirectly used) Parameters : clear_proxy ( boolean , ( optional ) ) – Deprecated, has no effect clear_liboverride ( boolean , ( optional ) ) – Remove potential library override data from the newly made local data clear_asset_data ( boolean , ( optional ) ) – Remove potential asset metadata so the newly local data-block is not treated as asset data-block and won’t show up in asset libraries Returns : This ID, or the new ID if it was copied Return type : ID user_of_id ( id ) ¶ Count the number of times that ID uses/references given one Parameters : id ( ID , (never None)) – ID to count usages Returns : Number of usages/references of given id by current data-block Return type : int in [0, inf] animation_data_create ( ) ¶ Create animation data to this ID, note that not all ID types support this Returns : New animation data or nullptr Return type : AnimData animation_data_clear ( ) ¶ Clear animation on this ID update_tag ( * , refresh = {} ) ¶ Tag the ID to update its display data, e.g. when calling bpy.types.Scene.update Parameters : refresh (enum set in { 'OBJECT' , 'DATA' , 'TIME' }, (optional)) – Type of updates to perform preview_ensure ( ) ¶ Ensure that this ID has preview data (if ID type supports it) Returns : The existing or created preview Return type : ImagePreview 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.Struct subclass 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 Inherited Properties ¶ bpy_struct.id_data Inherited Functions ¶ bpy_struct.as_pointer bpy_struct.driver_add bpy_struct.driver_remove bpy_struct.get bpy_struct.id_properties_clear bpy_struct.id_properties_ensure bpy_struct.id_properties_ui bpy_struct.is_property_hidden bpy_struct.is_property_overridable_library bpy_struct.is_property_readonly bpy_struct.is_property_set bpy_struct.items bpy_struct.keyframe_delete bpy_struct.keyframe_insert bpy_struct.keys bpy_struct.path_from_id bpy_struct.path_from_module bpy_struct.path_resolve bpy_struct.pop bpy_struct.property_overridable_library_set bpy_struct.property_unset bpy_struct.rna_ancestors bpy_struct.type_recast bpy_struct.values References ¶ bpy.context.annotation_data_owner bpy.context.id bpy.context.selected_ids bpy.context.texture_user Action.fcurve_ensure_for_datablock ActionSlot.users AssetRepresentation.local_id BlendData.pack_linked_ids_hierarchy BlendData.pack_linked_ids_hierarchy BlendDataObjects.new BlendImportContextItem.id BlendImportContextItem.library_override_id BlendImportContextItem.reusable_local_id Depsgraph.id_eval_get Depsgraph.id_eval_get Depsgraph.ids DepsgraphUpdate.id DopeSheet.source DriverTarget.id ID.copy ID.evaluated_get ID.make_local ID.original ID.override_create ID.override_hierarchy_create ID.override_hierarchy_create ID.user_of_id ID.user_remap IDOverrideLibrary.hierarchy_root IDOverrideLibrary.reference IDOverrideLibraryPropertyOperation.subitem_local_id IDOverrideLibraryPropertyOperation.subitem_reference_id IDOverrideLibraryPropertyOperations.add IDOverrideLibraryPropertyOperations.add IDViewerPathElem.id Key.user KeyingSetPath.id KeyingSetPaths.add MaskParent.id NodeTree.get_from_context NodeTree.get_from_context NodesModifierDataBlock.id Object.data PropertyGroupItem.id SpaceFileBrowser.activate_asset_by_id SpaceNodeEditor.id SpaceNodeEditor.id_from SpaceProperties.pin_id UILayout.template_action UILayout.template_path_builder UILayout.template_preview UILayout.template_preview Next IDMaterials(bpy_struct) Previous HydraRenderEngine(RenderEngine) Copyright &#169; Blender Authors Made with Furo Report issue on this page On this page ID(bpy_struct) ID ID.asset_data ID.id_type ID.is_editable ID.is_embedded_data ID.is_evaluated ID.is_library_indirect ID.is_linked_packed ID.is_missing ID.is_runtime_data ID.library ID.library_weak_reference ID.name ID.name_full ID.original ID.override_library ID.preview ID.session_uid ID.tag ID.use_extra_user ID.use_fake_user ID.users ID.bl_system_properties_get() ID.rename() ID.evaluated_get() ID.copy() ID.asset_mark() ID.asset_clear() ID.asset_generate_preview() ID.override_create() ID.override_hierarchy_create() ID.user_clear() ID.user_remap() ID.make_local() ID.user_of_id() ID.animation_data_create() ID.animation_data_clear() ID.update_tag() ID.preview_ensure() ID.bl_rna_get_subclass() ID.bl_rna_get_subclass_py() Inherited Properties Inherited Functions References