From 7573bcfebd6b6fdef525f389cd7412fdb3fb9dba Mon Sep 17 00:00:00 2001 From: "Asad M. Zaman" Date: Tue, 7 Jun 2005 01:25:42 +0000 Subject: [PATCH] fixed the texture file path problem, there is still one question, I will ask dave tomorrow --- pandatool/src/mayaprogs/mayaCopy.cxx | 32 ++++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pandatool/src/mayaprogs/mayaCopy.cxx b/pandatool/src/mayaprogs/mayaCopy.cxx index 1caa0f7556..337053e4e7 100644 --- a/pandatool/src/mayaprogs/mayaCopy.cxx +++ b/pandatool/src/mayaprogs/mayaCopy.cxx @@ -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()