09th / YABEE

Export models from the Blender to Panda3D game engine
MIT License
107 stars 39 forks source link

Material texture fixes #11

Closed eswartz closed 9 years ago

eswartz commented 9 years ago

Hi, thanks for maintaining this exporter. It works pretty well except for some weird cases, which this pull request addresses.

(BTW, not sure why it can't automatically merge -- I think I'm up-to-date...?)

Fix several issues in material per-face mapping and texture mapping

-- track per-material-face textures, which can differ (e.g. in a skybox)
-- track original names of material texture slots (in kind of a nonobvious way since we can't add a yabee_name property)
-- fix several exceptions for faces with materials but no textures (e.g. just colors)

Added test .blend / .egg files to show the expected results (feel free to leave this out if it just takes up space)

eswartz commented 9 years ago

Oh, I just saw where the conflicts are. I will update soon...

eswartz commented 9 years ago

OK, duh, I "rewrote" some other people's bug fixes, thinking they were my own.

09th commented 9 years ago

Thanks!

tobspr commented 9 years ago

I just found a few errors in that code: 1) It ignores texture sort (as the new code generates a dict first, which is not guaranteed to preserve order) 2) It ignores material textures when there is an active texture