You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-21 14:57:09 +00:00
Update vertex color import to handle Blender 4.2 upwards
Blender commit0f0a8df8a9which is landing in 4.2 deprecated `vertex_colors` GLTF property, use `export_vertex_color` instead. (cherry picked from commit7864abbeec)
This commit is contained in:
@@ -201,11 +201,19 @@ Node *EditorSceneFormatImporterBlend::import_scene(const String &p_path, uint32_
|
|||||||
} else {
|
} else {
|
||||||
parameters_map["export_lights"] = false;
|
parameters_map["export_lights"] = false;
|
||||||
}
|
}
|
||||||
|
if (blender_major_version > 4 || (blender_major_version == 4 && blender_minor_version >= 2)) {
|
||||||
|
if (p_options.has(SNAME("blender/meshes/colors")) && p_options[SNAME("blender/meshes/colors")]) {
|
||||||
|
parameters_map["export_vertex_color"] = "MATERIAL";
|
||||||
|
} else {
|
||||||
|
parameters_map["export_vertex_color"] = "NONE";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (p_options.has(SNAME("blender/meshes/colors")) && p_options[SNAME("blender/meshes/colors")]) {
|
if (p_options.has(SNAME("blender/meshes/colors")) && p_options[SNAME("blender/meshes/colors")]) {
|
||||||
parameters_map["export_colors"] = true;
|
parameters_map["export_colors"] = true;
|
||||||
} else {
|
} else {
|
||||||
parameters_map["export_colors"] = false;
|
parameters_map["export_colors"] = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (p_options.has(SNAME("blender/nodes/visible"))) {
|
if (p_options.has(SNAME("blender/nodes/visible"))) {
|
||||||
int32_t visible = p_options["blender/nodes/visible"];
|
int32_t visible = p_options["blender/nodes/visible"];
|
||||||
if (visible == BLEND_VISIBLE_VISIBLE_ONLY) {
|
if (visible == BLEND_VISIBLE_VISIBLE_ONLY) {
|
||||||
|
|||||||
Reference in New Issue
Block a user