Fix inoperative -tbn/-tbnall/-tbnauto options in egg-optchar

This commit is contained in:
rdb 2016-09-27 21:35:38 +02:00
parent 3ee033eeeb
commit aa74caacbe
2 changed files with 28 additions and 0 deletions

View File

@ -37,6 +37,7 @@ This issue fixes several bugs that were still found in 1.9.2.
* Fix asyncFlattenStrong called on nodes without parent
* Fix is_playing() check when playing an animation backwards
* Windows installer no longer clears %PATH% if longer than 1024 chars
* Fix inoperative -tbn/-tbnall/-tbnauto options in egg-optchar
------------------------ RELEASE 1.9.2 ------------------------

View File

@ -111,6 +111,33 @@ post_process_egg_files() {
// Do nothing.
break;
}
if (_got_tbnall) {
for (ei = _eggs.begin(); ei != _eggs.end(); ++ei) {
if ((*ei)->recompute_tangent_binormal(GlobPattern("*"))) {
(*ei)->remove_unused_vertices(true);
}
}
} else {
if (_got_tbnauto) {
for (ei = _eggs.begin(); ei != _eggs.end(); ++ei) {
if ((*ei)->recompute_tangent_binormal_auto()) {
(*ei)->remove_unused_vertices(true);
}
}
}
for (vector_string::const_iterator si = _tbn_names.begin();
si != _tbn_names.end();
++si) {
GlobPattern uv_name(*si);
nout << "Computing tangent and binormal for \"" << uv_name << "\"\n";
for (ei = _eggs.begin(); ei != _eggs.end(); ++ei) {
(*ei)->recompute_tangent_binormal(uv_name);
(*ei)->remove_unused_vertices(true);
}
}
}
}