-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add to menu * rename file * add newline
- Loading branch information
Showing
5 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
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 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
Stethoscope | ||
=========== | ||
|
||
*destination after Beta: basic data* | ||
|
||
Functionality | ||
------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ Text | |
stethoscope_v28 | ||
gtext | ||
string_tools | ||
simple_text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -629,6 +629,7 @@ | |
SvGTextNode | ||
--- | ||
SvStringsToolsNode | ||
SvSimpleTextNode | ||
|
||
## BPY Data | ||
SvGetPropNode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
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) |