-
Notifications
You must be signed in to change notification settings - Fork 233
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
Standard colors #274
Comments
in order of different color schemes, we need customization and unification of color schemes. |
Updated Blend file with proposed colors |
@enzyme69 what we are talking now about - is static colors, that you maybe can turn off in user preferences in future. it will be right. |
also this is first def: sv_nodes_color_type = {'basic_in':[(0, 0.5, 0.2),(0, 0.1, 0.05)], 'basic_out':[(1, 0.3, 0),(0.1, 0.05, 0)]}
def sv_nodes_color(self, type,condition):
colors = sv_nodes_color_type[type]
self.use_custom_color = True
if condition:
self.color = colors[0]
else:
self.color = colors[1] it may be part of an updateNode function or i can insert this to every node. first case seems to be better |
|
Perhaps something like this. def apply_sv_color(node):
if not settings.use_sv_auto_color:
return
category = sv_category.get(node.bl_idname)
if not category:
print("Could find node category for {0}".format(node.bl_idname))
colors = sv_colors.get(node.bl_idname)
if colors:
node.use_custom_color = True
node.color = colors[node.state]
else:
print("No color found for category {0}".format(category) |
so, every node should have this mark or it will be separate catalog as we have init.py in nodes folder? |
some nodes as text in out not use the same scheme in work as others, than we should keep some code in node directly? i think it is not right. that happened text in out not colored now |
Every node should have the state, it works like the condition in your code but is kept in the node where the node update function is responsible for setting the correct state, this is anyway needed for #152, the update system applies the correct color based on state, if the user wants sverchok to do that. The colors dictionary should be kept controlled from settings, the category needs to be either a dict and maintain or we make a class hierarchy for sorting the nodes a bit. |
Yes, "state" is exactly what I just mentioned on email thread to Zeffii. |
Data is reset on a node tree basis on every editor(*) event, this since every update event needs to call the update function on every node anyway. The problem here is that the user interface update function is doing the actual processing of the data. Is this good? No, but it is non-trivial problem since the amount of change on a edit event is hard to tell. (*) Edit events are anything that create socket and change links. Changing the value in a node doesn't do this. Have look at #121 for some details |
for this message:
#120 (comment)
for this dialog under commit
#272
i open issue for coloring
The text was updated successfully, but these errors were encountered: