Открыть боковую панель
nikitronn
sverchok
Коммиты
178a485e
Коммит
178a485e
создал
Июн 09, 2021
по автору
durman
Просмотр файлов
add wrapper class around data.node_groups collection
владелец
dffc738d
Изменения
1
Скрыть пробелы
Построчно
Рядом
utils/handle_blender_data.py
Просмотр файла @
178a485e
...
@@ -101,6 +101,26 @@ def get_sv_trees():
...
@@ -101,6 +101,26 @@ def get_sv_trees():
# ~~~~ encapsulation Blender objects ~~~~
# ~~~~ encapsulation Blender objects ~~~~
class
BlTrees
:
"""Wrapping around Blender tree, use with care
it can crash if other containers are modified a lot
https://docs.blender.org/api/current/info_gotcha.html#help-my-script-crashes-blender
All this is True and about Blender class itself"""
def
__init__
(
self
,
node_groups
=
None
):
self
.
_trees
=
node_groups
@
property
def
sv_trees
(
self
):
trees
=
self
.
_trees
or
bpy
.
data
.
node_groups
return
(
t
for
t
in
trees
if
t
.
bl_idname
in
{
'SverchCustomTreeType'
,
'SvGroupTree'
})
@
property
def
sv_main_trees
(
self
):
trees
=
self
.
_trees
or
bpy
.
data
.
node_groups
return
(
t
for
t
in
trees
if
t
.
bl_idname
==
'SverchCustomTreeType'
)
class
BPYNode
:
class
BPYNode
:
"""Wrapping around ordinary node for extracting some its information"""
"""Wrapping around ordinary node for extracting some its information"""
def
__init__
(
self
,
node
):
def
__init__
(
self
,
node
):
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать