fixed the texture file path problem, there is still one question, I will ask dave tomorrow

This commit is contained in:
Asad M. Zaman 2005-06-07 01:25:42 +00:00
parent 9feab0567f
commit 7573bcfebd

View File

@ -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()