summaryrefslogtreecommitdiff
path: root/tools/collada/collada.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/collada/collada.cpp')
-rw-r--r--tools/collada/collada.cpp28
1 files changed, 27 insertions, 1 deletions
diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp
index 8f40ec1469..11a0e1726b 100644
--- a/tools/collada/collada.cpp
+++ b/tools/collada/collada.cpp
@@ -482,6 +482,24 @@ Transform Collada::_read_transform(XMLParser& parser) {
return _read_transform_from_array(array);
}
+String Collada::_read_empty_draw_type(XMLParser& parser) {
+
+ String empty_draw_type = "";
+
+ if (parser.is_empty())
+ return empty_draw_type;
+
+ while (parser.read()==OK) {
+ if (parser.get_node_type() == XMLParser::NODE_TEXT) {
+ empty_draw_type = parser.get_node_data();
+ }
+ else
+ if (parser.get_node_type() == XMLParser::NODE_ELEMENT_END)
+ break; // end parsing text
+ }
+ return empty_draw_type;
+}
+
Variant Collada::_parse_param(XMLParser& parser) {
if (parser.is_empty())
@@ -718,6 +736,9 @@ void Collada::_parse_effect_material(XMLParser& parser,Effect &effect,String &id
effect.found_double_sided=true;
effect.double_sided=parser.get_node_data().to_int();
COLLADA_PRINT("double sided: "+itos(parser.get_node_data().to_int()));
+ } else if (parser.get_node_name()=="unshaded") {
+ parser.read();
+ effect.unshaded=parser.get_node_data().to_int();
} else if (parser.get_node_name()=="bump") {
// color or texture types
@@ -1664,6 +1685,8 @@ Collada::Node* Collada::_parse_visual_scene_node(XMLParser& parser) {
Vector<Node::XForm> xform_list;
Vector<Node*> children;
+
+ String empty_draw_type="";
Node *node=NULL;
@@ -1771,7 +1794,9 @@ Collada::Node* Collada::_parse_visual_scene_node(XMLParser& parser) {
xform_list.push_back(xf);
- } else if (section=="technique" || section=="extra") {
+ } else if (section=="empty_draw_type") {
+ empty_draw_type = _read_empty_draw_type(parser);
+ } else if (section == "technique" || section=="extra") {
} else if (section!="node") {
//usually what defines the type of node
@@ -1817,6 +1842,7 @@ Collada::Node* Collada::_parse_visual_scene_node(XMLParser& parser) {
node->name=name;
node->id=id;
+ node->empty_draw_type=empty_draw_type;
if (node->children.size()==1) {
if (node->children[0]->noname && !node->noname) {