Merge pull request #114659 from aaronfranke/default-naming-version-to-latest

Default 3D model importer naming versions to the latest version
This commit is contained in:
Rémi Verschelde
2026-01-13 11:06:15 +01:00
6 changed files with 0 additions and 31 deletions

View File

@@ -144,10 +144,4 @@ void EditorSceneFormatImporterFBX2GLTF::handle_compatibility_options(HashMap<Str
if (!p_import_params.has("fbx/importer")) {
p_import_params["fbx/importer"] = EditorSceneFormatImporterUFBX::FBX_IMPORTER_UFBX;
}
if (!p_import_params.has("fbx/naming_version")) {
// If a .fbx's existing import file is missing the FBX
// naming compatibility version, we need to use version 1.
// Version 1 is the behavior before this option was added.
p_import_params["fbx/naming_version"] = 1;
}
}

View File

@@ -106,10 +106,4 @@ void EditorSceneFormatImporterUFBX::handle_compatibility_options(HashMap<StringN
if (!p_import_params.has("fbx/importer")) {
p_import_params["fbx/importer"] = EditorSceneFormatImporterUFBX::FBX_IMPORTER_FBX2GLTF;
}
if (!p_import_params.has("fbx/naming_version")) {
// If a .fbx's existing import file is missing the FBX
// naming compatibility version, we need to use version 1.
// Version 1 is the behavior before this option was added.
p_import_params["fbx/naming_version"] = 1;
}
}

View File

@@ -389,15 +389,6 @@ void EditorSceneFormatImporterBlend::get_import_options(const String &p_path, Li
r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::INT, "gltf/naming_version", PROPERTY_HINT_ENUM, "Godot 4.0 or 4.1,Godot 4.2 to 4.4,Godot 4.5 or later"), 2));
}
void EditorSceneFormatImporterBlend::handle_compatibility_options(HashMap<StringName, Variant> &p_import_params) const {
if (!p_import_params.has("gltf/naming_version")) {
// If a .blend's existing import file is missing the glTF
// naming compatibility version, we need to use version 1.
// Version 1 is the behavior before this option was added.
p_import_params["gltf/naming_version"] = 1;
}
}
///////////////////////////
static bool _test_blender_path(const String &p_path, String *r_err = nullptr) {

View File

@@ -73,7 +73,6 @@ public:
List<ResourceImporter::ImportOption> *r_options) override;
virtual Variant get_option_visibility(const String &p_path, const String &p_scene_import_type, const String &p_option,
const HashMap<StringName, Variant> &p_options) override;
virtual void handle_compatibility_options(HashMap<StringName, Variant> &p_import_params) const override;
};
class LineEdit;

View File

@@ -89,14 +89,6 @@ void EditorSceneFormatImporterGLTF::get_import_options(const String &p_path,
}
}
void EditorSceneFormatImporterGLTF::handle_compatibility_options(HashMap<StringName, Variant> &p_import_params) const {
if (!p_import_params.has("gltf/naming_version")) {
// If an existing import file is missing the glTF
// compatibility version, we need to use version 0.
p_import_params["gltf/naming_version"] = 0;
}
}
Variant EditorSceneFormatImporterGLTF::get_option_visibility(const String &p_path, const String &p_scene_import_type,
const String &p_option, const HashMap<StringName, Variant> &p_options) {
return true;

View File

@@ -45,7 +45,6 @@ public:
List<String> *r_missing_deps, Error *r_err = nullptr) override;
virtual void get_import_options(const String &p_path,
List<ResourceImporter::ImportOption> *r_options) override;
virtual void handle_compatibility_options(HashMap<StringName, Variant> &p_import_params) const override;
virtual Variant get_option_visibility(const String &p_path, const String &p_scene_import_type,
const String &p_option, const HashMap<StringName, Variant> &p_options) override;
};