mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Fix Reset on Save corrupt poses if scene has multiple Skeletons
This commit is contained in:
parent
4a1c1c483b
commit
8df06279c6
2 changed files with 5 additions and 2 deletions
|
@ -45,6 +45,9 @@ protected:
|
||||||
virtual void _process_modification(double p_delta) override;
|
virtual void _process_modification(double p_delta) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
|
virtual bool is_processed_on_saving() const override { return true; }
|
||||||
|
#endif
|
||||||
void set_bone_name(const String &p_bone_name);
|
void set_bone_name(const String &p_bone_name);
|
||||||
String get_bone_name() const;
|
String get_bone_name() const;
|
||||||
void set_bone(int p_bone);
|
void set_bone(int p_bone);
|
||||||
|
|
|
@ -317,11 +317,11 @@ void Skeleton3D::_notification(int p_what) {
|
||||||
Bone *bonesptr = bones.ptr();
|
Bone *bonesptr = bones.ptr();
|
||||||
int len = bones.size();
|
int len = bones.size();
|
||||||
|
|
||||||
thread_local LocalVector<bool> bone_global_pose_dirty_backup;
|
LocalVector<bool> bone_global_pose_dirty_backup;
|
||||||
|
|
||||||
// Process modifiers.
|
// Process modifiers.
|
||||||
|
|
||||||
thread_local LocalVector<BonePoseBackup> bones_backup;
|
LocalVector<BonePoseBackup> bones_backup;
|
||||||
_find_modifiers();
|
_find_modifiers();
|
||||||
if (!modifiers.is_empty()) {
|
if (!modifiers.is_empty()) {
|
||||||
bones_backup.resize(bones.size());
|
bones_backup.resize(bones.size());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue