Improved 3D Scene Importer

* Added option for importers to show an Advanced settings dialog
* Created advanced settings dialog for Scene Importer
* Cleaned up importers (remove many old/unused options)
* Added the ability to customize every node, material, mesh and animation individually
* Saving to animations and meshes to files is now a manual process, making it more predictable
* Added the ability for materials to be replaced by external files (or to be made external, up to you).
* When doubleclicking an impoted scene in the filesystem dock, it automatically shows the import settings instead of asking to open it.

WARNING: Lightmap UV unwrap is not working, it needs to be re-made.
This commit is contained in:
Juan Linietsky
2021-03-19 09:57:52 -03:00
parent 07f076fa4f
commit 97a3a66220
25 changed files with 2650 additions and 692 deletions

View File

@@ -1059,6 +1059,10 @@ void SurfaceTool::set_material(const Ref<Material> &p_material) {
material = p_material;
}
Ref<Material> SurfaceTool::get_material() const {
return material;
}
void SurfaceTool::clear() {
begun = false;
primitive = Mesh::PRIMITIVE_LINES;
@@ -1088,6 +1092,10 @@ void SurfaceTool::set_custom_format(int p_index, CustomFormat p_format) {
ERR_FAIL_COND(begun);
last_custom_format[p_index] = p_format;
}
Mesh::PrimitiveType SurfaceTool::get_primitive() const {
return primitive;
}
SurfaceTool::CustomFormat SurfaceTool::get_custom_format(int p_index) const {
ERR_FAIL_INDEX_V(p_index, RS::ARRAY_CUSTOM_COUNT, CUSTOM_MAX);
return last_custom_format[p_index];
@@ -1174,6 +1182,7 @@ void SurfaceTool::_bind_methods() {
ClassDB::bind_method(D_METHOD("generate_lod", "nd_threshold", "target_index_count"), &SurfaceTool::generate_lod, DEFVAL(3));
ClassDB::bind_method(D_METHOD("set_material", "material"), &SurfaceTool::set_material);
ClassDB::bind_method(D_METHOD("get_primitive"), &SurfaceTool::get_primitive);
ClassDB::bind_method(D_METHOD("clear"), &SurfaceTool::clear);