You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #101450 from TokageItLab/reset-anim-skeleton
Change reset timing of the AnimationMixer and Skeleton on save
This commit is contained in:
@@ -1910,11 +1910,12 @@ void EditorNode::_save_scene(String p_file, int idx) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<Pair<AnimationMixer *, Ref<AnimatedValuesBackup>>> anim_backups;
|
||||||
|
_reset_animation_mixers(scene, &anim_backups);
|
||||||
|
|
||||||
scene->propagate_notification(NOTIFICATION_EDITOR_PRE_SAVE);
|
scene->propagate_notification(NOTIFICATION_EDITOR_PRE_SAVE);
|
||||||
|
|
||||||
editor_data.apply_changes_in_editors();
|
editor_data.apply_changes_in_editors();
|
||||||
List<Pair<AnimationMixer *, Ref<AnimatedValuesBackup>>> anim_backups;
|
|
||||||
_reset_animation_mixers(scene, &anim_backups);
|
|
||||||
save_default_environment();
|
save_default_environment();
|
||||||
|
|
||||||
_save_editor_states(p_file, idx);
|
_save_editor_states(p_file, idx);
|
||||||
|
|||||||
@@ -325,6 +325,12 @@ void Skeleton3D::_notification(int p_what) {
|
|||||||
update_flags = UPDATE_FLAG_POSE;
|
update_flags = UPDATE_FLAG_POSE;
|
||||||
_notification(NOTIFICATION_UPDATE_SKELETON);
|
_notification(NOTIFICATION_UPDATE_SKELETON);
|
||||||
} break;
|
} break;
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
|
case NOTIFICATION_EDITOR_PRE_SAVE: {
|
||||||
|
force_update_all_dirty_bones();
|
||||||
|
emit_signal(SceneStringName(skeleton_updated));
|
||||||
|
} break;
|
||||||
|
#endif // TOOLS_ENABLED
|
||||||
case NOTIFICATION_UPDATE_SKELETON: {
|
case NOTIFICATION_UPDATE_SKELETON: {
|
||||||
// Update bone transforms to apply unprocessed poses.
|
// Update bone transforms to apply unprocessed poses.
|
||||||
force_update_all_dirty_bones();
|
force_update_all_dirty_bones();
|
||||||
|
|||||||
Reference in New Issue
Block a user