KCE multiple outputs?

I don’t know if this is possible, but could we get multiple outputs on some of the KCE nodes? Specifically, the ToScalar? But I assume this will be an issue when we get Matrices too, right?

Right now, if I have a color vector, and want to increase the brightness of the red channel, I have to have 1 Float, 3 Integers, 3 ToScalars, 1 Add, and 1 ToVector. If the ToScalar could output 3 things at once, then I would only need 1 ToScalar and 0 Integers.

  • Chad

That gets a little hairy since we don’t really have any concept of how many elements a given input has at the node level. For various reasons, the data types coming into a node are only resolved at render time, meaning it isn’t possible to produce the correct number of connections on a ToScalar node, since the input may have 1, 2, 3, 42, etc. elements.

On the other hand it isn’t unreasonable to make a “shorthand” form, perhaps VectorToScalar that is just a wrapper around an Integer input and a ToScalar node. We will discuss the ramifications of enabling multiple outputs (which we intend to avoid in general) for this specific application.

Ok, what about when I connect a scalar output to a vector input? Any way that the scalar value can be used for all the vector inputs? So If I want to map Density to Color, I don’t need to wire up a ToVector with the Density feeding all 3 inputs?

Just some ideas to make smaller KCE setups, that’s all…

In short no, since that’s the entire point of ToVector. We tried to make it really simple to just drop a Float then a ToVector and hit the spacebar three times to connect them up. We discussed this concept when designing the editor, and decided that we wanted to avoid implicit conversions for the sake of error checking.

I can’t get the spacebar thing to work. I’ll try to study the shortcuts more, to see how this is supposed to work. The dragging to the little squares is awful on a high resolution screen. I bet laptop users have it even worse.

Hitting spacebar three times sounds like a neat way (havent read the full docs yet) but it doesnt seem to work here ?

Regards,
Thorsten

You need to have both nodes selected, then the spacebar should connect the lower numbered node to the higher numbered node’s first unconnected socket. Shift-spacebar will do the same but go from the higher numbered node to the lower.

Perfect! I wonder if it might be a good idea to have both nodes selected if a node is dropped with another selected. So if you drop a node that causes auto-connect select both nodes to simply double hit spacebar to have it all wired up.

Regards,
Thorsten

Is there a way to delete a node but keep the connections? So lets say I have Channel(Color)-> Negate -> Out(Color). I want to delete the Negate, and since the type is the same, leave the connection from Channel to Out.

Backspace deletes nodes and keeps the first input and the out connected whereas “delete-key” will also delete connections

Also, holding shift and dragging a node is supposed to unlink that node from the flow passing its Input1 to whatever nodes it was connected to. You could delete it afterward, but backspace is a shortcut for that whole operation.

I removed this yesterday because it was interfering with some other functionality, but I will look into adding it back in a better way. It was inspired by Fusion which allows Shift+Drag to remove a node from a flow and keep the node.

There are several things to keep in mind here:

If you have an operator selected and create an Input, the Input gets connected automatically. If the Operator has more than one input, the new Input gets deselected to allow for ANOTHER input to get connected in the next step. So keeping both selected would interfere with the majority of cases where you want three different inputs to be connected. A possible solution would be to pop up a query box asking “Do you want to connect the Input Node to all Operator’s Inputs”, but so far we have avoided any pop up dialogs in the Editor.

Currently, if you create an Input Node and create an Operator after that, the Input Node will also be wired only to the first input socket. If you create 3 Input Nodes and drop an Operator with 3 input sockets, each Input Node goes into a different socket. Question is: If you create a ToVector Operator and have a Float Input Node already selected, should it automatically wire to all three sockets? I can make this a Preference Option so people can modify that behavior, or pop up a query box (see above).

Another relatively cool possibility: I could record the auto-wiring of one Input into 3 sockets of ToVector in 3 Undo Records, so you could hit Ctrl+Z twice to undo the last two connections if you don’t want all 3 connected to the same input.

Ok, I went ahead and changed the general behavior of Undo when creating an Operator Node.
The Undo Stack will now record multiple entries: One for the creation of the node itself and one for each autoconnection made.
Also, in the very special case where a Float Input is selected and a ToVector is created, 3 connections (4 Undo Records) will be created. Since deleting connections is almost as much hassle as creating them with the mouse, now you can hit Ctrl+Z one, two or three times to remove the 3rd, 2nd and 1st connection if you don’t like them, but in most cases it would do what you want - tile a single float into a vector.

I will do the same for Inputs so creating and auto-connecting an Input will also create separate Undo records for the creation itself and for the connecting, and if the Input Node was a Float and the selected node was a ToVector, it would create 3 connections automagically.
(EDIT: Done, works great)

I posted a note in the announcement, but in case you missed it, the latest version of the KCE script with all these and more updates has been posted in the Builds conference as part of the Beta 5 download thread.