Открыть боковую панель
nikitronn
sverchok
Коммиты
49dc8074
Коммит
49dc8074
создал
Май 15, 2021
по автору
Durman
Просмотр файлов
give more accurate name to the class
владелец
74d5d645
Изменения
2
Скрыть пробелы
Построчно
Рядом
index.md
Просмотр файла @
49dc8074
...
...
@@ -619,7 +619,7 @@
SvSetDataObjectNodeMK2
SvSortObjsNode
SvFilterObjsNode
SvSetAttributeNode
SvSet
Mesh
AttributeNode
SvObjectToMeshNodeMK2
SvPointOnMeshNodeMK2
SvOBJRayCastNodeMK2
...
...
nodes/object_nodes/set_attribute.py
Просмотр файла @
49dc8074
...
...
@@ -73,12 +73,13 @@ class SvObjectsWithAttributes(bpy.types.PropertyGroup):
self
.
obj
.
data
.
attributes
.
remove
(
attr
)
class
SvSetAttributeNode
(
SverchCustomTreeNode
,
bpy
.
types
.
Node
):
# todo MESH attribute
class
SvSet
Mesh
AttributeNode
(
SverchCustomTreeNode
,
bpy
.
types
.
Node
):
"""
Triggers: todo
Triggers: set mesh attribute
Tooltip: It adds an attribute to a mesh
"""
bl_idname
=
'SvSetAttributeNode'
bl_label
=
'Set attribute'
bl_idname
=
'SvSet
Mesh
AttributeNode'
bl_label
=
'Set
mesh
attribute'
bl_icon
=
'SORTALPHA'
@
throttle_and_update_node
...
...
@@ -87,7 +88,6 @@ class SvSetAttributeNode(SverchCustomTreeNode, bpy.types.Node): # todo MESH att
self
.
inputs
[
'Value'
].
default_property_type
=
'float'
if
self
.
value_type
==
'FLOAT'
else
'int'
self
.
inputs
[
'Vector'
].
hide_safe
=
self
.
value_type
not
in
[
'FLOAT_VECTOR'
,
'FLOAT2'
]
self
.
inputs
[
'Color'
].
hide_safe
=
self
.
value_type
!=
'FLOAT_COLOR'
updateNode
(
self
,
context
)
domains
=
[
'POINT'
,
'EDGE'
,
'CORNER'
,
'FACE'
]
value_types
=
[
'FLOAT'
,
'INT'
,
'FLOAT_VECTOR'
,
'FLOAT_COLOR'
,
'BOOLEAN'
,
'FLOAT2'
]
...
...
@@ -138,4 +138,4 @@ class SvSetAttributeNode(SverchCustomTreeNode, bpy.types.Node): # todo MESH att
self
.
outputs
[
'Object'
].
sv_set
(
objects
)
register
,
unregister
=
bpy
.
utils
.
register_classes_factory
([
SvObjectsWithAttributes
,
SvSetAttributeNode
])
register
,
unregister
=
bpy
.
utils
.
register_classes_factory
([
SvObjectsWithAttributes
,
SvSet
Mesh
AttributeNode
])
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать