Открыть боковую панель
nikitronn
sverchok
Коммиты
eae577a9
Коммит
eae577a9
создал
Ноя 21, 2020
по автору
Ilya Portnov
Просмотр файлов
UI fixes.
владелец
bdf3077a
Изменения
10
Скрыть пробелы
Построчно
Рядом
nodes/spatial/lloyd2d.py
Просмотр файла @
eae577a9
...
@@ -30,7 +30,7 @@ class SvLloyd2dNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -30,7 +30,7 @@ class SvLloyd2dNode(bpy.types.Node, SverchCustomTreeNode):
bound_modes
=
[
bound_modes
=
[
(
'BOX'
,
'Bounding Box'
,
"Bounding Box"
,
0
),
(
'BOX'
,
'Bounding Box'
,
"Bounding Box"
,
0
),
(
'CIRCLE'
,
'Circle'
,
"Circle"
,
1
)
(
'CIRCLE'
,
'
Bounding
Circle'
,
"
Bounding
Circle"
,
1
)
]
]
bound_mode
:
EnumProperty
(
bound_mode
:
EnumProperty
(
...
@@ -50,11 +50,12 @@ class SvLloyd2dNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -50,11 +50,12 @@ class SvLloyd2dNode(bpy.types.Node, SverchCustomTreeNode):
def
sv_init
(
self
,
context
):
def
sv_init
(
self
,
context
):
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Vertices"
)
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Vertices"
)
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Iterations'
).
prop_name
=
'iterations'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Iterations'
).
prop_name
=
'iterations'
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
'Weights'
)
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
'Weights'
)
.
enable_input_link_menu
=
False
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"Vertices"
)
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"Vertices"
)
def
draw_buttons
(
self
,
context
,
layout
):
def
draw_buttons
(
self
,
context
,
layout
):
layout
.
prop
(
self
,
"bound_mode"
)
layout
.
label
(
text
=
"Bounds mode:"
)
layout
.
prop
(
self
,
"bound_mode"
,
text
=
''
)
def
draw_buttons_ext
(
self
,
context
,
layout
):
def
draw_buttons_ext
(
self
,
context
,
layout
):
self
.
draw_buttons
(
context
,
layout
)
self
.
draw_buttons
(
context
,
layout
)
...
...
nodes/spatial/lloyd3d.py
Просмотр файла @
eae577a9
...
@@ -53,13 +53,14 @@ class SvLloyd3dNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -53,13 +53,14 @@ class SvLloyd3dNode(bpy.types.Node, SverchCustomTreeNode):
update
=
updateNode
)
update
=
updateNode
)
def
sv_init
(
self
,
context
):
def
sv_init
(
self
,
context
):
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
.
enable_input_link_menu
=
False
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Clipping"
).
prop_name
=
'clipping'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Clipping"
).
prop_name
=
'clipping'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Iterations'
).
prop_name
=
'iterations'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Iterations'
).
prop_name
=
'iterations'
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
'Weights'
)
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
'Weights'
)
.
enable_input_link_menu
=
False
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
def
draw_buttons
(
self
,
context
,
layout
):
def
draw_buttons
(
self
,
context
,
layout
):
layout
.
label
(
text
=
"Bounds mode:"
)
layout
.
prop
(
self
,
"bounds_mode"
,
text
=
''
)
layout
.
prop
(
self
,
"bounds_mode"
,
text
=
''
)
def
process
(
self
):
def
process
(
self
):
...
...
nodes/spatial/lloyd_on_mesh.py
Просмотр файла @
eae577a9
...
@@ -43,10 +43,10 @@ class SvLloydOnMeshNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -43,10 +43,10 @@ class SvLloydOnMeshNode(bpy.types.Node, SverchCustomTreeNode):
def
sv_init
(
self
,
context
):
def
sv_init
(
self
,
context
):
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Vertices"
)
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Vertices"
)
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Faces"
)
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Faces"
)
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
.
enable_input_link_menu
=
False
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Iterations'
).
prop_name
=
'iterations'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Iterations'
).
prop_name
=
'iterations'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Thickness'
).
prop_name
=
'thickness'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Thickness'
).
prop_name
=
'thickness'
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
'Weights'
)
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
'Weights'
)
.
enable_input_link_menu
=
False
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
def
process
(
self
):
def
process
(
self
):
...
...
nodes/spatial/lloyd_on_sphere.py
Просмотр файла @
eae577a9
...
@@ -41,13 +41,13 @@ class SvLloydOnSphereNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -41,13 +41,13 @@ class SvLloydOnSphereNode(bpy.types.Node, SverchCustomTreeNode):
update
=
updateNode
)
update
=
updateNode
)
def
sv_init
(
self
,
context
):
def
sv_init
(
self
,
context
):
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
.
enable_input_link_menu
=
False
d
=
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Center"
)
d
=
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Center"
)
d
.
use_prop
=
True
d
.
use_prop
=
True
d
.
default_property
=
(
0.0
,
0.0
,
0.0
)
d
.
default_property
=
(
0.0
,
0.0
,
0.0
)
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Radius"
).
prop_name
=
"radius"
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Radius"
).
prop_name
=
"radius"
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Iterations'
).
prop_name
=
'iterations'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Iterations'
).
prop_name
=
'iterations'
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
'Weights'
)
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
'Weights'
)
.
enable_input_link_menu
=
False
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
...
...
nodes/spatial/lloyd_solid.py
Просмотр файла @
eae577a9
...
@@ -65,10 +65,10 @@ class SvLloydSolidNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -65,10 +65,10 @@ class SvLloydSolidNode(bpy.types.Node, SverchCustomTreeNode):
def
sv_init
(
self
,
context
):
def
sv_init
(
self
,
context
):
self
.
inputs
.
new
(
'SvSolidSocket'
,
"Solid"
)
self
.
inputs
.
new
(
'SvSolidSocket'
,
"Solid"
)
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
.
enable_input_link_menu
=
False
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Thickness'
).
prop_name
=
'thickness'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Thickness'
).
prop_name
=
'thickness'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Iterations'
).
prop_name
=
'iterations'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Iterations'
).
prop_name
=
'iterations'
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
'Weights'
)
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
'Weights'
)
.
enable_input_link_menu
=
False
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
self
.
update_sockets
(
context
)
self
.
update_sockets
(
context
)
...
...
nodes/spatial/lloyd_solid_face.py
Просмотр файла @
eae577a9
...
@@ -48,10 +48,10 @@ class SvLloydSolidFaceNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -48,10 +48,10 @@ class SvLloydSolidFaceNode(bpy.types.Node, SverchCustomTreeNode):
def
sv_init
(
self
,
context
):
def
sv_init
(
self
,
context
):
self
.
inputs
.
new
(
'SvSurfaceSocket'
,
"SolidFace"
)
self
.
inputs
.
new
(
'SvSurfaceSocket'
,
"SolidFace"
)
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
.
enable_input_link_menu
=
False
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Thickness'
).
prop_name
=
'thickness'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Thickness'
).
prop_name
=
'thickness'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Iterations'
).
prop_name
=
'iterations'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Iterations'
).
prop_name
=
'iterations'
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
'Weights'
)
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
'Weights'
)
.
enable_input_link_menu
=
False
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"Sites"
)
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"UVPoints"
)
self
.
outputs
.
new
(
'SvVerticesSocket'
,
"UVPoints"
)
...
...
nodes/spatial/populate_solid.py
Просмотр файла @
eae577a9
...
@@ -108,7 +108,7 @@ class SvPopulateSolidNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -108,7 +108,7 @@ class SvPopulateSolidNode(bpy.types.Node, SverchCustomTreeNode):
def
sv_init
(
self
,
context
):
def
sv_init
(
self
,
context
):
self
.
inputs
.
new
(
'SvSolidSocket'
,
"Solid"
)
self
.
inputs
.
new
(
'SvSolidSocket'
,
"Solid"
)
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
"Field"
)
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
"Field"
)
.
enable_input_link_menu
=
False
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Count"
).
prop_name
=
'count'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Count"
).
prop_name
=
'count'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"MinDistance"
).
prop_name
=
'min_r'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"MinDistance"
).
prop_name
=
'min_r'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Threshold"
).
prop_name
=
'threshold'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Threshold"
).
prop_name
=
'threshold'
...
...
nodes/spatial/populate_surface.py
Просмотр файла @
eae577a9
...
@@ -73,7 +73,7 @@ class SvPopulateSurfaceNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -73,7 +73,7 @@ class SvPopulateSurfaceNode(bpy.types.Node, SverchCustomTreeNode):
def
sv_init
(
self
,
context
):
def
sv_init
(
self
,
context
):
self
.
inputs
.
new
(
'SvSurfaceSocket'
,
"Surface"
)
self
.
inputs
.
new
(
'SvSurfaceSocket'
,
"Surface"
)
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
"Field"
)
self
.
inputs
.
new
(
'SvScalarFieldSocket'
,
"Field"
)
.
enable_input_link_menu
=
False
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Count"
).
prop_name
=
'count'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Count"
).
prop_name
=
'count'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"MinDistance"
).
prop_name
=
'min_r'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"MinDistance"
).
prop_name
=
'min_r'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Threshold"
).
prop_name
=
'threshold'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Threshold"
).
prop_name
=
'threshold'
...
...
nodes/spatial/voronoi_2d.py
Просмотр файла @
eae577a9
...
@@ -43,7 +43,7 @@ class Voronoi2DNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -43,7 +43,7 @@ class Voronoi2DNode(bpy.types.Node, SverchCustomTreeNode):
bound_modes
=
[
bound_modes
=
[
(
'BOX'
,
'Bounding Box'
,
"Bounding Box"
,
0
),
(
'BOX'
,
'Bounding Box'
,
"Bounding Box"
,
0
),
(
'CIRCLE'
,
'Circle'
,
"Circle"
,
1
)
(
'CIRCLE'
,
'
Bounding
Circle'
,
"
Bounding
Circle"
,
1
)
]
]
bound_mode
:
EnumProperty
(
bound_mode
:
EnumProperty
(
...
@@ -100,7 +100,8 @@ class Voronoi2DNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -100,7 +100,8 @@ class Voronoi2DNode(bpy.types.Node, SverchCustomTreeNode):
self
.
update_sockets
(
context
)
self
.
update_sockets
(
context
)
def
draw_buttons
(
self
,
context
,
layout
):
def
draw_buttons
(
self
,
context
,
layout
):
layout
.
prop
(
self
,
"bound_mode"
)
layout
.
label
(
text
=
"Bounds mode:"
)
layout
.
prop
(
self
,
"bound_mode"
,
text
=
''
)
layout
.
prop
(
self
,
"draw_bounds"
)
layout
.
prop
(
self
,
"draw_bounds"
)
if
not
self
.
draw_bounds
:
if
not
self
.
draw_bounds
:
layout
.
prop
(
self
,
"draw_hangs"
)
layout
.
prop
(
self
,
"draw_hangs"
)
...
...
nodes/spatial/voronoi_on_surface.py
Просмотр файла @
eae577a9
...
@@ -105,7 +105,7 @@ class SvVoronoiOnSurfaceNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -105,7 +105,7 @@ class SvVoronoiOnSurfaceNode(bpy.types.Node, SverchCustomTreeNode):
def
sv_init
(
self
,
context
):
def
sv_init
(
self
,
context
):
self
.
inputs
.
new
(
'SvSurfaceSocket'
,
'Surface'
)
self
.
inputs
.
new
(
'SvSurfaceSocket'
,
'Surface'
)
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"UVPoints"
)
self
.
inputs
.
new
(
'SvVerticesSocket'
,
"UVPoints"
)
.
enable_input_link_menu
=
False
self
.
inputs
.
new
(
'SvStringsSocket'
,
'MaxSides'
).
prop_name
=
'max_sides'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'MaxSides'
).
prop_name
=
'max_sides'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Thickness'
).
prop_name
=
'thickness'
self
.
inputs
.
new
(
'SvStringsSocket'
,
'Thickness'
).
prop_name
=
'thickness'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Clipping"
).
prop_name
=
'clipping'
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Clipping"
).
prop_name
=
'clipping'
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать