mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-13 15:16:28 +00:00
Renamed file properties to asset properties and modified asset properties to store a CAssetID instead of a CResourceInfo
This commit is contained in:
@@ -21,8 +21,8 @@ void CScriptAttachNode::AttachPropertyModified()
|
||||
{
|
||||
if (mpAttachAssetProp)
|
||||
{
|
||||
if (mpAttachAssetProp->Type() == eFileProperty)
|
||||
mpAttachAsset = TPropCast<TFileProperty>(mpAttachAssetProp)->Get().Load();
|
||||
if (mpAttachAssetProp->Type() == eAssetProperty)
|
||||
mpAttachAsset = gpResourceStore->LoadResource( TPropCast<TAssetProperty>(mpAttachAssetProp)->Get(), "CMDL" );
|
||||
else if (mpAttachAssetProp->Type() == eCharacterProperty)
|
||||
mpAttachAsset = TPropCast<TCharacterProperty>(mpAttachAssetProp)->Get().AnimSet();
|
||||
|
||||
|
||||
@@ -472,16 +472,16 @@ void CScriptNode::PropertyModified(IProperty *pProp)
|
||||
SetDisplayAsset(mpInstance->DisplayAsset());
|
||||
}
|
||||
|
||||
else if (pProp->Type() == eFileProperty)
|
||||
else if (pProp->Type() == eAssetProperty)
|
||||
{
|
||||
CFileTemplate *pFileTemp = static_cast<CFileTemplate*>(pProp->Template());
|
||||
CAssetTemplate *pAssetTemp = static_cast<CAssetTemplate*>(pProp->Template());
|
||||
|
||||
if (pFileTemp->AcceptsExtension("CMDL") || pFileTemp->AcceptsExtension("TXTR") || pFileTemp->AcceptsExtension("ANCS") || pFileTemp->AcceptsExtension("CHAR"))
|
||||
if (pAssetTemp->AcceptsExtension("CMDL") || pAssetTemp->AcceptsExtension("TXTR") || pAssetTemp->AcceptsExtension("ANCS") || pAssetTemp->AcceptsExtension("CHAR"))
|
||||
{
|
||||
mpInstance->EvaluateDisplayAsset();
|
||||
SetDisplayAsset(mpInstance->DisplayAsset());
|
||||
}
|
||||
else if (pFileTemp->AcceptsExtension("DCLN"))
|
||||
else if (pAssetTemp->AcceptsExtension("DCLN"))
|
||||
{
|
||||
mpInstance->EvaluateCollisionModel();
|
||||
mpCollisionNode->SetCollision(mpInstance->Collision());
|
||||
|
||||
Reference in New Issue
Block a user