Partially altered loose sockets have non-deterministic ordering #28

Closed
opened 2024-05-04 18:06:32 +02:00 by so-rose · 1 comment

When setting loose sockets, we expect that order is preserved from the definition. This is currently not the case, if there is overlap, since the existing "already made (by name)" sockets are simply kept and not removed, whilst sockets that maybe "should" come before are now made after (all in node base.py).

The answer lies within the Blender Python API's ability to reorder sockets (I think it was a move() method or something). self.loose_input_sockets already has the correct ordering; all we need is an algorithm to construct a series of move operations to match that ordering.

When setting loose sockets, we expect that order is preserved from the definition. This is currently not the case, if there is overlap, since the existing "already made (by name)" sockets are simply kept and not removed, whilst sockets that maybe "should" come before are now made after (all in node `base.py`). The answer lies within the Blender Python API's ability to reorder sockets (I think it was a `move()` method or something). `self.loose_input_sockets` already has the correct ordering; all we need is an algorithm to construct a series of move operations to match that ordering.
so-rose added the
bug
architecture
abstractions
labels 2024-05-04 18:06:32 +02:00
so-rose added a new dependency 2024-05-04 18:09:51 +02:00
so-rose added this to the Robust Simulation milestone 2024-05-07 10:05:48 +02:00
Poster
Owner

Fixed using .move() after each sync_sockets. Elegant, non-destructive, and seemingly devoice of FOUC.

Fixed using `.move()` after each `sync_sockets`. Elegant, non-destructive, and seemingly devoice of FOUC.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: so-rose/oscillode#28
There is no content yet.