mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-17 00:47:05 +00:00
Added support for omitting unused animations from paks (needs work to not crash)
This commit is contained in:
@@ -655,7 +655,7 @@ CModel* CScriptNode::ActiveModel() const
|
||||
if (mpDisplayAsset->Type() == eModel)
|
||||
return static_cast<CModel*>(mpDisplayAsset.RawPointer());
|
||||
else if (mpDisplayAsset->Type() == eAnimSet)
|
||||
return static_cast<CAnimSet*>(mpDisplayAsset.RawPointer())->NodeModel(mCharIndex);
|
||||
return static_cast<CAnimSet*>(mpDisplayAsset.RawPointer())->Character(mCharIndex)->pModel;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
@@ -672,14 +672,14 @@ CAnimSet* CScriptNode::ActiveAnimSet() const
|
||||
CSkeleton* CScriptNode::ActiveSkeleton() const
|
||||
{
|
||||
CAnimSet *pSet = ActiveAnimSet();
|
||||
if (pSet) return pSet->NodeSkeleton(mCharIndex);
|
||||
if (pSet) return pSet->Character(mCharIndex)->pSkeleton;
|
||||
else return nullptr;
|
||||
}
|
||||
|
||||
CAnimation* CScriptNode::ActiveAnimation() const
|
||||
{
|
||||
CAnimSet *pSet = ActiveAnimSet();
|
||||
if (pSet) return pSet->Animation(mAnimIndex);
|
||||
if (pSet) return pSet->Animation(mAnimIndex)->pAnim;
|
||||
else return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user