There is a bug in the code of "How to convert a tuple into a list (python)"
In "Test3" function the conversion iteration should be without "-1" sign:
looks like that:
uvw_list = [1-uvw_tuple[j] for i in range(len(uvw_tuple[0])) for j in range(len(uvw_tuple)) ]
should be:
uvw_list = [uvw_tuple[j] for i in range(len(uvw_tuple[0])) for j in range(len(uvw_tuple)) ]
We've lost a couple of hours on that in the studio, as we were working on custom geometry exporter.. and the only thing that was broken were UVs.
I thought i'll post this so someone can fix it
Cheers!
v/
Bug on Wiki - Python Tuples
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: Bug on Wiki - Python Tuples
I think you are mistaken (but I could be just as easily be mistaken too )
Test3 claims to "turn a uvw tuple into a list, invert and set back".
What you propose wouldn't invert it, merely convert it to a list.
And by invert the author of the WIKI page obviously means:
for every x get me 1-x , which it does...
;)
Test3 claims to "turn a uvw tuple into a list, invert and set back".
What you propose wouldn't invert it, merely convert it to a list.
And by invert the author of the WIKI page obviously means:
for every x get me 1-x , which it does...
;)
Stay safe, sane & healthy!
Re: Bug on Wiki - Python Tuples
Strange, because it should return the proper UVs list rather than it's inversion... I dont get the point of it.
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: Bug on Wiki - Python Tuples
Yes, the point of inverting the list eludes me too, but that's what the example sets out to show,
so the code of this example can't be considered wrong... ;)
so the code of this example can't be considered wrong... ;)
Stay safe, sane & healthy!
Who is online
Users browsing this forum: No registered users and 39 guests