mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
Added tangent computation and removed dead vertices
This commit is contained in:
parent
36517ac3b7
commit
b98db4a8d8
@ -132,6 +132,11 @@ bool MaxToEggConverter::convert(MaxEggOptions *options) {
|
|||||||
reparent_decals(_egg_data);
|
reparent_decals(_egg_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (all_ok) {
|
||||||
|
_egg_data->recompute_tangent_binormal_auto();
|
||||||
|
_egg_data->remove_unused_vertices(true);
|
||||||
|
}
|
||||||
|
|
||||||
if (all_ok) {
|
if (all_ok) {
|
||||||
Filename fn = Filename::from_os_specific(_options->_file_name);
|
Filename fn = Filename::from_os_specific(_options->_file_name);
|
||||||
return _egg_data->write_egg(fn);
|
return _egg_data->write_egg(fn);
|
||||||
@ -869,6 +874,7 @@ get_panda_material(Mtl *mtl, MtlID matID) {
|
|||||||
pandaMat._any_diffuse = false;
|
pandaMat._any_diffuse = false;
|
||||||
pandaMat._any_opacity = false;
|
pandaMat._any_opacity = false;
|
||||||
pandaMat._any_gloss = false;
|
pandaMat._any_gloss = false;
|
||||||
|
pandaMat._any_normal = false;
|
||||||
|
|
||||||
// If it's a multi-material, dig down.
|
// If it's a multi-material, dig down.
|
||||||
|
|
||||||
@ -1120,6 +1126,7 @@ void MaxToEggConverter::analyze_normal_maps(PandaMaterial &pandaMat, Texmap *mat
|
|||||||
if (mat == 0) return;
|
if (mat == 0) return;
|
||||||
|
|
||||||
if (mat->ClassID() == Class_ID(BMTEX_CLASS_ID, 0)) {
|
if (mat->ClassID() == Class_ID(BMTEX_CLASS_ID, 0)) {
|
||||||
|
pandaMat._any_normal = true;
|
||||||
BitmapTex *ntex = (BitmapTex *)mat;
|
BitmapTex *ntex = (BitmapTex *)mat;
|
||||||
|
|
||||||
Filename fullpath, outpath;
|
Filename fullpath, outpath;
|
||||||
|
@ -52,6 +52,7 @@ class MaxToEggConverter {
|
|||||||
bool _any_diffuse;
|
bool _any_diffuse;
|
||||||
bool _any_opacity;
|
bool _any_opacity;
|
||||||
bool _any_gloss;
|
bool _any_gloss;
|
||||||
|
bool _any_normal;
|
||||||
};
|
};
|
||||||
typedef std::map<Mtl*,PandaMaterial> MaterialMap;
|
typedef std::map<Mtl*,PandaMaterial> MaterialMap;
|
||||||
MaxEggOptions *_options;
|
MaxEggOptions *_options;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user