Skip to content

Instantly share code, notes, and snippets.

@JokerMartini
Last active July 5, 2017 14:20
Show Gist options
  • Save JokerMartini/1a6971f08edabb7e1014 to your computer and use it in GitHub Desktop.
Save JokerMartini/1a6971f08edabb7e1014 to your computer and use it in GitHub Desktop.
Maxscript: Shuffles the array returning an array of shuffled indices based on the supplied count.
fn ShuffleIndexes count =
(
list = #()
list.count = count
for k = 1 to count do
(
i = random 1 k
list[k] = list[i]
list[i] = k
)
list
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment