Add **Animation Instance Data node to Anim Graph** for caching value per-model

This commit is contained in:
Wojtek Figat
2023-02-14 12:39:58 +01:00
parent 77e19e148b
commit 835127ac21
4 changed files with 42 additions and 3 deletions

View File

@@ -115,6 +115,11 @@ void SlotBucketInit(AnimGraphInstanceData::Bucket& bucket)
bucket.Slot.LoopsLeft = 0;
}
void InstanceDataBucketInit(AnimGraphInstanceData::Bucket& bucket)
{
bucket.InstanceData.Init = true;
}
bool SortMultiBlend1D(const byte& a, const byte& b, AnimGraphNode* n)
{
// Sort items by X location from the lowest to the highest
@@ -432,10 +437,12 @@ bool AnimGraphBase::onNodeLoaded(Node* n)
}
// Animation Slot
case 32:
{
ADD_BUCKET(SlotBucketInit);
break;
}
// Animation Instance Data
case 33:
ADD_BUCKET(InstanceDataBucketInit);
break;
}
break;
// Custom