From 9124b6aeb1a85162075a95c3b72fcdb4091614c1 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 12 Mar 2003 00:16:09 +0000 Subject: [PATCH] tweaks to mayapview --- pandatool/src/mayaprogs/mayaPview.cxx | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pandatool/src/mayaprogs/mayaPview.cxx b/pandatool/src/mayaprogs/mayaPview.cxx index 5e4a3c4f09..49e0ab13ba 100755 --- a/pandatool/src/mayaprogs/mayaPview.cxx +++ b/pandatool/src/mayaprogs/mayaPview.cxx @@ -20,6 +20,7 @@ #include "mayaToEggConverter.h" #include "eggData.h" #include "load_egg_file.h" +#include "config_util.h" // We must define this to prevent Maya from doubly-declaring its // MApiVersion string in this file as well as in libmayaegg. @@ -28,6 +29,7 @@ #include "pre_maya_include.h" #include #include +#include #include "post_maya_include.h" //////////////////////////////////////////////////////////////////// @@ -100,7 +102,25 @@ convert(const NodePath &parent) { // We always want polygon output since we want to be able to see the // results. - converter._polygon_output = true; + + // Actually, for now we'll leave this false, because the nurbs + // tesselation code in MayaToEggConverter is destructive to the + // original nurbs. + // converter._polygon_output = true; + converter._polygon_output = false; + + PathReplace *path_replace = converter.get_path_replace(); + + // Accept relative pathnames in the Maya file. + Filename source_file = + Filename::from_os_specific(MFileIO::currentFile().asChar()); + string source_dir = source_file.get_dirname(); + if (!source_dir.empty()) { + path_replace->_path.append_directory(source_dir); + } + + // Also search along the model path. + path_replace->_path.append_path(get_model_path()); EggData egg_data; converter.set_egg_data(&egg_data, false);