mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
Better handling of -omittex:
-- now don't even try to load the shaders, in addition to not copying the textures
This commit is contained in:
parent
5b7c19ee73
commit
f967af05e2
@ -268,15 +268,17 @@ copy_maya_file(const Filename &source, const Filename &dest,
|
|||||||
_curr_idx++;
|
_curr_idx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get all the shaders so we can determine the set of textures.
|
if (!_omit_tex) {
|
||||||
_shaders.clear();
|
// Get all the shaders so we can determine the set of textures.
|
||||||
collect_shaders();
|
_shaders.clear();
|
||||||
int num_shaders = _shaders.get_num_shaders();
|
collect_shaders();
|
||||||
for (int i = 0; i < num_shaders; i++) {
|
int num_shaders = _shaders.get_num_shaders();
|
||||||
MayaShader *shader = _shaders.get_shader(i);
|
for (int i = 0; i < num_shaders; i++) {
|
||||||
for (size_t j = 0; j < shader->_all_maps.size(); j++) {
|
MayaShader *shader = _shaders.get_shader(i);
|
||||||
if (!extract_texture(*shader->_all_maps[j], dir)) {
|
for (size_t j = 0; j < shader->_all_maps.size(); j++) {
|
||||||
return false;
|
if (!extract_texture(*shader->_all_maps[j], dir)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -329,7 +331,7 @@ copy_maya_file(const Filename &source, const Filename &dest,
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
bool MayaCopy::
|
bool MayaCopy::
|
||||||
extract_texture(MayaShaderColorDef &color_def, CVSSourceDirectory *dir) {
|
extract_texture(MayaShaderColorDef &color_def, CVSSourceDirectory *dir) {
|
||||||
Filename texture_filename =
|
Filename texture_filename =
|
||||||
_path_replace->convert_path(color_def._texture_filename);
|
_path_replace->convert_path(color_def._texture_filename);
|
||||||
if (!texture_filename.exists()) {
|
if (!texture_filename.exists()) {
|
||||||
nout << "*** Error: texture " << texture_filename
|
nout << "*** Error: texture " << texture_filename
|
||||||
|
Loading…
x
Reference in New Issue
Block a user