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

Suspect painttexturewin.cc code ignores iterator in favor of front() #54

Closed m-7761 closed 3 years ago

m-7761 commented 5 years ago

https://github.com/zturtleman/mm3d/blob/master/src/implui/painttexturewin.cc#L79 looks pretty bogus.

Note also that the addTriangles subroutine is used precisely once, and builds the same selection list that is done just prior to calling it.

Maybe this is interesting, but I would like a second set of eyeballs while I'm rewriting this code. Is this feature working accordingly?

EDITED: What I suspect is happening is the foundTexture is normally satisfied by the first triangle. If not the loop achieves nothing.

zturtleman commented 5 years ago

Thanks, fixed in https://github.com/zturtleman/mm3d/compare/f0208fc920dc7a9467a62213b907fe4df275e856...5e5c8a5c7d036c784bcff0236d1db036f50accc7.

m-7761 commented 5 years ago

Here (https://github.com/zturtleman/mm3d/blob/dcb15f3440a62376ed2e09d01960b58426c13ef6/src/implui/texturecoord.cc#L193) is another instance of this.

m-7761 commented 5 years ago

BTW: I looked at getTriangleGroup... the comments:

// FIXME cache current texture value and don't change it if we // don't have to (to prevent resetting zoom and center)

Aren't kidding. That's ridiculously work intensive. I think just doing it for the first triangle should suffice until there is a decent organizing principle.

zturtleman commented 3 years ago

Mick Pearson wrote:

Here (

https://github.com/zturtleman/mm3d/blob/dcb15f3440a62376ed2e09d01960b58426c13ef6/src/implui/texturecoord.cc#L193 ) is another instance of this.

Thanks. Fixed in ebdd607a40e780089e5ed9e4c8b764e0df1d6197.