diff options
Diffstat (limited to 'editor/import')
-rw-r--r-- | editor/import/editor_import_collada.cpp | 35 | ||||
-rw-r--r-- | editor/import/editor_import_collada.h | 1 | ||||
-rw-r--r-- | editor/import/resource_importer_csv_translation.cpp | 1 | ||||
-rw-r--r-- | editor/import/resource_importer_csv_translation.h | 1 | ||||
-rw-r--r-- | editor/import/resource_importer_obj.cpp | 1 | ||||
-rw-r--r-- | editor/import/resource_importer_obj.h | 1 | ||||
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 35 | ||||
-rw-r--r-- | editor/import/resource_importer_scene.h | 1 | ||||
-rw-r--r-- | editor/import/resource_importer_texture.cpp | 1 | ||||
-rw-r--r-- | editor/import/resource_importer_texture.h | 1 | ||||
-rw-r--r-- | editor/import/resource_importer_wav.cpp | 1 | ||||
-rw-r--r-- | editor/import/resource_importer_wav.h | 1 |
12 files changed, 47 insertions, 33 deletions
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp index 93614fb511..dcbc509865 100644 --- a/editor/import/editor_import_collada.cpp +++ b/editor/import/editor_import_collada.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -364,7 +365,7 @@ Error ColladaImport::_create_material(const String &p_target) { ERR_FAIL_COND_V(!collada.state.effect_map.has(src_mat.instance_effect), ERR_INVALID_PARAMETER); Collada::Effect &effect = collada.state.effect_map[src_mat.instance_effect]; - Ref<FixedSpatialMaterial> material = memnew(FixedSpatialMaterial); + Ref<SpatialMaterial> material = memnew(SpatialMaterial); if (src_mat.name != "") material->set_name(src_mat.name); @@ -381,15 +382,15 @@ Error ColladaImport::_create_material(const String &p_target) { Ref<Texture> texture = ResourceLoader::load(texfile, "Texture"); if (texture.is_valid()) { - material->set_texture(FixedSpatialMaterial::TEXTURE_ALBEDO, texture); + material->set_texture(SpatialMaterial::TEXTURE_ALBEDO, texture); material->set_albedo(Color(1, 1, 1, 1)); - //material->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,Color(1,1,1,1)); + //material->set_parameter(SpatialMaterial::PARAM_DIFFUSE,Color(1,1,1,1)); } else { missing_textures.push_back(texfile.get_file()); } } } else { - //material->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,effect.diffuse.color); + //material->set_parameter(SpatialMaterial::PARAM_DIFFUSE,effect.diffuse.color); } // SPECULAR @@ -401,11 +402,11 @@ Error ColladaImport::_create_material(const String &p_target) { Ref<Texture> texture = ResourceLoader::load(texfile, "Texture"); if (texture.is_valid()) { - material->set_texture(FixedSpatialMaterial::TEXTURE_SPECULAR, texture); + material->set_texture(SpatialMaterial::TEXTURE_SPECULAR, texture); material->set_specular(Color(1, 1, 1, 1)); - //material->set_texture(FixedSpatialMaterial::PARAM_SPECULAR,texture); - //material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR,Color(1,1,1,1)); + //material->set_texture(SpatialMaterial::PARAM_SPECULAR,texture); + //material->set_parameter(SpatialMaterial::PARAM_SPECULAR,Color(1,1,1,1)); } else { missing_textures.push_back(texfile.get_file()); } @@ -424,18 +425,18 @@ Error ColladaImport::_create_material(const String &p_target) { Ref<Texture> texture = ResourceLoader::load(texfile, "Texture"); if (texture.is_valid()) { - material->set_feature(FixedSpatialMaterial::FEATURE_EMISSION, true); - material->set_texture(FixedSpatialMaterial::TEXTURE_EMISSION, texture); + material->set_feature(SpatialMaterial::FEATURE_EMISSION, true); + material->set_texture(SpatialMaterial::TEXTURE_EMISSION, texture); material->set_emission(Color(1, 1, 1, 1)); - //material->set_parameter(FixedSpatialMaterial::PARAM_EMISSION,Color(1,1,1,1)); + //material->set_parameter(SpatialMaterial::PARAM_EMISSION,Color(1,1,1,1)); } else { missing_textures.push_back(texfile.get_file()); } } } else { if (effect.emission.color != Color()) { - material->set_feature(FixedSpatialMaterial::FEATURE_EMISSION, true); + material->set_feature(SpatialMaterial::FEATURE_EMISSION, true); material->set_emission(effect.emission.color); } } @@ -449,11 +450,11 @@ Error ColladaImport::_create_material(const String &p_target) { Ref<Texture> texture = ResourceLoader::load(texfile, "Texture"); if (texture.is_valid()) { - material->set_feature(FixedSpatialMaterial::FEATURE_NORMAL_MAPPING, true); - material->set_texture(FixedSpatialMaterial::TEXTURE_NORMAL, texture); + material->set_feature(SpatialMaterial::FEATURE_NORMAL_MAPPING, true); + material->set_texture(SpatialMaterial::TEXTURE_NORMAL, texture); //material->set_emission(Color(1,1,1,1)); - //material->set_texture(FixedSpatialMaterial::PARAM_NORMAL,texture); + //material->set_texture(SpatialMaterial::PARAM_NORMAL,texture); } else { //missing_textures.push_back(texfile.get_file()); } @@ -464,9 +465,9 @@ Error ColladaImport::_create_material(const String &p_target) { material->set_roughness(roughness); if (effect.double_sided) { - material->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED); + material->set_cull_mode(SpatialMaterial::CULL_DISABLED); } - material->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, effect.unshaded); + material->set_flag(SpatialMaterial::FLAG_UNSHADED, effect.unshaded); material_cache[p_target] = material; return OK; @@ -1000,7 +1001,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<Mesh> &p_mesh, c { - Ref<FixedSpatialMaterial> material; + Ref<SpatialMaterial> material; //find material Mesh::PrimitiveType primitive = Mesh::PRIMITIVE_TRIANGLES; diff --git a/editor/import/editor_import_collada.h b/editor/import/editor_import_collada.h index f9e9c10980..2c60916d52 100644 --- a/editor/import/editor_import_collada.h +++ b/editor/import/editor_import_collada.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp index 3be89920fb..ea43477dc3 100644 --- a/editor/import/resource_importer_csv_translation.cpp +++ b/editor/import/resource_importer_csv_translation.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/editor/import/resource_importer_csv_translation.h b/editor/import/resource_importer_csv_translation.h index 8b1e1b5827..748c6264df 100644 --- a/editor/import/resource_importer_csv_translation.h +++ b/editor/import/resource_importer_csv_translation.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index 145071d4cb..19fd1208b9 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h index de2f2eceda..b7443c71a6 100644 --- a/editor/import/resource_importer_obj.h +++ b/editor/import/resource_importer_obj.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 8a78376f13..755f4eb219 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -157,7 +158,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> memdelete(p_node); return NULL; } - +#if 0 if (p_node->cast_to<MeshInstance>()) { MeshInstance *mi = p_node->cast_to<MeshInstance>(); @@ -177,18 +178,18 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> Ref<Mesh> m = mi->get_mesh(); for (int i = 0; i < m->get_surface_count(); i++) { - Ref<FixedSpatialMaterial> fm = m->surface_get_material(i); + Ref<SpatialMaterial> fm = m->surface_get_material(i); if (fm.is_valid()) { //fm->set_flag(Material::FLAG_UNSHADED,true); //fm->set_flag(Material::FLAG_DOUBLE_SIDED,true); //fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER); - //fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); + //fm->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true); } } } } } - +#endif if (p_node->cast_to<MeshInstance>()) { MeshInstance *mi = p_node->cast_to<MeshInstance>(); @@ -199,19 +200,19 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> for (int i = 0; i < m->get_surface_count(); i++) { - Ref<FixedSpatialMaterial> mat = m->surface_get_material(i); + Ref<SpatialMaterial> mat = m->surface_get_material(i); if (!mat.is_valid()) continue; if (_teststr(mat->get_name(), "alpha")) { - mat->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true); + mat->set_feature(SpatialMaterial::FEATURE_TRANSPARENT, true); mat->set_name(_fixstr(mat->get_name(), "alpha")); } if (_teststr(mat->get_name(), "vcol")) { - mat->set_flag(FixedSpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true); - mat->set_flag(FixedSpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true); + mat->set_flag(SpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true); + mat->set_flag(SpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true); mat->set_name(_fixstr(mat->get_name(), "vcol")); } } @@ -242,7 +243,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> } } } - +#if 0 if (p_node->cast_to<MeshInstance>()) { MeshInstance *mi = p_node->cast_to<MeshInstance>(); @@ -277,12 +278,12 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> Ref<Mesh> m = mi->get_mesh(); for (int i = 0; i < m->get_surface_count(); i++) { - Ref<FixedSpatialMaterial> fm = m->surface_get_material(i); + Ref<SpatialMaterial> fm = m->surface_get_material(i); if (fm.is_valid()) { //fm->set_flag(Material::FLAG_UNSHADED,true); //fm->set_flag(Material::FLAG_DOUBLE_SIDED,true); //fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER); - //fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); + //fm->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true); } } } @@ -290,6 +291,8 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> } } } + +#endif #if 0 if (p_flags&SCENE_FLAG_CREATE_LODS && p_node->cast_to<MeshInstance>()) { @@ -325,12 +328,12 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> Ref<Mesh> m = mi->get_mesh(); for(int i=0;i<m->get_surface_count();i++) { - Ref<FixedSpatialMaterial> fm = m->surface_get_material(i); + Ref<SpatialMaterial> fm = m->surface_get_material(i); if (fm.is_valid()) { fm->set_flag(Material::FLAG_UNSHADED,true); fm->set_flag(Material::FLAG_DOUBLE_SIDED,true); fm->set_hint(Material::HINT_NO_DEPTH_DRAW,true); - fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); + fm->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true); } } }*/ @@ -687,16 +690,16 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh> for (int i = 0; i < mesh->get_surface_count(); i++) { - Ref<FixedSpatialMaterial> fm = mesh->surface_get_material(i); + Ref<SpatialMaterial> fm = mesh->surface_get_material(i); if (fm.is_valid()) { String name = fm->get_name(); /* if (_teststr(name,"alpha")) { - fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); + fm->set_fixed_flag(SpatialMaterial::FLAG_USE_ALPHA,true); name=_fixstr(name,"alpha"); } if (_teststr(name,"vcol")) { - fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_COLOR_ARRAY,true); + fm->set_fixed_flag(SpatialMaterial::FLAG_USE_COLOR_ARRAY,true); name=_fixstr(name,"vcol"); }*/ fm->set_name(name); diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index 799d458837..9f7b1a84e6 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index cb419e0f4a..f0dcc4a298 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h index 9be016884d..196eb48469 100644 --- a/editor/import/resource_importer_texture.h +++ b/editor/import/resource_importer_texture.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp index 751fd36414..92c1aa47db 100644 --- a/editor/import/resource_importer_wav.cpp +++ b/editor/import/resource_importer_wav.cpp @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h index b78ab1e7bf..6b4f86e641 100644 --- a/editor/import/resource_importer_wav.h +++ b/editor/import/resource_importer_wav.h @@ -6,6 +6,7 @@ /* http://www.godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ |