// 解析 Xml public void parseXml() { clear(); string path = ExportUtil.getDataPath("Res/Config/Tool/ExportSkelAnimatorController.xml"); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(path); XmlNode rootNode = xmlDoc.SelectSingleNode("Root"); XmlNodeList controllerNodeList = rootNode.SelectNodes("Controller"); XmlElement controllerElem; XmlAnimatorController controller; foreach (XmlNode controllerNode in controllerNodeList) { controllerElem = (XmlElement)controllerNode; controller = new XmlAnimatorController(); //m_curXmlAnimatorController = controller; m_controllerList.Add(controller); controller.parseXml(controllerElem); } XmlNodeList pathNodeList = rootNode.SelectNodes("Path"); XmlElement pathElem = null; XmlPath xmlPath = null; foreach (XmlNode pathNode in pathNodeList) { pathElem = (XmlElement)pathNode; xmlPath = new XmlPath(); m_xmlPathList.Add(xmlPath); xmlPath.parseXml(pathElem); } }
protected void onFindOneFile(string fullPath) { string ext = ExportUtil.getFileExt(fullPath); string nameNoExt = ExportUtil.getFileNameNoExt(fullPath); XmlAnimatorController controller = null; if (ExportUtil.FBX == ext) { if (!nameNoExt.Contains(ExportUtil.AT)) // 如果包含 @ ,就说明是一个动画 { m_xmlTmp.SetAttribute("outname", nameNoExt); controller = new XmlAnimatorController(); ExportAnimatorControllerSys.m_instance.controllerList.Add(controller); controller.parseXml(m_xmlTmp); // 调整完整的文件名字 controller.adjustFileName(nameNoExt); } } }
protected void onFindOneFile(string fullPath, string name) { string ext = UtilPath.getFileExt(fullPath); string nameNoExt = UtilPath.getFileNameNoExt(fullPath); XmlAnimatorController controller = null; if (ExportUtil.FBX == ext) { if (!nameNoExt.Contains(ExportUtil.AT)) // 如果包含 @ ,就说明是一个动画 { m_xmlTmp.SetAttribute("outname", nameNoExt); controller = new XmlAnimatorController(); ExportAnimatorControllerSys.m_instance.controllerList.Add(controller); controller.parseXml(m_xmlTmp); // 调整完整的文件名字 controller.adjustFileName(nameNoExt); } } }
// 解析 Xml public void parseXml() { clear(); string path = ExportUtil.getDataPath("Res/Config/Tool/ExportSkelAnimatorController.xml"); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(path); XmlNode rootNode = xmlDoc.SelectSingleNode("Root"); XmlNodeList controllerNodeList = rootNode.SelectNodes("Controller"); XmlElement controllerElem; XmlAnimatorController controller; foreach (XmlNode controllerNode in controllerNodeList) { controllerElem = (XmlElement)controllerNode; controller = new XmlAnimatorController(); //m_curXmlAnimatorController = controller; m_controllerList.Add(controller); controller.parseXml(controllerElem); } XmlNodeList pathNodeList = rootNode.SelectNodes("Path"); XmlElement pathElem = null; XmlPath xmlPath = null; foreach (XmlNode pathNode in pathNodeList) { pathElem = (XmlElement)pathNode; xmlPath = new XmlPath(); m_xmlPathList.Add(xmlPath); xmlPath.parseXml(pathElem); } }