zturtleman / mm3d

Maverick Model 3D is a 3D model editor and animator for games.
https://clover.moe/mm3d
GNU General Public License v2.0
116 stars 24 forks source link

Left/Right views mislabeled. #77

Closed m-7761 closed 5 years ago

m-7761 commented 5 years ago

The "Right" view shows the right side of the model, instead of the view from the viewer's right. This looks unnatural in the editor. Blender uses the other sense, and I suspect that is more correct according to how professionals work.

I bring it up, only because there are a few different ways to address the problem. The simplest is to swap the labels in the UI code. Otherwise the enum values can be swapped in the ModelViewport code, which is very simple too. I think that way is better since it doesn't create a disconnect in the code, but it's more invasive.

I don't believe the Model class actually uses these enum values, even though they are stored in it (this is a hack.) I think mainly Tool uses theses values, though few do. I think I'm changing the coordinate conventions of the Tool code ATM, in which case it wouldn't hurt to lump this in.

The call for the change is to move the ModelViewport (and TextureWidget) code out of the UI code, in which case it should be switched over to OpenGL coordinates, instead of Qt coordinates, which is just easier to implement since the X/Y components use the same code.

P.S. I've changed my UI to use Blender's convention for viewports. It puts perspective in the top-right box in a quad view. Then in the bottom-left is the front view. The top is above it and the right is beside it. I think this is pretty natural, mainly since it makes sense to have the top on top.

m-7761 commented 5 years ago

FWIW I just made this change. It just amounts to reversing the sense of left/right in modelviewport.cc in a few places (about 5) and removing Model::getVertexCoords2d to implui/texturecoord.cc where it was used. I think it's best to not encode this kind of thing into Model and it's a simple thing that can be done in the window's code.

It took an enum called Model::ProjectionDirectionE that is used nowhere else, and so should be removed also. Perhaps it was once of use, but got cannibalized, or perhaps it should not have been.

EDITED: I think it's also a misleading enum, since it has the word Projection in it, but does not deal with the capital-P "Projection" objects.