There's something I just noticed that is causing some confusion here...
I create a 1x1 plane and make it editable, becoming just one square polygon. when I see it's UVWs in the Structure Manager, I get this:
Butif I open it with C++ or Python API, I get different values, Y is inverted...
doc = c4d.documents.GetActiveDocument()
obj = doc.SearchObject("Plane")
uvwtag = op.GetTag(c4d.Tuvw)
uvwdict = uvwtag.GetSlow(0)
'a': Vector(0, 1, 0)
'b': Vector(0, 0, 0)
'c': Vector(1, 0, 0)
'd': Vector(1, 1, 0)
I checked on R21 and R22, both display that difference, why?
But on R20 the API and Structure still have the same values.
That makes me suspicious of Structure, which I always considered a valuable source.
In the past the UV editor showed the UVs with origin at top left, as this is also the origin of the UserArea.
Notice that at that point, the UV canvas still didn't have any axis being displayed.
When they started showing the axis (cannot remember if this was R20 or R21 ... I assume R21) they showed the axis the "right" way, with origin at the lower left. Thus actually switching displaying of the UVs in the Y direction.
However, the data is still stored in the old fashion way (origin at top left). Which is what you'll see in the Structure Manager. But internally the Y value is flipped over to represent a lower-left origin in the UV View.
Also note that the values (up to R21 at least) are single precision only.
Hi @rsodre, thanks for reaching out to us.
With regard to your post, as already pointed out by @C4DS, it's related to the refactor of the UVEditor that took place in recent releases. The misalignment found in between the Structure Manager and the results brought back from the API it's likely to have been introduced to guarantee back-ward scene compatibility.
However I see it as an unpleasant flaw that we have to look at and get it addressed in future releases.
@r_gigante good to know, thanks!