diff --git a/VirtualRobot/Import/COLLADA-light/Example/viewer.cpp b/VirtualRobot/Import/COLLADA-light/Example/viewer.cpp index bacd4519bc6c9f4ea776bfcf84dc1fbe63b5e440..3f674eb33d20b05c3e54cb07c1414fdbd60341db 100644 --- a/VirtualRobot/Import/COLLADA-light/Example/viewer.cpp +++ b/VirtualRobot/Import/COLLADA-light/Example/viewer.cpp @@ -15,7 +15,8 @@ int main(int argc, char **argv ){ InventorRobot robot(root); if (argc==1) - robot.parse("../RobotEditorArmar4.dae"); + //robot.parse("../RobotEditorArmar4.dae"); + robot.parse("/media/sf_host/manikin_creo_4.dae"); else robot.parse(argv[1]); diff --git a/VirtualRobot/Import/COLLADA-light/inventor.cpp b/VirtualRobot/Import/COLLADA-light/inventor.cpp index 71515bcbc3248c9cabcb523ec5779c98f4ac006b..526d05f07c1dfe7e5f32e7cf3366c195f0e0eab0 100644 --- a/VirtualRobot/Import/COLLADA-light/inventor.cpp +++ b/VirtualRobot/Import/COLLADA-light/inventor.cpp @@ -180,8 +180,12 @@ void addGeometry(SoSeparator * separator,const pugi::xml_node &node){ } BOOST_FOREACH(pugi::xpath_node polylist, mesh.select_nodes(".//polylist")){ - - std::vector<float> color = colormap.at(polylist.node().attribute("material").value()); + //std::cout << "id: " << geometry.attribute("id").value() << std::endl; + std::vector<float> color; + if (polylist.node().attribute("material")) + color = colormap.at(polylist.node().attribute("material").value()); + else + color = std::vector<float>(3,0.5); SoMaterial * mat = new SoMaterial; separator->addChild(mat);