I’m trying to create a facade panel and I want to shuffle the values of the sublists in difference sequences (if possible through a slider node).
Sublist 0: 210, 120, 190, 110, 180,190
Sublist 1: 120, 190, 190, 210, 180, 110
Sublist 2: 190, 190, 110, 180, 280, 120
I’ve tried to look for a solution but I can’t find anything to solve this.
List.Shuffle should have longest lacing. You’re shuffling the lists of lists at the moment not the contents of the lists of lists.
I already tried that but the same thing happens. All the “shuffeld” sublists still have the same sequence
That’s just an annoying part of how the shuffle node works. You’ll have to create your own randomizing function.
You can try something like this:
Also works with this Python code:
# Enable Python support and load DesignScript library
sys.path.append("C:\Program Files (x86)\IronPython 2.7\Lib")
# The inputs to this node will be stored as a list in the IN variables.
# Place your code below this line
for sublist in x:
# Assign your output to the OUT variable.
OUT = x
Through this topic I discovered how the shuffle node works. I was stuck for a while until I read this, so thank you.
In case someone finds this in 2023 or later. I used two extra nodes to circumvent this:
This way you can still control the seed with an integer slider