Change to TryGetBox

This commit is contained in:
Chandler Cox
2023-05-05 09:18:44 -05:00
parent 86044fcc05
commit 12a2a69ad7
2 changed files with 16 additions and 16 deletions

View File

@@ -1273,16 +1273,16 @@ void VisjectExecutor::ProcessGroupParticles(Box* box, Node* node, Value& value)
// Random Float Range
case 213:
{
auto a = tryGetValue(node->GetBox(1), node->Values[0]).AsFloat;
auto b = tryGetValue(node->GetBox(2), node->Values[1]).AsFloat;
auto a = tryGetValue(node->TryGetBox(1), node->Values[0]).AsFloat;
auto b = tryGetValue(node->TryGetBox(2), node->Values[1]).AsFloat;
value = Math::Lerp(a, b, RAND);
break;
}
// Random Vector2 Range
case 214:
{
auto a = tryGetValue(node->GetBox(1), node->Values[0]).AsFloat2();
auto b = tryGetValue(node->GetBox(2), node->Values[1]).AsFloat2();
auto a = tryGetValue(node->TryGetBox(1), node->Values[0]).AsFloat2();
auto b = tryGetValue(node->TryGetBox(2), node->Values[1]).AsFloat2();
value = Float2(
Math::Lerp(a.X, b.X, RAND),
Math::Lerp(a.Y, b.Y, RAND)
@@ -1292,8 +1292,8 @@ void VisjectExecutor::ProcessGroupParticles(Box* box, Node* node, Value& value)
// Random Vector3 Range
case 215:
{
auto a = tryGetValue(node->GetBox(1), node->Values[0]).AsFloat3();
auto b = tryGetValue(node->GetBox(2), node->Values[1]).AsFloat3();
auto a = tryGetValue(node->TryGetBox(1), node->Values[0]).AsFloat3();
auto b = tryGetValue(node->TryGetBox(2), node->Values[1]).AsFloat3();
value = Float3(
Math::Lerp(a.X, b.X, RAND),
Math::Lerp(a.Y, b.Y, RAND),
@@ -1304,8 +1304,8 @@ void VisjectExecutor::ProcessGroupParticles(Box* box, Node* node, Value& value)
// Random Vector4 Range
case 216:
{
auto a = tryGetValue(node->GetBox(1), node->Values[0]).AsFloat4();
auto b = tryGetValue(node->GetBox(2), node->Values[1]).AsFloat4();
auto a = tryGetValue(node->TryGetBox(1), node->Values[0]).AsFloat4();
auto b = tryGetValue(node->TryGetBox(2), node->Values[1]).AsFloat4();
value = Float4(
Math::Lerp(a.X, b.X, RAND),
Math::Lerp(a.Y, b.Y, RAND),