fixed arrays in nodeparamview

This commit is contained in:
itsmattkc
2021-01-22 12:20:25 +11:00
parent ce8704f7d3
commit 8a5df32281
12 changed files with 342 additions and 120 deletions
+7 -5
View File
@@ -481,6 +481,13 @@ void NodeInput::ArrayResize(int size)
{
if (array_size_ != size) {
// Update array size
if (array_size_ < size) {
// Size is larger, create any immediates that don't exist
for (int i=subinputs_.size(); i<size; i++) {
subinputs_.append(CreateImmediate());
}
}
ChangeArraySizeInternal(size);
if (array_size_ > size) {
@@ -493,11 +500,6 @@ void NodeInput::ArrayResize(int size)
// Note that we do not delete any immediates since the user might still want that data.
// Therefore it's important to note that array_size_ does NOT necessarily equal subinputs_.size()
} else {
// Size is larger, create any immediates that don't exist
for (int i=subinputs_.size(); i<size; i++) {
subinputs_.append(CreateImmediate());
}
}
}
}