here's a little trickery for ya:
>>> staack = {}
>>> stack[0] = {}
>>> stack[5] = {}
>>> stack[2] = {}
>>> stack[4] = {}
>>> list(reversed([ _k for _k in stack ]))
[ 5, 4, 2, 0 ]
I'm doing this for my GUI's stack as I need to draw from top to bottom.
(it doesn't matter if there's missing layers such as 3 or 1)
what the stack does is draw the GUI with only a single transparency affection, so the buttons on the UI aren't affected by the BG, and display the model as they're supposed to
>>> staack = {}
>>> stack[0] = {}
>>> stack[5] = {}
>>> stack[2] = {}
>>> stack[4] = {}
>>> list(reversed([ _k for _k in stack ]))
[ 5, 4, 2, 0 ]
I'm doing this for my GUI's stack as I need to draw from top to bottom.
(it doesn't matter if there's missing layers such as 3 or 1)
what the stack does is draw the GUI with only a single transparency affection, so the buttons on the UI aren't affected by the BG, and display the model as they're supposed to