Hello,
please see screenshot.
I am just tryng to have index 5 and 6 of that list duplicated… the list is 9 elements, after should be 11, with the elements at given index(s) duplicated…
I have tried all combination of Levels, for the List.ReplaceItemAtIndex node, but I cannot get to the solution I need…
Thanks,
regard
gio
The OOTB replace item at index only works with a single index, Clockwork has one that takes multiple indexes, but I tried and it didn’t take lists as replacement, maybe you can try that and see if you’re luckier. Meanwhile, if you’re using only those two, I’ll propose:
Thank you,
I feel sane again! It’s not me, for once!!
Thank you for your suggestion too, however, the list of indexes could vary in length, so, I wouldn’t be able to just use First and Last…
And right now I just can’t keep spending time on this, I got work to do…
Thank you again
regards
gio
Well, it is quick solution to use python:
# The inputs to this node will be stored as a list in the IN variables.
lst = IN[0]
indexes = IN[1]
rep = IN[2]
# Place your code below this line
for ind in indexes:
lst[ind] = rep
# Assign your output to the OUT variable.
OUT = lst
1 Like