From dc0bb55390b3d911c6b18295fda4047d9cdd6387 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Wed, 31 Aug 2016 13:31:12 -1000 Subject: [PATCH] Additional processing condition checks --- DataSpec/SpecBase.cpp | 3 +++ Editor/ProjectResourceFactoryBase.cpp | 6 +++--- Runtime/Character/CAnimData.cpp | 3 +++ Runtime/Graphics/CModelBoo.cpp | 3 +++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/DataSpec/SpecBase.cpp b/DataSpec/SpecBase.cpp index 9ada3e0a7..caf9d0f08 100644 --- a/DataSpec/SpecBase.cpp +++ b/DataSpec/SpecBase.cpp @@ -156,6 +156,9 @@ const hecl::Database::DataSpecEntry* SpecBase::overrideDataSpec(const hecl::Proj return nullptr; if (hecl::IsPathBlend(path)) { + if (hecl::StringUtils::EndsWith(path.getAuxInfo(), _S(".CSKR"))) + return oldEntry; + hecl::BlenderConnection& conn = btok.getBlenderConnection(); if (!conn.openBlend(path)) { diff --git a/Editor/ProjectResourceFactoryBase.cpp b/Editor/ProjectResourceFactoryBase.cpp index 45f71aa8a..f84cd9108 100644 --- a/Editor/ProjectResourceFactoryBase.cpp +++ b/Editor/ProjectResourceFactoryBase.cpp @@ -410,11 +410,11 @@ void ProjectResourceFactoryBase::AsyncTask::CookComplete() /* Ready for buffer transaction at this point */ u32 availSz = std::max(0, s32(fr.length()) - s32(x14_resOffset)); - u32 sz = std::min(x14_resSize, availSz); - x10_loadBuffer.reset(new u8[sz]); + x14_resSize = std::min(x14_resSize, availSz); + x10_loadBuffer.reset(new u8[x14_resSize]); m_bufTransaction = m_parent.m_clientProc.addBufferTransaction(m_cookedPath, x10_loadBuffer.get(), - sz, x14_resOffset); + x14_resSize, x14_resOffset); } bool ProjectResourceFactoryBase::AsyncTask::AsyncPump() diff --git a/Runtime/Character/CAnimData.cpp b/Runtime/Character/CAnimData.cpp index 5cff954a0..6a79dd49c 100644 --- a/Runtime/Character/CAnimData.cpp +++ b/Runtime/Character/CAnimData.cpp @@ -213,6 +213,9 @@ std::shared_ptr CAnimData::GetAnimationManager() const void CAnimData::RecalcPoseBuilder(const CCharAnimTime* time) { + if (!x1f8_animRoot) + return; + const CSegIdList& segIdList = GetCharLayoutInfo().GetSegIdList(); CSegStatementSet segSet; if (time) diff --git a/Runtime/Graphics/CModelBoo.cpp b/Runtime/Graphics/CModelBoo.cpp index 0e16564fa..a7f7f5da4 100644 --- a/Runtime/Graphics/CModelBoo.cpp +++ b/Runtime/Graphics/CModelBoo.cpp @@ -461,6 +461,9 @@ void CBooModel::UpdateUniformData(const CModelFlags& flags, const CSkinRules* cskr, const CPoseAsTransforms* pose) const { + if (!m_uniformBuffer) + return; + u8* dataOut = reinterpret_cast(m_uniformBuffer->map(m_uniformDataSize)); u8* dataCur = dataOut;