Skip to content

UI Prop Switch

Cycles the active object within the current selection. Two operators step the active marker forward or backward through view_layer.objects.selected, wrapping at either end. Useful when an operation depends on which selected object is "active" (e.g. parenting, snap targets, modifier copying) without deselecting anything.

Despite the module name ui_prop_switch.py, this file does not toggle UI properties — it registers two object-active scroll operators.

Scroll Active UP (bl_idname: iops.object_active_object_scroll_up)

bl_idname: iops.object_active_object_scroll_up Mode: Object Context: VIEW_3D Modal: no HUD: no

Overview

Walks the selection list one step forward from the current active object. When the active is the last item, it wraps to index 0. Reports the new active object's name via INFO.

Usage

  • Requires an active object that is part of the current selection.
  • Default keymap: Ctrl+Alt+WheelUp (repeatable, any modifier slot set).
  • Selection itself is not modified; only the active marker moves.

Scroll Active DOWN (bl_idname: iops.object_active_object_scroll_down)

bl_idname: iops.object_active_object_scroll_down Mode: Object Context: VIEW_3D Modal: no HUD: no

Overview

Steps the active object one position backward in the selection list. When the active is index 0, it wraps to the last item. Reports the new active via INFO.

Usage

  • Requires an active object that is part of the current selection.
  • Default keymap: Ctrl+Alt+WheelDown.

Notes

  • Order of iteration follows bpy.context.view_layer.objects.selected, which is not user-sortable; the cycle order reflects Blender's internal order of selected objects.
  • If the active object is not in the selected set, neither operator does anything (the loop never matches).
  • No properties, no modal state, no HUD.
  • The file name ui_prop_switch.py is legacy — the operators it registers are object-active scrollers.