Merge remote-tracking branch 'origin/master' into 1.10
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "Engine/Serialization/MemoryReadStream.h"
|
||||
#include "Engine/Serialization/MemoryWriteStream.h"
|
||||
#include "Engine/Content/Factories/BinaryAssetFactory.h"
|
||||
#include "Engine/Animations/Animations.h"
|
||||
#include "Engine/Threading/Threading.h"
|
||||
#include "Engine/Debug/Exceptions/ArgumentNullException.h"
|
||||
|
||||
@@ -24,6 +25,8 @@ AnimationGraph::AnimationGraph(const SpawnParams& params, const AssetInfo* info)
|
||||
|
||||
Asset::LoadResult AnimationGraph::load()
|
||||
{
|
||||
ConcurrentSystemLocker::WriteScope systemScope(Animations::SystemLocker);
|
||||
|
||||
// Get stream with graph data
|
||||
const auto surfaceChunk = GetChunk(0);
|
||||
if (surfaceChunk == nullptr)
|
||||
@@ -48,6 +51,7 @@ Asset::LoadResult AnimationGraph::load()
|
||||
|
||||
void AnimationGraph::unload(bool isReloading)
|
||||
{
|
||||
ConcurrentSystemLocker::WriteScope systemScope(Animations::SystemLocker);
|
||||
Graph.Clear();
|
||||
}
|
||||
|
||||
@@ -79,6 +83,7 @@ bool AnimationGraph::InitAsAnimation(SkinnedModel* baseModel, Animation* anim, b
|
||||
Log::ArgumentNullException();
|
||||
return true;
|
||||
}
|
||||
ConcurrentSystemLocker::WriteScope systemScope(Animations::SystemLocker);
|
||||
|
||||
// Create Graph data
|
||||
MemoryWriteStream writeStream(512);
|
||||
@@ -164,6 +169,7 @@ bool AnimationGraph::SaveSurface(const BytesContainer& data)
|
||||
{
|
||||
if (OnCheckSave())
|
||||
return true;
|
||||
ConcurrentSystemLocker::WriteScope systemScope(Animations::SystemLocker);
|
||||
ScopeLock lock(Locker);
|
||||
|
||||
if (IsVirtual())
|
||||
|
||||
Reference in New Issue
Block a user