Fix crash when loading old triplanar node

This commit is contained in:
Wojtek Figat
2025-03-09 09:09:45 +01:00
parent 1e2e613a78
commit 3643ec7a58

View File

@@ -706,7 +706,7 @@ void MaterialGenerator::ProcessGroupTextures(Box* box, Node* node, Value& value)
const auto texture = eatBox(textureBox->GetParent<Node>(), textureBox->FirstConnection());
const auto scale = tryGetValue(node->GetBox(1), node->Values[0]).AsFloat();
const auto blend = tryGetValue(node->GetBox(2), node->Values[1]).AsFloat();
const auto offset = tryGetValue(node->GetBox(3), node->Values[2]).AsFloat2();
const auto offset = tryGetValue(node->GetBox(3), node->Values.Count() > 2 ? node->Values[2] : Float2::Zero).AsFloat2();
const bool local = node->Values.Count() >= 5 ? node->Values[4].AsBool : false;
const Char* samplerName;