Mercurial > hg > Game > Cerium
changeset 1290:48a65461ed84 draft
can read float_array in collada file.
author | Taiki TAIRA <e095767@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 01 Dec 2011 23:53:32 +0900 |
parents | 6fc9fd03a4fd |
children | 1486f2d17e4a |
files | Renderer/Engine/SceneGraphRoot.cc |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/SceneGraphRoot.cc Thu Dec 01 23:40:58 2011 +0900 +++ b/Renderer/Engine/SceneGraphRoot.cc Thu Dec 01 23:53:32 2011 +0900 @@ -261,7 +261,7 @@ xml_walk( SceneGraphRoot* self, xmlNodePtr cur) { /*get float array.*/ - printf("name = %s\n", cur->name); + printf("name = %s, child:%s\n", cur->name, cur->children); if (!xmlStrcmp(cur->name, (xmlChar*)"float_array")) { char *cont =(char*)xmlNodeGetContent(cur); @@ -273,6 +273,10 @@ int count = atoi((char*)xmlGetProp(cur, (xmlChar*)"count")); printf("id:%s count:%d cont:%s\n", id, count, cont); + + if (cur->children == "(null)") { + return; + } } for (cur=cur->children; cur; cur=cur->next){