Commit Graph

10 Commits

Author SHA1 Message Date
Jammyjamjamman
86905dc6f7 G3D B290: remove line generating mesh code
Line was generated for meshes with duplicate verts, to prevent loss
of vertices. But this was a problem because some duplicate verts
need removing. (E.g. some duplicate verts are generated for UV
mapping. These should be removed during import.) This does mean the
g3d script can lose information on import.
2021-04-15 20:23:21 +01:00
Jammyjamjamman
9725336823 G3D B290: Better vert compare
* Use hashset for more efficient vert comparison. (Suggested by Titi.)
* Create line of verts for basis mesh, for rare cases where there's no
mesh frame where all the verts are different.
* Fix bug in animation where all animation frames shifted by 1 (and last
frame was not included in the animation).
2021-04-13 01:33:57 +01:00
Jammyjamjamman
133a1fc8b5 G3D B290 script: fix importing mesh with 0 size first frame
Script use to always use the first frame as the "basis" mesh.
But this caused problems because sometimes the first mesh had a
size 0 i.e. all the verts are the same. This is fixed by adding
a step to search for a frame with the largest number of verts in
different positions. This frame is then used as the basis mesh.
Errors could still happen if the mesh doesn't have any frames
without overlapping verts.
2021-04-12 01:34:02 +01:00
titiger
69b379201c revert "only selectable"
Because the same effect can be done with an object or plane with fully
transparent texture.
2021-04-10 22:43:28 +02:00
titiger
d873d91660 double sided only by our switch 2021-04-06 01:17:11 +02:00
titiger
3fcaa22d10 fixed double-sided switch and only-selectable
doublesided switch in blender 2.9x did not work before, it was always
rendered single sided in MG.
I added a new switch only-selectable which allows to create unvisible
but selectable meshes. This helps with selection of small units which
can now have an unvisible  hand craftet select object around them for
example..
2021-04-05 23:32:17 +02:00
Jammyjamjamman
d890e865dc Meshes now have "double sided" property and fix quad-to-tris bug.
Meshes were missing a "double sided" property. So they importing/
exporting "double sided" meshes failed.
Converting meshes from quads to triangles was failing, when a mesh was
selected, because not all of the vertices were selected in "edit" mode.
Script now selects all verts are selected when switched to edit mode.
2021-04-03 00:35:42 +01:00
Jammyjamjamman
d7847f5f1c G3D B290: more advanced file searching
If g3d has wrong texture filename it will try other texture
extensions.
Default 3d view has been improved.
2020-12-10 00:42:03 +00:00
Jammyjamjamman
85aca2c12e G£D B290 Script: Bugfixes
* All blender views now show texture.
* Alpha channel on tex image linked to material.
* Fixed bug where texture-less models wouldn't export.
2020-12-09 01:00:27 +00:00
James Sherratt
9e621fbb01
Feat/blender 2.90 support (#204)
* Blender 2.90 import mostly working

* g3d b290 script: Finish support for importing g3d

* G3D B290: exporter now works

Blender exporter now working. There's still a lot to fix in the script but the basic setup works.

* G3D B290: script now exports animations
2020-11-25 19:46:37 +00:00