mirror of
https://github.com/godotengine/godot.git
synced 2025-02-23 23:15:07 +08:00
Merge pull request #83104 from jsjtxietian/fix-crash-when-reimport-animation-while-playing
Fix editor crash when re-importing GLTF while animation is playing
This commit is contained in:
commit
6d47eff457
@ -1023,6 +1023,12 @@ void EditorNode::_resources_reimported(const Vector<String> &p_resources) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Editor may crash when related animation is playing while re-importing GLTF scene, stop it in advance.
|
||||||
|
AnimationPlayer *ap = AnimationPlayerEditor::get_singleton()->get_player();
|
||||||
|
if (ap && scenes.size() > 0) {
|
||||||
|
ap->stop(true);
|
||||||
|
}
|
||||||
|
|
||||||
for (const String &E : scenes) {
|
for (const String &E : scenes) {
|
||||||
reload_scene(E);
|
reload_scene(E);
|
||||||
reload_instances_with_path_in_edited_scenes(E);
|
reload_instances_with_path_in_edited_scenes(E);
|
||||||
|
Loading…
Reference in New Issue
Block a user