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

New update core

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

  • Скачать
  • Почтовые патчи
  • Простое отличие
Закрыто nikitronn запросил слияние Centralization_of_Blender_events_2 в master Май 07, 2020
  • Обзор 5
  • Коммиты 41
  • Конвейеры 0
  • Изменения 71

Created by: Durman

Addressed problem description

#3077 (closed) #3058 (closed)

Previous attempts: #2380 (closed) #2393

After a year from previous attempt I'm trying to handle this task again. I have made some code and it looks like the approach is correct. Actual result is a node tree is never recalculate everything (only if base node for all other was not changed). Also there are some extra logic which prevents from useless updates.

In general process can described in next steps:

  • get signals from Blender
  • analyze them with using tree reconstruction
  • translate them into Sverchok events
  • correct tree reconstruction according this events
  • get outdated nodes from tree reconstruction
  • try update given nodes
  • colorize nodes after all

I splited all code into several modules:

  • tree_recnstruction.py

This data structure is coping data structure of existing Sverchok node trees It helps to analyze changes which happens in a node tree Also it is used for walking on tree for searching nodes which should be recalculated It is always consistent to Blender trees So it can be used for searching connections between nodes The only problem is it has not any information about sockets for simplicity They can be added in future

  • hashed_tree_data.py

This module keeps node and links instances of bpy.types.NodeTree objects They are available by their IDs It used for converting nodes of Reconstruction tree to Blender nodes But also can be used for any other purposes when collection of node_tree.links and node_tree.nodes are unchanged It is known that keeping such links can lead to Blender crash So all this data is refreshing if collection of nodes or links was changed This module can be adopted to getting links of a socket for constant time

  • events.py

It used for getting signals of Blender, analyze them, keeping tree reconstruction, updating and colorizing nodes.

If someone would like to test keep in mind next things:

  • Many things are broken now
  • node statics and colorize panels can help to understand what is going on
  • also extra info can be get from console in debug mode
  • not all node properties works correctly
  • keep in mind what does not still work according list below

Panels: 2020-05-07_22-10-14 2020-05-07_22-10-37

Preflight checklist

  • Code changes complete.
    • handle reroutes
    • handle frame nodes
    • handle show in viewport node tree property
    • handle freeze whole tree node tree property
    • handle update current tree operator
    • handle update all trees operator
    • handle macros efficiently
    • handle post load signal
    • support monads
    • support monads loops
    • support color presets
    • handle animation event
    • handle animate node tree property
    • handle undo event
    • handle property update events with costume update function
    • handle nodes_dict
    • open examples
    • all nodes should calculate the data for all output nodes
  • Code documentation complete.
  • Documentation for users complete.
  • Manual testing done.
    • open existing layouts
    • open existing layouts with deprecated nodes
    • export/import json
  • performance tests
  • Unit-tests implemented.
  • cleaning outdated code
  • Ready for merge.
Ответственный
Назначить
Проверяющие
Запросить ревью
Оценка трудозатрат
Исходная ветка: Centralization_of_Blender_events_2