Overview

SUPERTABs is designed to be a non-destructive UI wrapper for Blender's N-Panel. Its primary innovation is the ability to dynamically "hijack" existing panels from other add-ons and re-contextualize them within its own Tab/Sub-group system.


1. How SUPERTABs Reads Add-ons Panel UI

The core of SUPERTABs' panel discovery and management system lies in its ability to introspect Blender's internal class registry and manipulate panel attributes at runtime.

A. Discovery via Class Recursion

SUPERTABs doesn't hard-code a list of supported add-ons. Instead, it scans all registered panels using recursion:

python

def_get_all_subclasses_recursively(cls):
    all_subclasses= []
for subclassincls.__subclasses__():
        all_subclasses.append(subclass)
        all_subclasses.extend(_get_all_subclasses_recursively(subclass))
return all_subclasses

# Discover all Panel subclasses
candidates= _get_all_subclasses_recursively(bpy.types.Panel)

This ensures that even newly installed add-ons are automatically detected.

B. Identification and Mapping

Once panels are discovered, they are mapped to SUPERTABs' items (Addons or Tabs) based on several criteria:

C. The Hijacking Mechanism (Non-Destructive)

To bring a panel into the SUPERTABs ecosystem, the system performs a temporary "patch":

  1. Unregister: The original class is temporarily unregistered from Blender.

  2. Attribute Modification:

  3. Polling Patch: The most critical step. The poll method is wrapped:

    python
    
    defnew_poll_method(cls,context):
    # 1. Run original poll logic
    if original_pollandnot original_poll(context):
    returnFalse
    # 2. Add SUPERTABs logic: Only show if this item is active/pinned
    return is_active_in_supertabs(item_string)
    
  4. Register: The modified class is re-registered.