|
@@ -327,8 +327,10 @@ void Skeleton3D::_notification(int p_what) {
|
|
} break;
|
|
} break;
|
|
#ifdef TOOLS_ENABLED
|
|
#ifdef TOOLS_ENABLED
|
|
case NOTIFICATION_EDITOR_PRE_SAVE: {
|
|
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;
|
|
} break;
|
|
#endif // TOOLS_ENABLED
|
|
#endif // TOOLS_ENABLED
|
|
case NOTIFICATION_UPDATE_SKELETON: {
|
|
case NOTIFICATION_UPDATE_SKELETON: {
|
|
@@ -940,6 +942,13 @@ void Skeleton3D::_make_dirty() {
|
|
|
|
|
|
void Skeleton3D::_update_deferred(UpdateFlag p_update_flag) {
|
|
void Skeleton3D::_update_deferred(UpdateFlag p_update_flag) {
|
|
if (is_inside_tree()) {
|
|
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) {
|
|
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.
|
|
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) {
|
|
if (!mod) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
+#ifdef TOOLS_ENABLED
|
|
|
|
+ if (saving && !mod->is_processed_on_saving()) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+#endif //TOOLS_ENABLED
|
|
real_t influence = mod->get_influence();
|
|
real_t influence = mod->get_influence();
|
|
if (influence < 1.0) {
|
|
if (influence < 1.0) {
|
|
LocalVector<Transform3D> old_poses;
|
|
LocalVector<Transform3D> old_poses;
|