Add support for Vector3, Float3, Double3, and Quaternion mutliselect value changing.

This commit is contained in:
Chandler Cox
2024-08-20 20:33:36 -05:00
parent d779862271
commit 43952fdc31
4 changed files with 772 additions and 70 deletions

View File

@@ -1,6 +1,7 @@
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using FlaxEditor.CustomEditors.GUI;
@@ -269,10 +270,18 @@ namespace FlaxEditor.CustomEditors
object val = _valueToSet;
_hasValueDirty = false;
_valueToSet = null;
// Assign value
for (int i = 0; i < _values.Count; i++)
_values[i] = val;
if (val is IList l && l.Count == _values.Count)
{
for (int i = 0; i < _values.Count; i++)
_values[i] = l[i];
}
else
{
for (int i = 0; i < _values.Count; i++)
_values[i] = val;
}
}
finally
{