Логотип Ui Panels

Ui Panels

Спільнота
TMHSDigital
ui-panels

Author bpy.types.Panel UI: bl_space_type, bl_region_type, bl_category sidebar tabs, declarative draw(), layout row, column and split, sub-panels, and conditional UI with enabled and active. Use when the user adds an N-panel tab or properties-editor panel, exposes add-on properties or operator buttons, or has a panel that does not appear, shows the wrong labels or warns about a missing _PT_ in its bl_idname. Targets 5.2 LTS.

Огляд

ВидавецьTMHSDigital
РепозиторійBlender-Developer-Tools
Назва навичкиui-panels
Зірки
20
Форки
5
Файли в пакеті
Лише інструкції
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем TMHSDigital. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Ui Panels у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/ui-panels
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TMHSDigital/Blender-Developer-Tools.git /tmp/Blender-Developer-Tools
mkdir -p .claude/skills
cp -r /tmp/Blender-Developer-Tools/skills/ui-panels .claude/skills/ui-panels
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Ui Panels в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Ui Panels, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Ui Panels не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

UI Panels

Trigger

Use this skill when the user:

  • Wants a sidebar tab in the 3D viewport, properties editor, or any other space
  • Mentions bpy.types.Panel, bl_space_type, bl_region_type, "N panel", "sidebar"
  • Needs to expose properties or operators in a custom UI
  • Asks why a property is showing without a label or in the wrong column

Required inputs

  • Where the panel lives: the editor (3D viewport, Properties, etc.) and the region (sidebar, header, tools)
  • Tab name if it lives in a sidebar (bl_category)
  • Class name convention: EDITOR_PT_name (VIEW3D_PT_my_addon)

The minimum viable panel

python
import bpy


class VIEW3D_PT_my_addon(bpy.types.Panel):
    bl_label = "My Addon"
    bl_idname = "VIEW3D_PT_my_addon"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "My Addon"

    def draw(self, context):
        layout = self.layout
        layout.label(text="Hello from the N panel")

After registering the class, the panel appears in the 3D viewport's sidebar (press N) under a "My Addon" tab.

The bl_* fields that decide where it lives

FieldCommon valuesEffect
bl_space_type'VIEW_3D', 'PROPERTIES', 'NODE_EDITOR', 'IMAGE_EDITOR', 'TEXT_EDITOR', 'OUTLINER', 'SEQUENCE_EDITOR'Which editor the panel appears in
bl_region_type'UI' (sidebar), 'TOOLS' (toolbar, deprecated for new add-ons), 'WINDOW' (main, used in PROPERTIES), 'HEADER'Which region within the editor
bl_categoryAny stringTab name in 'UI' regions
bl_labelAny stringVisible header on the panel
bl_idnameConventional EDITOR_PT_nameInternal, also used as the parent for sub-panels
bl_context'objectmode', 'mesh_edit', 'render', etc.Restrict to a context (mainly Properties editor)
bl_parent_idAnother panel's bl_idnameMakes this a sub-panel under that parent
bl_options{'DEFAULT_CLOSED'}, {'HIDE_HEADER'}UI options

The EDITOR_PT_name convention is checked, not enforced: a bl_idname without the _PT_ infix still registers, and Blender prints Warning: 'mypanel' does not contain '_PT_' with prefix and suffix (4.5.11 and 5.2.1). Follow it anyway; the editor prefix maps to bl_space_type, and sub-panels reference the parent by this id.

The declarative draw method

draw runs every redraw. It must be cheap and idempotent. Do not mutate scene state from inside draw. Use layout.prop, layout.operator, layout.label, and the layout container methods.

python
def draw(self, context):
    layout = self.layout
    settings = context.scene.my_addon

    layout.prop(settings, "intensity")
    layout.prop(settings, "use_smoothing")

    row = layout.row()
    row.prop(settings, "min_value")
    row.prop(settings, "max_value")

    layout.operator("mesh.my_addon_action")

layout.prop reads the property metadata (label, description, range, subtype) from the bpy.props definition. You do not pass the label. If you want to override:

python
layout.prop(settings, "intensity", text="Strength")

layout.prop(..., text="") removes the label entirely, useful inside aligned columns.

Layout primitives

MethodUse for
layout.row()Horizontal arrangement
layout.row(align=True)Horizontal with no gap, like a button group
layout.column()Vertical (default for layout itself)
layout.column(align=True)Vertical with no gap, useful for aligned prop rows
layout.split(factor=0.5)Two-column split with explicit ratio
layout.box()Bordered group
layout.separator()Vertical spacer
layout.separator(factor=2.0)Larger vertical spacer

Aligned property rows

python
col = layout.column(align=True)
col.prop(settings, "min_value")
col.prop(settings, "max_value")

Without align=True you get a small gap between rows. With it the boxes touch, which is the conventional look for paired min/max controls.

Split for label + control

python
split = layout.split(factor=0.4)
split.label(text="Mode")
split.prop(settings, "mode", text="")

This lays out a left-aligned label that takes 40% of the width with the dropdown filling the rest.

Conditional UI: .enabled, not show/hide

Showing and hiding individual controls based on state causes the panel to "jump" as the user works. The Blender convention is to keep the layout stable and gray out controls that don't apply:

python
def draw(self, context):
    layout = self.layout
    settings = context.scene.my_addon

    layout.prop(settings, "use_smoothing")

    sub = layout.column()
    sub.enabled = settings.use_smoothing
    sub.prop(settings, "smoothing_passes")
    sub.prop(settings, "smoothing_strength")

sub.enabled = False grays out the controls but keeps them in place. Users instinctively read this as "available but not active right now."

For genuinely dependent UI (the entire concept disappears in the other state), use a sub-panel with bl_parent_id and toggle the parent's poll instead.

Worked example: panel calling an operator on a Scene-bound property

python
import bpy


class MY_ADDON_PG_settings(bpy.types.PropertyGroup):
    intensity: bpy.props.FloatProperty(name="Intensity", default=1.0, min=0.0, max=10.0)
    use_smoothing: bpy.props.BoolProperty(name="Smooth Result", default=True)
    smoothing_passes: bpy.props.IntProperty(name="Passes", default=2, min=1, max=10)


class MESH_OT_apply_my_addon(bpy.types.Operator):
    bl_idname = "mesh.apply_my_addon"
    bl_label = "Apply"
    bl_options = {'REGISTER', 'UNDO'}

    @classmethod
    def poll(cls, context):
        return context.active_object is not None and context.active_object.type == 'MESH'

    def execute(self, context):
        obj = context.active_object
        if obj is None:
            return {'CANCELLED'}
        settings = context.scene.my_addon
        self.report({'INFO'}, f"Apply at intensity={settings.intensity:.2f}")
        return {'FINISHED'}


class VIEW3D_PT_my_addon(bpy.types.Panel):
    bl_label = "My Addon"
    bl_idname = "VIEW3D_PT_my_addon"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "My Addon"

    def draw(self, context):
        layout = self.layout
        settings = context.scene.my_addon

        layout.prop(settings, "intensity")
        layout.prop(settings, "use_smoothing")

        sub = layout.column()
        sub.enabled = settings.use_smoothing
        sub.prop(settings, "smoothing_passes")

        layout.separator()
        layout.operator("mesh.apply_my_addon", icon='PLAY')


classes = (
    MY_ADDON_PG_settings,
    MESH_OT_apply_my_addon,
    VIEW3D_PT_my_addon,
)

_register_classes, _unregister_classes = bpy.utils.register_classes_factory(classes)


def register():
    _register_classes()
    bpy.types.Scene.my_addon = bpy.props.PointerProperty(type=MY_ADDON_PG_settings)


def unregister():
    del bpy.types.Scene.my_addon
    _unregister_classes()

Common AI mistakes

  1. Mutating state from draw. draw runs on every redraw, dozens of times per second. If you create or delete data there, you will leak, crash, or block the UI.

  2. Hardcoding the label twice:

    python
    layout.prop(settings, "intensity", text="Intensity")  # redundant

    The label comes from the property definition. Pass text= only to override or to suppress with text="".

  3. Mixing bl_region_type='UI' with no bl_category. Blender silently files the panel under a fallback sidebar tab you did not choose, mixed in with other add-ons, where users will not look for it. Always set bl_category.

  4. Using bl_region_type='TOOLS' for new add-ons. The tools region was deprecated in 2.8 in favor of the UI region for sidebar panels. Stick to 'UI'.

  5. Show/hide instead of .enabled. The panel jumps and confuses the user. Gray out unless the entire concept is gone.

  6. bl_idname not matching the convention. Registration still succeeds but prints a _PT_ warning on every load, and the editor prefix should match bl_space_type.

Related

  • operators for the operator that the panel button calls
  • custom-properties for the property definitions the panel reads
  • addon-scaffolding for class registration

Runnable examples

Each example runs headless, asserts the contract, and exits non-zero when it breaks. Run one with blender --background --python <script> --; pass a falsifier flag to watch the check fail.

  • addon-register-lifecycle: Check-only witness for the first things every add-on author writes. Falsify: --drop-manifest (exit 3).

References

Поширені запитання

Що робить навичка ШІ Ui Panels?

Author bpy.types.Panel UI: bl_space_type, bl_region_type, bl_category sidebar tabs, declarative draw(), layout row, column and split, sub-panels, and conditional UI with enabled and active. Use when the user adds an N-panel tab or properties-editor panel, exposes add-on properties or operator buttons, or has a panel that does not appear, shows the wrong labels or warns about a missing _PT_ in its bl_idname. Targets 5.2 LTS.

Навіщо використовувати Ui Panels у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Ui Panels — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Ui Panels у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/ui-panels. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Ui Panels?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Ui Panels?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Ui Panels — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Ui Panels?

Навичку опубліковано на GitHub: TMHSDigital. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇