Merge remote-tracking branch 'origin/master' into 1.10
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include "Engine/Content/Factories/BinaryAssetFactory.h"
|
||||
#include "Engine/Animations/CurveSerialization.h"
|
||||
#include "Engine/Animations/AnimEvent.h"
|
||||
#include "Engine/Animations/Animations.h"
|
||||
#include "Engine/Animations/SceneAnimations/SceneAnimation.h"
|
||||
#include "Engine/Scripting/Scripting.h"
|
||||
#include "Engine/Threading/Threading.h"
|
||||
@@ -597,6 +598,8 @@ void Animation::OnScriptingDispose()
|
||||
|
||||
Asset::LoadResult Animation::load()
|
||||
{
|
||||
ConcurrentSystemLocker::WriteScope systemScope(Animations::SystemLocker);
|
||||
|
||||
// Get stream with animations data
|
||||
const auto dataChunk = GetChunk(0);
|
||||
if (dataChunk == nullptr)
|
||||
@@ -727,6 +730,7 @@ Asset::LoadResult Animation::load()
|
||||
|
||||
void Animation::unload(bool isReloading)
|
||||
{
|
||||
ConcurrentSystemLocker::WriteScope systemScope(Animations::SystemLocker);
|
||||
#if USE_EDITOR
|
||||
if (_registeredForScriptingReload)
|
||||
{
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#if USE_EDITOR
|
||||
#include "Engine/Serialization/MemoryWriteStream.h"
|
||||
#endif
|
||||
#include "Engine/Animations/Animations.h"
|
||||
#include "Engine/Content/Factories/BinaryAssetFactory.h"
|
||||
#include "Engine/Threading/Threading.h"
|
||||
|
||||
@@ -19,6 +20,8 @@ AnimationGraphFunction::AnimationGraphFunction(const SpawnParams& params, const
|
||||
|
||||
Asset::LoadResult AnimationGraphFunction::load()
|
||||
{
|
||||
ConcurrentSystemLocker::WriteScope systemScope(Animations::SystemLocker);
|
||||
|
||||
// Get graph data from chunk
|
||||
const auto surfaceChunk = GetChunk(0);
|
||||
if (!surfaceChunk || !surfaceChunk->IsLoaded())
|
||||
@@ -44,6 +47,7 @@ Asset::LoadResult AnimationGraphFunction::load()
|
||||
|
||||
void AnimationGraphFunction::unload(bool isReloading)
|
||||
{
|
||||
ConcurrentSystemLocker::WriteScope systemScope(Animations::SystemLocker);
|
||||
GraphData.Release();
|
||||
Inputs.Clear();
|
||||
Outputs.Clear();
|
||||
@@ -68,6 +72,7 @@ BytesContainer AnimationGraphFunction::LoadSurface() const
|
||||
|
||||
void AnimationGraphFunction::GetSignature(Array<StringView, FixedAllocation<32>>& types, Array<StringView, FixedAllocation<32>>& names)
|
||||
{
|
||||
ScopeLock lock(Locker);
|
||||
types.Resize(32);
|
||||
names.Resize(32);
|
||||
for (int32 i = 0, j = 0; i < Inputs.Count(); i++)
|
||||
@@ -91,6 +96,7 @@ bool AnimationGraphFunction::SaveSurface(const BytesContainer& data) const
|
||||
{
|
||||
if (OnCheckSave())
|
||||
return true;
|
||||
ConcurrentSystemLocker::WriteScope systemScope(Animations::SystemLocker);
|
||||
ScopeLock lock(Locker);
|
||||
|
||||
// Set Visject Surface data
|
||||
@@ -114,6 +120,7 @@ bool AnimationGraphFunction::SaveSurface(const BytesContainer& data) const
|
||||
|
||||
void AnimationGraphFunction::ProcessGraphForSignature(AnimGraphBase* graph, bool canUseOutputs)
|
||||
{
|
||||
ScopeLock lock(Locker);
|
||||
for (int32 i = 0; i < graph->Nodes.Count(); i++)
|
||||
{
|
||||
auto& node = graph->Nodes[i];
|
||||
|
||||
Reference in New Issue
Block a user