Открыть боковую панель
nikitronn
sverchok
Коммиты
772254b2
Коммит
772254b2
создал
Июл 26, 2022
по автору
generalpancakemstr
Просмотр файлов
Removed Edges input, removed maxlevel IntProperty; hopefully fixed image path issues.
владелец
32acb4f9
Изменения
3
Скрыть пробелы
Построчно
Рядом
.github/images/nodes/modifier_change/opensubdivide/opensudivide_vector.png
→
.github/images/nodes/modifier_change/opensubdivide/opensu
b
divide_vector.png
Просмотр файла @
772254b2
Файл перемещен
docs/nodes/modifier_change/opensubdivide.rst
Просмотр файла @
772254b2
...
...
@@ -39,6 +39,7 @@ Indicies in **NewEdges**, **NewFaces**, **OldEdges**, **OldFaces** outputs relat
Examples of usage
-----------------
.. image:: https://raw.githubusercontent.com/generalpancakemstr/sverchok/sverchok-OpenSubdiv/.github/images/nodes/modifier_change/opensubdivide/opensubdivide_vector.png
.. image:: https://raw.githubusercontent.com/GeneralPancakeMSTR/sverchok/sverchok_OpenSubdiv/.github/images/nodes/modifier_change/opensubdivide/opensubdivide_vector.png
.. image:: https://raw.githubusercontent.com/GeneralPancakeMSTR/sverchok/sverchok_OpenSubdiv/.github/images/nodes/modifier_change/opensubdivide/opensubdivide_multi.png
.. image:: https://raw.githubusercontent.com/generalpancakemstr/sverchok/sverchok-OpenSubdiv/.github/images/nodes/modifier_change/opensubdivide/opensubdivide_multi.png
nodes/modifier_change/opensubdivide.py
Просмотр файла @
772254b2
...
...
@@ -36,28 +36,24 @@ class SvOpenSubdivideNode(bpy.types.Node,SverchCustomTreeNode):
bl_label
=
"OpenSubdiv"
bl_icon
=
'OUTLINER_OB_EMPTY'
sv_icon
=
None
maxSubdivision
=
5
# Creates a self.maxSubdivision attribute
maxlevel
:
IntProperty
(
name
=
'level'
,
default
=
0
,
min
=
0
,
max
=
maxSubdivision
,
update
=
updateNode
)
maxSubdivision
=
5
# creates a self.maxSubdivision attribute
# Mute Node Implementation
@
property
def
sv_internal_links
(
self
):
mapping
=
[
(
self
.
inputs
[
'Vertices'
],
self
.
outputs
[
'Vertices'
]),
(
self
.
inputs
[
'Edges'
],
self
.
outputs
[
'Edges'
]),
(
self
.
inputs
[
'Faces'
],
self
.
outputs
[
'Faces'
])
]
return
mapping
def
sv_init
(
self
,
context
):
def
sv_init
(
self
,
context
):
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Vertices"
)
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Edges"
)
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Faces"
)
socket
=
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Levels"
)
socket
.
use_prop
=
True
socket
.
prop_name
=
'maxlevel'
socket
.
default_property_type
=
'int'
socket
.
default_int_property
=
0
socket
.
int_range
=
(
0
,
self
.
maxSubdivision
)
# This does not actually appear to limit the subdivision levels
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать