Fix skinned model retarget source asset filter to work after AssetPicker refactor with new validator

This commit is contained in:
2026-04-22 10:19:28 +02:00
parent c23ac8782b
commit c130928e7a
2 changed files with 1 additions and 6 deletions
-5
View File
@@ -38,11 +38,6 @@ namespace FlaxEditor.GUI
/// </summary> /// </summary>
public event Action SelectedItemChanged; public event Action SelectedItemChanged;
/// <summary>
/// The custom callback for assets validation. Cane be used to implement a rule for assets to pick.
/// </summary>
public Func<ContentItem, bool> CheckValid;
/// <summary> /// <summary>
/// False if changing selected item is disabled. /// False if changing selected item is disabled.
/// </summary> /// </summary>
@@ -272,7 +272,7 @@ namespace FlaxEditor.Windows.Assets
infoLabel.AutoHeight = true; infoLabel.AutoHeight = true;
var sourceAssetPicker = setupGroup.AddPropertyItem("Source Asset").Custom<AssetPicker>().CustomControl; var sourceAssetPicker = setupGroup.AddPropertyItem("Source Asset").Custom<AssetPicker>().CustomControl;
sourceAssetPicker.Height = 48; sourceAssetPicker.Height = 48;
sourceAssetPicker.CheckValid = CheckSourceAssetValid; sourceAssetPicker.Validator.CheckValid = CheckSourceAssetValid;
sourceAssetPicker.SelectedItemChanged += () => sourceAssetPicker.SelectedItemChanged += () =>
{ {
proxy.Setups.Add(sourceAssetPicker.Validator.SelectedAsset, new SetupProxy()); proxy.Setups.Add(sourceAssetPicker.Validator.SelectedAsset, new SetupProxy());