Открыть боковую панель
nikitronn
sverchok
Коммиты
65f43f6b
Не подтверждена
Коммит
65f43f6b
создал
Сен 09, 2019
по автору
Victor Doval
Зафиксировано автором
GitHub
Сен 09, 2019
Просмотр файлов
List Math: added warp property to node buttons and to reference (#2524)
владелец
d642e0d2
Изменения
2
Скрыть пробелы
Построчно
Рядом
docs/nodes/list_main/func.rst
Просмотр файла @
65f43f6b
...
@@ -26,6 +26,8 @@ Maximum Maximum value of the list
...
@@ -26,6 +26,8 @@ Maximum Maximum value of the list
Minimum Minimum value of the list
Minimum Minimum value of the list
=================== ======================================
=================== ======================================
**Warp:** Adds one level of warping (output becomes [output])
Outputs
Outputs
-------
-------
...
@@ -39,4 +41,4 @@ Examples
...
@@ -39,4 +41,4 @@ Examples
.. image:: https://cloud.githubusercontent.com/assets/5990821/4191546/dd4edc6e-378e-11e4-8015-8f66ec59b68e.png
.. image:: https://cloud.githubusercontent.com/assets/5990821/4191546/dd4edc6e-378e-11e4-8015-8f66ec59b68e.png
:alt: ListMathDemo1.PNG
:alt: ListMathDemo1.PNG
In this example the node shows all the possible outputs.
In this example the node shows all the possible outputs.
\ No newline at end of file
nodes/list_main/func.py
Просмотр файла @
65f43f6b
# This file is part of project Sverchok. It's copyrighted by the contributors
# This file is part of project Sverchok. It's copyrighted by the contributors
# recorded in the version control history of the file, available from
# recorded in the version control history of the file, available from
# its original location https://github.com/nortikin/sverchok/commit/master
# its original location https://github.com/nortikin/sverchok/commit/master
#
#
# SPDX-License-Identifier: GPL3
# SPDX-License-Identifier: GPL3
# License-Filename: LICENSE
# License-Filename: LICENSE
...
@@ -33,12 +33,12 @@ func_dict = {
...
@@ -33,12 +33,12 @@ func_dict = {
"MIN"
:
min
,
"MIN"
:
min
,
"MAX"
:
max
,
"MAX"
:
max
,
"AVR"
:
avr
,
"AVR"
:
avr
,
"SUM"
:
sum
"SUM"
:
sum
}
}
class
ListFuncNode
(
bpy
.
types
.
Node
,
SverchCustomTreeNode
):
class
ListFuncNode
(
bpy
.
types
.
Node
,
SverchCustomTreeNode
):
'''
'''
Triggers:
List functions
Triggers:
Average, Sum, Min...
Tooltip: Operations with list, sum, average, min, max
Tooltip: Operations with list, sum, average, min, max
'''
'''
bl_idname
=
'ListFuncNode'
bl_idname
=
'ListFuncNode'
...
@@ -56,22 +56,23 @@ class ListFuncNode(bpy.types.Node, SverchCustomTreeNode):
...
@@ -56,22 +56,23 @@ class ListFuncNode(bpy.types.Node, SverchCustomTreeNode):
func_
:
EnumProperty
(
func_
:
EnumProperty
(
name
=
"Function"
,
description
=
"Function choice"
,
name
=
"Function"
,
description
=
"Function choice"
,
default
=
"AVR"
,
items
=
mode_items
,
update
=
updateNode
)
default
=
"AVR"
,
items
=
mode_items
,
update
=
updateNode
)
level
:
IntProperty
(
level
:
IntProperty
(
name
=
'level_to_count'
,
name
=
'level_to_count'
,
default
=
1
,
min
=
0
,
update
=
updateNode
)
default
=
1
,
min
=
0
,
update
=
updateNode
)
wrap
:
BoolProperty
(
wrap
:
BoolProperty
(
name
=
'wrap'
,
description
=
'extra level add'
,
name
=
'wrap'
,
description
=
'extra level add'
,
default
=
Fals
e
,
update
=
updateNode
)
default
=
Tru
e
,
update
=
updateNode
)
def
draw_buttons
(
self
,
context
,
layout
):
def
draw_buttons
(
self
,
context
,
layout
):
layout
.
prop
(
self
,
"level"
,
text
=
"level"
)
layout
.
prop
(
self
,
"level"
,
text
=
"level"
)
layout
.
prop
(
self
,
"func_"
,
text
=
"Functions:"
)
layout
.
prop
(
self
,
"func_"
,
text
=
"Functions:"
)
layout
.
prop
(
self
,
"wrap"
,
text
=
"Warp"
)
def
draw_buttons_ext
(
self
,
context
,
layout
):
def
draw_buttons_ext
(
self
,
context
,
layout
):
layout
.
prop
(
self
,
"wrap"
)
self
.
draw_buttons
(
context
,
layout
)
def
sv_init
(
self
,
context
):
def
sv_init
(
self
,
context
):
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Data"
)
self
.
inputs
.
new
(
'SvStringsSocket'
,
"Data"
)
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать