• S sverchok
  • Информация о проекте
    • Информация о проекте
    • Активность
    • Метки
    • Участники
  • Репозиторий
    • Репозиторий
    • Файлы
    • Коммиты
    • Ветки
    • Теги
    • Участники
    • Диаграмма
    • Сравнение
  • Задачи 148
    • Задачи 148
    • Список
    • Доски
    • Спринты
  • Запросы на слияние 21
    • Запросы на слияние 21
  • CI/CD
    • CI/CD
    • Конвейеры
    • Задания
    • Расписания
  • Развертывания
    • Развертывания
    • Окружения
    • Релизы
  • Пакеты и реестры
    • Пакеты и реестры
    • Реестр пакетов
    • Реестр контейнеров
  • Мониторинг
    • Мониторинг
    • Инциденты
  • Аналитика
    • Аналитика
    • Поток ценности
    • CI/CD
    • Репозиторий
  • Wiki
    • Wiki
  • Сниппеты
    • Сниппеты
  • Активность
  • Диаграмма
  • Создать новую задачу
  • Задания
  • Коммиты
  • Доски с задачами
Свернуть панель
  • nikitronn
  • sverchok
  • Запросы на слияние
  • !4686

Fix: Correct node class mixin order to resolve poll function

  • Ревью изменений

  • Скачать
  • Почтовые патчи
  • Простое отличие
Слиты nikitronn запросил слияние github/fork/HansGoudey/fix-poll-mixin-order в master Сен 27, 2022
  • Обзор 3
  • Коммиты 1
  • Конвейеры 0
  • Изменения 704

Created by: HansGoudey

Python mixin order goes from left to right here, so when looking for the node's poll function, it first finds a poll function from bpy.types.Node, then Sverchok's base node class poll, and always returns false for most nodes.

In https://developer.blender.org/T101259, this incorrect poll caused Sverchok nodes to be visible in the Geometry Nodes editor. While that would be fun, it doesn't work unfortunately. It is possible to fix that too, but the polls should be fixed anyway.

The fix is switching the order of mixins, so that the Sverchok class with the proper poll function always comes first.

An alternative solution would be to somehow avoid defining the poll returning "True" in bpy.types.Node, but I'm not quite sure how that would work, and it might have more unexpected consequences.

Ответственный
Назначить
Проверяющие
Запросить ревью
Оценка трудозатрат
Исходная ветка: github/fork/HansGoudey/fix-poll-mixin-order