Открыть боковую панель
nikitronn
sverchok
Коммиты
232bf0b9
Не подтверждена
Коммит
232bf0b9
создал
Май 20, 2022
по автору
Dealga McArdle
Зафиксировано автором
GitHub
Май 20, 2022
Просмотр файлов
Basic text node (#4485)
* add to menu * rename file * add newline
владелец
76ea56e4
Изменения
5
Скрыть пробелы
Построчно
Рядом
docs/nodes/text/simple_text.rst
0 → 100644
Просмотр файла @
232bf0b9
Simple Text
===========
Functionality
-------------
This node can be used to pass a single string into the Node Tree, through a Text socket.
.. image:: https://user-images.githubusercontent.com/619340/169515003-bb510280-686b-407d-a7a4-af1d8a633e56.png
docs/nodes/text/stethoscope_v28.rst
Просмотр файла @
232bf0b9
Stethoscope
Stethoscope
===========
===========
*destination after Beta: basic data*
Functionality
Functionality
-------------
-------------
...
...
docs/nodes/text/text_index.rst
Просмотр файла @
232bf0b9
...
@@ -15,3 +15,4 @@ Text
...
@@ -15,3 +15,4 @@ Text
stethoscope_v28
stethoscope_v28
gtext
gtext
string_tools
string_tools
simple_text
index.md
Просмотр файла @
232bf0b9
...
@@ -629,6 +629,7 @@
...
@@ -629,6 +629,7 @@
SvGTextNode
SvGTextNode
---
---
SvStringsToolsNode
SvStringsToolsNode
SvSimpleTextNode
## BPY Data
## BPY Data
SvGetPropNode
SvGetPropNode
...
...
nodes/text/simple_text.py
0 → 100644
Просмотр файла @
232bf0b9
import
bpy
import
sverchok
class
SvSimpleTextNode
(
bpy
.
types
.
Node
,
sverchok
.
node_tree
.
SverchCustomTreeNode
):
"""
Triggers: Text string
Tooltip: simple text
"""
bl_idname
=
'SvSimpleTextNode'
bl_label
=
'Simple Text'
bl_icon
=
'FILE_TEXT'
def
sv_init
(
self
,
context
):
item
=
self
.
outputs
.
new
(
'SvTextSocket'
,
"Text"
)
item
.
custom_draw
=
"draw_output"
def
draw_output
(
self
,
socket
,
context
,
layout
):
row
=
layout
.
row
(
align
=
True
)
row
.
prop
(
socket
,
"default_property"
,
text
=
""
)
def
process
(
self
):
text_socket
=
self
.
outputs
[
0
]
text_socket
.
sv_set
([[
text_socket
.
default_property
]])
classes
=
[
SvSimpleTextNode
]
register
,
unregister
=
bpy
.
utils
.
register_classes_factory
(
classes
)
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать