user: How do I use Context Menu in Blender? Include parameters, examples, warnings and best practices.

assistant: Show the context menu for a data-block with `RMB` on the icon or name.
Depending on the type of the selected data-block(s), you will have all or part of the following options:

Copy/Paste
:   Copies/pastes the selected data-blocks.

Delete `X`, `Delete`
:   Removes all usages of the selected data-blocks. Objects are removed from all scenes,
    materials are removed from all meshes, and so on.

Delete Hierarchy
:   As above, but also affects child collections/objects. Note that if you run this on a collection,
    child objects that (also) belong to another collection will not be deleted.

Select
:   Adds the items that are selected in the Outliner to the selection in the 3D Viewport. This is only
    useful when [Sync Selection](interface.xhtml#bpy-types-spaceoutliner-use-sync-select) is disabled,
    as when it’s enabled (which is the default), the Outliner selection is synchronized to the
    3D Viewport automatically.

Select Hierarchy
:   Adds the children of the selected items to the selection in the Outliner. If *Sync Selection* is enabled,
    this also adds them to the selection in the 3D Viewport.

Deselect
:   Removes the items that are selected in the Outliner from the selection in the 3D Viewport.

Unlink
:   Removes the current usage of the data-block while keeping any others. Objects are only removed
    from the current scene, materials are only removed from the current mesh, and so on.

### Collections

[Collections](../../scene_layout/collections/index.xhtml) let you organize the content of a scene.
They can contain objects as well as other collections.

New
:   Creates a new collection.

Duplicate Collections
:   Recursively duplicates the collection including all child collections, objects, and object data.

Duplicate Linked
:   Recursively duplicates the collection including child collections and objects,
    but reuses object data.

Instance to Scene
:   Creates a new [collection instance](../../scene_layout/object/properties/instancing/collection.xhtml).

#### Visibility

Controls the collection’s visibility in the 3D Viewport and the final render.

Isolate
:   Shows the selected collection (as well as its child and parent collections)
    and hides all the others.

Show/Hide
:   Changes the [Hide in Viewports](interface.xhtml#bpy-types-layercollection-hide-viewport) setting
    for the selected collections.

Show/Hide Inside
:   Changes the [Hide in Viewports](interface.xhtml#bpy-types-layercollection-hide-viewport) setting
    for the selected collections and all their children.

Enable/Disable in Viewports
:   Changes the [Disable in Viewports](interface.xhtml#bpy-types-collection-hide-viewport) setting
    for the selected collections.

Enable/Disable in Renders
:   Changes the [Disable in Renders](../../scene_layout/collections/collections.xhtml#bpy-types-collection-hide-render) setting
    for the selected collections.

#### View Layer

Controls the collection’s interactions with the [View Layer](../../render/layers/introduction.xhtml).

[image reference removed]

Collection/View layer settings.

Disable from View Layer
:   Remove this collection from the active view layer.
    Objects that are only in this collection will not be rendered for the active view layer.
    This is useful to sometimes leave out some object influence for a particular view layer.

Enable in View Layer
:   Add this collection to the active view layer.
    Objects inside the collection will be rendered with the active view layer.

Set Holdout
:   Enables the [Holdout](../../scene_layout/collections/collections.xhtml#bpy-types-layercollection-holdout) property for the selected collections.
    Objects inside this collection will generate a holdout/mask in the active view layer.

Clear Holdout
:   Disables the *Holdout* property for the selected collections.

Set Indirect Only Cycles Only
:   Enables the [Indirect Only](../../scene_layout/collections/collections.xhtml#bpy-types-layercollection-indirect-only) property for the selected collections.
    Objects inside this collection will only contribute to the final image indirectly through shadows and reflections.

Clear Indirect Only Cycles Only
:   Disables the *Indirect Only* property for the selected collections.

---

Set Color Tag
:   Assigns or clears a collection’s [color tag](../../scene_layout/collections/introduction.xhtml#scene-layout-collections-color-tagging)
    for the selected collection.

### ID Data

Unlink
:   Removes the current usage of the data-block while keeping any others
    (e.g. removing a material from only the current mesh).

Make Local
:   Turns an [externally linked](../../files/linked_libraries/link_append.xhtml) data-block into a local one.

Make Single User
:   This menu item is not currently functional. You can use the *User Count* button in the
    [Data-Block Menu](../../interface/controls/templates/data_block.xhtml) instead.

Delete
:   Deletes the selected data-block.

Remap Users
:   Replaces all usages of the selected data-block by a different one. For example,
    you could use this to globally replace a material by another.

Copy/Paste
:   Copies/pastes selected data-blocks.

Add/Clear Fake User
:   Adds/removes a [fake user](../../files/data_blocks.xhtml#data-system-datablock-fake-user), which prevents unused data-blocks
    from getting automatically deleted when saving and reloading the blend-file.

Rename `F2`
:   Renames the selected data-block.

Select Linked
:   Selects the data-blocks that use the currently selected one (e.g. selecting all the objects that use the
    selected material). See [Select Linked](../../scene_layout/object/selecting.xhtml#bpy-ops-object-select-linked).

### Mark as Asset

See [Creating an Asset](../../files/asset_libraries/introduction.xhtml#bpy-ops-asset-mark).

### Clear Asset

See [Removing Assets](../../files/asset_libraries/introduction.xhtml#bpy-ops-asset-clear).

### Clear Asset (Set Fake User)

See [Removing Assets](../../files/asset_libraries/introduction.xhtml#assets-clear-set-fake-user).

### Library Override

See [Library Overrides](../../files/linked_libraries/library_overrides.xhtml).

### View

Show Active `Period`
:   Centers the tree view to the active item.

Expand/Collapse All `Shift`-`A`
:   Expands/collapses every single item in the tree.

Show Object Hierarchy `Home`
:   Expands all objects that have child objects, and collapses all objects that don’t.

Show/Hide One Level `NumpadPlus`/ `NumpadMinus`
:   Expands/collapses a level down/up the tree across all items.