Fix inspector showing Projection fields in wrong order#109222
Fix inspector showing Projection fields in wrong order#109222MP430 wants to merge 2 commits intogodotengine:masterfrom
Conversation
When the inspector displays a projection, either as an @export from a script or a shader uniform, the columns and rows are the wrong way around/transposed. I've fixed this by just swapping the row numbering in inspector_properties.cpp. The ordering is now consistent with i.e. Basis.
|
This change is not correct, this swaps the labels, which match those of the class, before they went |
AThousandShips
left a comment
There was a problem hiding this comment.
See above, the ordering of the array on line 2703 needs to be adjusted to match
|
Hmm, you're right, but that does mean that the way I don't think Lines 162 to 168 in c2202d3 Lines 207 to 212 in c2202d3 Because of their design they are differently ordered, but the question is if |
To be discussed further, non-trivial change and breaks some alignment between different parts of the code
|
IIRC there was an issue/conversation somewhere about the Basis display @AThousandShips |
|
Accessing Try using the string representation, it should print: |
|
The main issue for me is that the layout of the matrix in the UI isn't mathematically correct. |
|
But that depends on how it's meant to be represented, I'd suggest checking the actual data to see that both actually print the same when processed directly |
|
@AThousandShips |
|
That's good! Now the question is if the naming should be corrected as it's very confusing |
|
I don't have a strong opinion on that, but I would be happy to swap the labels xy->yx etc. on all the types, if you think that's best? |
…ion in inspector The labels now match the column-major access as provided to gdscript. I.E. Basis.x.y corresponds to the xy label in the inspector.
|
See #32068 (comment) The labels in this PR match the intuition of game developers. I initially opened PR #32068 with this order. However, @tagcup insisted that labels must be in row/column order, so We could, perhaps, disambiguate by adding a @AThousandShips made a remark above about the dot notation being intuitive:
Also, I opened PR #110526 to fix the bug in Projection, which can be merged ahead of this PR. |








Hi,
When the inspector displays a projection, either as an
@exportfrom a script or a shader uniform, the columns and rows are the wrong way around/transposed.I've fixed this by just swapping the row numbering in inspector_properties.cpp. The ordering is now consistent with i.e. Basis.
Here's the scene I used to test it also:
I love Godot by the way!