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

Overriding Blender update events.

Created by: Durman

Problem statement

  • During coding of nodes you should take in account update system of Blender.
  • Blender update events does not suit well to the Sverchok required update events.
  • It is cheaper to spend some calculation to make update smarter and save time on nodes recalculations.

Possible solution

First of all such system should get all signals from Blender. It is possible to do by placing function in update methods. For example:

class SverchCustomTree:
    def update(self):
        tree_update(self)

After getting signals the system can call appropriate methods.

def tree_update(node_tree):
    for node in node_tree:
        if hasattr(node, 'sv_update'):
            node.sv_update()

It is simpler to make update smarter.

def tree_update(node_tree):
    type_update = get_type_update()
    if type_update == 'new_links_creation`:
        new_links = get_new_links()
        fro link in new_links:
            update_node_ui(link.from_node)
            update_node_ui(link.to_node)
Ответственный
Назначить
Оценка трудозатрат