Sort input pins

Hi.
It would be absolutely awesome to have an option / shortcut to sort the input pins of a Node - at least of a Process or similar - automatically by the X-Position of the connections.
The pins would automatically change their order:

I think this would greatly improve the organization of patches.

3 Likes

It’s definitely a pain to re-order links on pin groups, but I wouldn’t like this to be dependent on the patch layout. People should feel free to mess around in their patches as they want to and it should not affect the logic of an application. Also it’s just sometimes the case that a data sink is located somewhere far away in the patch.

Instead I suggest draggable pins here!

And as a bonus - a pin automatically appearing when approaching a pin group with a link at hand, when there is no free pin group slot anymore.

1 Like

Draggable Pins would also work for me. Or just any shortcut for automatic sorting. The crucial point is “ease of use”!

I guess it could be in Configure.

Maybe a list where you can order inputs and outputs as well as making them (in)visible

Yesterday some idea came up that almost feels too daring to suggest, but I’ll put it here anyway ;)
We’ve all been there: you have some node with a pingroup and aligned everything tidily with what’s upstream. Then you add another pin to the group, scale up the node horizontally to make some space for the new upstream node graph and all that effort that went into the organization of your patch goes to waste, because you’re forced to move stuff around again.
This is extra bad if the pingroup isn’t the node’s first input (for example Fuse compute stage groups with the first input being the buffer ressource). Then scaling the node up makes it even harder to adjust your node graph with the new input pins.
Also sometimes upstream node graphs have different horizontal spacing requirements.

So here goes my daring suggestion, I don’t know how this would actually feel when patching, but everything we know (and are used to) migt be wrong ;)
What about allowing pins on nodes to have irregular spacings?
To not bloat the VL XML I figure it could look something like this - the default would be regular spacing of course, and this would not need to populate any attributes in the XML.
Once you drag a pin around on the node, the irregular spacings are saved to the XML.
When you scale up a node that has irregular spacing, all pins move in their relative ratios to one another, so already equally spaced pins would behave as they already do.

I know this might sound like a lot, but maybe this will actually unlock quite some potential for organizing patches?

2 Likes

@sunep
A list, that can be ordered is not what I want, although it sound good - this is too slow. I want to quickly clean my patches and order the connections. It has to be something as quick and easy as dragging or snapping.

Did something happen here?

I have this situation where I have my patch ugly in the inside of a process to make it pretty in the outside :D


What if there is another point in the configure menu to set index of inputpin

Do you know that you can manually sort input pins by unlocking the Signature in the patch explorer?

2 Likes

Well no! Nevermind then :D
Thanks for that pointing!

This issue got raised by @texone again on matrix. Like already mentioned above and in the linked matrix thread, Fuse’s compute system suffers quite a bit from the current design.

1 Like

Somehow missed this thread, sorry (ahh it was written in April, that’s why). What @mburk initially suggests should be very easy to do on our end. It would just be another command on the node and needs no additional UI/UX design. And because it’s just a command, it can’t break anything and it can’t block any future work on that topic.

All the other suggestions however have implications. What @texone brought up in the chat, that inputs taking a sequence automatically offer grouping / allow connecting single values. Doing so on the node application and not the definition would also improve the node library design in general. Still it comes with bunch of details we’ll need to sort out first.

a) These pins would need to get a special attribute in the XML to be able to distinguish them from normal pins. That part will break patch compatibility / should only be done for a major release.
b) With a) in place, the node resolve and type inference mechanism would need to get updated to account for it including new errors when refactoring.
c) Code generation would need to get updated
d) You probably want to be able to connect single values and sequences, like a, b, (c, d, e), f, g - how would we show that?
e) UI would need to draw it - maybe existing pin group drawing would suffice
f) UI interaction like offering a new pin when getting close, dragging pins to reorder (most important), auto removal of pins when disconnecting
g) Be backwards compatible with existing pin groups

We had internal discussions about this in the past as well - I wonder if on the VL-Language repo something was already written up. Will need to check.

@Elias thanks for looking into this I understand the implications so if the suggestion from @mburk is easy to implement this would be already a very helpful first step to speed things up, however I still feel my suggestions would improve the experience with spread pins but understand it is not that trivial but would really like you to consider this with a major version

regarding your other points ether skip d) or you just treat every pin as a potential single value or spread input pin so you can connect both in any order you want would off course be even more flexible in case of fuse you could often than just group things by cons and than put it all together in the final node, seems to make things more elegant the more I think about it

f) maybe it does not need to offer a new pin but when you drag a link on to the pingroup area this gets high lighted so you are aware you do pin group interaction once you release the mousebutton when the system reorders inputs and creates pins, same for reordering

I was today years old, when..

Thanks!

1 Like

Latest preview has sort command added (Context Menu → Edit → Reorder pins by link).

PinGroupReorder

10 Likes

Question is that pin groups should be probably prohibited… Is it saves settings in xml? Like what if I ctrl-c ctrl-v this somewhere?