From 28d0f1f9d2ab8866f6a4979209ab99b59eb49a45 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 21 Aug 2003 04:29:26 +0000 Subject: [PATCH] hide invisible nodes --- pandatool/src/mayaegg/mayaToEggConverter.cxx | 24 ++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pandatool/src/mayaegg/mayaToEggConverter.cxx b/pandatool/src/mayaegg/mayaToEggConverter.cxx index 4b2daa87aa..4a3d998396 100644 --- a/pandatool/src/mayaegg/mayaToEggConverter.cxx +++ b/pandatool/src/mayaegg/mayaToEggConverter.cxx @@ -526,6 +526,18 @@ process_model_node(MayaNodeDesc *node_desc) { return false; } + MObject node = dag_path.transform(&status); + + bool visible; + if (!get_bool_attribute(node, "visibility", visible)) { + if (mayaegg_cat.is_debug()) { + mayaegg_cat.debug() + << "Couldn't get visibility attribute for " << dag_node.name() + << "\n"; + } + visible = true; + } + string path = dag_path.fullPathName().asChar(); if (mayaegg_cat.is_debug()) { @@ -537,6 +549,11 @@ process_model_node(MayaNodeDesc *node_desc) { << " (animated)"; } + if (!visible) { + mayaegg_cat.debug(false) + << " (invisible)"; + } + mayaegg_cat.debug(false) << "\n"; } @@ -548,6 +565,13 @@ process_model_node(MayaNodeDesc *node_desc) { get_joint_transform(dag_path, egg_group); } + } else if (!visible) { + if (mayaegg_cat.is_debug()) { + mayaegg_cat.debug() + << "Ignoring invisible node " << path + << "\n"; + } + } else if (dag_node.inUnderWorld()) { if (mayaegg_cat.is_debug()) { mayaegg_cat.debug()