Add saving flag hack to Skeleton and revert reset timing of animation
This commit is contained in:
@ -327,8 +327,10 @@ void Skeleton3D::_notification(int p_what) {
|
||||
} break;
|
||||
#ifdef TOOLS_ENABLED
|
||||
case NOTIFICATION_EDITOR_PRE_SAVE: {
|
||||
force_update_all_dirty_bones();
|
||||
emit_signal(SceneStringName(skeleton_updated));
|
||||
saving = true;
|
||||
} break;
|
||||
case NOTIFICATION_EDITOR_POST_SAVE: {
|
||||
saving = false;
|
||||
} break;
|
||||
#endif // TOOLS_ENABLED
|
||||
case NOTIFICATION_UPDATE_SKELETON: {
|
||||
@ -940,6 +942,13 @@ void Skeleton3D::_make_dirty() {
|
||||
|
||||
void Skeleton3D::_update_deferred(UpdateFlag p_update_flag) {
|
||||
if (is_inside_tree()) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (saving) {
|
||||
update_flags |= p_update_flag;
|
||||
_notification(NOTIFICATION_UPDATE_SKELETON);
|
||||
return;
|
||||
}
|
||||
#endif //TOOLS_ENABLED
|
||||
if (update_flags == UPDATE_FLAG_NONE && !updating) {
|
||||
notify_deferred_thread_group(NOTIFICATION_UPDATE_SKELETON); // It must never be called more than once in a single frame.
|
||||
}
|
||||
@ -1165,6 +1174,11 @@ void Skeleton3D::_process_modifiers() {
|
||||
if (!mod) {
|
||||
continue;
|
||||
}
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (saving && !mod->is_processed_on_saving()) {
|
||||
continue;
|
||||
}
|
||||
#endif //TOOLS_ENABLED
|
||||
real_t influence = mod->get_influence();
|
||||
if (influence < 1.0) {
|
||||
LocalVector<Transform3D> old_poses;
|
||||
|
||||
Reference in New Issue
Block a user