diff options
-rw-r--r-- | tools/collada/collada.cpp | 3 | ||||
-rw-r--r-- | tools/collada/collada.h | 3 | ||||
-rw-r--r-- | tools/editor/io_plugins/editor_import_collada.cpp | 1 | ||||
-rw-r--r-- | tools/export/blender25/io_scene_dae/export_dae.py | 6 |
4 files changed, 12 insertions, 1 deletions
diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp index f0fde20dfc..11a0e1726b 100644 --- a/tools/collada/collada.cpp +++ b/tools/collada/collada.cpp @@ -736,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 diff --git a/tools/collada/collada.h b/tools/collada/collada.h index 01934a1e76..9340cdd3f3 100644 --- a/tools/collada/collada.h +++ b/tools/collada/collada.h @@ -75,6 +75,7 @@ public: float shininess; bool found_double_sided; bool double_sided; + bool unshaded; String get_texture_path(const String& p_source,Collada& state) const; @@ -83,7 +84,7 @@ public: double_sided=true; found_double_sided=false; shininess=40; - + unshaded=false; } }; diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp index f0aec113d1..80cd54756e 100644 --- a/tools/editor/io_plugins/editor_import_collada.cpp +++ b/tools/editor/io_plugins/editor_import_collada.cpp @@ -467,6 +467,7 @@ Error ColladaImport::_create_material(const String& p_target) { material->set_parameter(FixedMaterial::PARAM_SPECULAR_EXP,effect.shininess); material->set_flag(Material::FLAG_DOUBLE_SIDED,effect.double_sided); + material->set_flag(Material::FLAG_UNSHADED,effect.unshaded); diff --git a/tools/export/blender25/io_scene_dae/export_dae.py b/tools/export/blender25/io_scene_dae/export_dae.py index 3bb440ffe5..2f7d1ddd86 100644 --- a/tools/export/blender25/io_scene_dae/export_dae.py +++ b/tools/export/blender25/io_scene_dae/export_dae.py @@ -351,6 +351,12 @@ class DaeExporter: self.writel(S_FX,5,'<technique profile="GOOGLEEARTH">') self.writel(S_FX,6,'<double_sided>'+["0","1"][double_sided_hint]+"</double_sided>") self.writel(S_FX,5,'</technique>') + + if (material.use_shadeless): + self.writel(S_FX,5,'<technique profile="GODOT">') + self.writel(S_FX,6,'<unshaded>1</unshaded>') + self.writel(S_FX,5,'</technique>') + self.writel(S_FX,4,'</extra>') self.writel(S_FX,3,'</technique>') |