Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quickfuncs tosnlite #4502

Merged
merged 3 commits into from
May 31, 2022
Merged

Add quickfuncs tosnlite #4502

merged 3 commits into from
May 31, 2022

Conversation

zeffii
Copy link
Collaborator

@zeffii zeffii commented May 31, 2022

adds internal functions and updates sverchok logo printer for win10

@zeffii zeffii merged commit 621f937 into master May 31, 2022
@zeffii zeffii deleted the add_quickfuncs_tosnlite branch May 31, 2022 15:35
@Durman
Copy link
Collaborator

Durman commented May 31, 2022

Mm, nice =)

image

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 1, 2022

hehe :)

@zeffii
Copy link
Collaborator Author

zeffii commented Jun 2, 2022

https://pypi.org/project/colored/ many more colors
https://stackoverflow.com/questions/27265322/how-to-print-to-console-in-color

W  = '\033[0m'  # white (normal)
R  = '\033[31m' # red
M  = '\033[33m' # mag
X  = '\033[36m'
 

import bpy
nodes = bpy.data.node_groups['NodeTree'].nodes
n = nodes['Viewer Draw']
text = n.inputs[0].sv_get()
text_str = f"{text}"

import re
text_str = re.sub("(?P<number>\d+)", f"{X}\g<number>{W}", text_str)
text_str = re.sub("(?P<parens>\(|\))", f"{R}\g<parens>{W}", text_str)
print(text_str)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants