mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 17:35:34 -04:00
fixed the texture file path problem, there is still one question, I will ask dave tomorrow
This commit is contained in:
parent
9feab0567f
commit
7573bcfebd
@ -170,22 +170,6 @@ copy_maya_file(const Filename &source, const Filename &dest,
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get all the shaders so we can determine the set of textures.
|
||||
_shaders.clear();
|
||||
collect_shaders();
|
||||
int num_shaders = _shaders.get_num_shaders();
|
||||
for (int i = 0; i < num_shaders; i++) {
|
||||
MayaShader *shader = _shaders.get_shader(i);
|
||||
for (size_t j = 0; j < shader->_color.size(); j++) {
|
||||
if (!extract_texture(*shader->get_color_def(j), dir)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!extract_texture(shader->_transparency, dir)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Get the set of externally referenced Maya files.
|
||||
MStringArray refs;
|
||||
MStatus status = MFileIO::getReferences(refs);
|
||||
@ -231,6 +215,22 @@ copy_maya_file(const Filename &source, const Filename &dest,
|
||||
MGlobal::executeCommand(MString(execString.c_str()));
|
||||
}
|
||||
|
||||
// Get all the shaders so we can determine the set of textures.
|
||||
_shaders.clear();
|
||||
collect_shaders();
|
||||
int num_shaders = _shaders.get_num_shaders();
|
||||
for (int i = 0; i < num_shaders; i++) {
|
||||
MayaShader *shader = _shaders.get_shader(i);
|
||||
for (size_t j = 0; j < shader->_color.size(); j++) {
|
||||
if (!extract_texture(*shader->get_color_def(j), dir)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!extract_texture(shader->_transparency, dir)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Now write out the Maya file.
|
||||
if (!_maya->write(dest)) {
|
||||
maya_cat.error()
|
||||
|
Loading…
x
Reference in New Issue
Block a user