From 0fd878e4ca0dbfa8ab084e12cf2b2677a75ee059 Mon Sep 17 00:00:00 2001 From: "Asad M. Zaman" Date: Mon, 24 Jul 2006 23:40:19 +0000 Subject: [PATCH] fixed the mayacopy texture reference bug --- pandatool/src/mayaprogs/mayaToEgg.cxx | 18 ++++++++++++------ pandatool/src/mayaprogs/mayaToEgg.h | 2 +- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/pandatool/src/mayaprogs/mayaToEgg.cxx b/pandatool/src/mayaprogs/mayaToEgg.cxx index ed752dfa2e..7bd6983a01 100644 --- a/pandatool/src/mayaprogs/mayaToEgg.cxx +++ b/pandatool/src/mayaprogs/mayaToEgg.cxx @@ -86,13 +86,13 @@ MayaToEgg() : add_option ("subroot", "name", 0, - "Specifies that only a subroot of the hierarchy in the Maya file should " - "be converted; specifically, the animation under the node or nodes whose " + "Specifies that only a subroot of the geometry in the Maya file should " + "be converted; specifically, the geometry under the node or nodes whose " "name matches the parameter (which may include globbing characters " - "like * or ?). This parameter may not be repeated multiple times to name " + "like * or ?). This parameter may be repeated multiple times to name " "multiple roots. If it is omitted altogether, the entire file is " "converted.", - &MayaToEgg::dispatch_string, NULL, &_subroot); + &MayaToEgg::dispatch_vector_string, NULL, &_subroots); add_option ("subset", "name", 0, @@ -176,9 +176,15 @@ run() { converter._always_show_vertex_color = !_suppress_vertex_color; converter._transform_type = _transform_type; - converter.set_subroot(_subroot); - vector_string::const_iterator si; + if (!_subroots.empty()) { + converter.clear_subroots(); + for (si = _subroots.begin(); si != _subroots.end(); ++si) { + converter.add_subroot(GlobPattern(*si)); + } + } + + //vector_string::const_iterator si; if (!_subsets.empty()) { converter.clear_subsets(); for (si = _subsets.begin(); si != _subsets.end(); ++si) { diff --git a/pandatool/src/mayaprogs/mayaToEgg.h b/pandatool/src/mayaprogs/mayaToEgg.h index 990970011d..8b90526a19 100644 --- a/pandatool/src/mayaprogs/mayaToEgg.h +++ b/pandatool/src/mayaprogs/mayaToEgg.h @@ -42,7 +42,7 @@ protected: bool _respect_maya_double_sided; bool _suppress_vertex_color; MayaToEggConverter::TransformType _transform_type; - string _subroot; + vector_string _subroots; vector_string _subsets; vector_string _ignore_sliders; vector_string _force_joints;