-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Playground: Color sockets based on node input/output types #27759
base: dev
Are you sure you want to change the base?
Conversation
df58339
to
1cb7574
Compare
Done. #27762 :)
I see and I think I do understand. For now, let's ignore the colors for a second and talk about the number of connections: The PR also corrects some nodes which output vectors (and thus, when connected, should have three connections), but only have a single connection. You can see it in the sample:
Ignoring the colors, is this change fine? Back to colors: My hope is that, when using separate colors for separate types, it becomes more obvious to users on the first glance what kind of in- and outputs a node has and, thus, what to plug where and what the result might be when connecting to other nodes. Especially when only having a single connection between two sockets, it's hard to recognize the type: It might be a I agree that the RGB-Colorcoding of the separate connections is a nice touch, and I would like to keep it in a way such that it is there but tinted with the custom color for the connection as a compromise, if you want. Here is an example:
I quickly implemented the color mixing here: https://github.com/abc013/three.js/tree/propercoloring2 (Relevant lines are 1933 and 1939 in Is that an improvement to you, or should I drop the whole multiple connection coloring at once? I also realized that the color node does not support inputting a alpha value, so the connection count should be 3, instead of 4. I fixed that in the recent push. Is there anything else I could do to improve the coloring so it fits you better? |
Thank you for that :)
Yeah, this improvement makes sense to me. Would it be possible to implement this in another PR? and we will be able to think about colors more carefully. |
That shouldn't be a problem, I'll do it as soon as possible :) |
Description
The first commit of this PR adds two more hotkeys: 'escape' for deselecting nodes, and 'delete' for deleting the selected one.Previously, only some in- and ouputs were rendered with color based on their type. This PR aims to fix that by streamlining the coloring (and setting of the type length, see in example below) into separate functions.
Previously, it looked like this:
Which now looks like this:
As you can see, all types now incluence the color of sockets and connections. Furthermore, the amount of lines rendered per connection now correctly represents the length of the node behind that.
Example file used here can be downloaded here.
Some notes
I am quite new to the code and hope I haven't overlooked anything. I am open for further suggestions and requests. :)