Description

Assets added to a PSD via a Branch In notify can't have their flags changed within the database. When the flags (like mirror, disable, etc) are changed, they revert back to the original value when the PSD is saved/reopened.
This code responsible is:

	// updating AnimationAssets from NewAnimationAssets preserving the original sorting
	bool bModified = false;
	for (int32 AnimationAssetIndex = GetNumAnimationAssets() - 1; AnimationAssetIndex >= 0; --AnimationAssetIndex)
	{
		const int32 FoundIndex = NewAnimationAssets.Find(AnimationAssets[AnimationAssetIndex]);
		if (FoundIndex >= 0)
		{
			FPoseSearchDatabaseAnimationAssetBase& AnimationAssetBase = AnimationAssets[AnimationAssetIndex].GetMutable<FPoseSearchDatabaseAnimationAssetBase>();
			AnimationAssetBase.bDisableReselection = DisableReselection[AnimationAssetIndex];
			NewAnimationAssets.RemoveAt(FoundIndex); 
		}
		else
		{
			AnimationAssets.RemoveAt(AnimationAssetIndex);
			bModified = true;
		}
	}

because the array Find calls through to FPoseSearchDatabaseAnimationAssetBase::operator== which includes the flags in the equalities check. So if a user modifies the flags, when the logic to add branch in notify assets into the PSD runs next, the asset fails the equalities check and so is removed from the PSD and re-added without the modified flags

Steps to Reproduce
  1. Open up GASP
  2. Open up PSD_Traversal
  3. Change the Disable Asset flag (the eye widget) on any of the montage entries in the PSD
  4. Save the PSD
    1. Note how the Disable Asset flag returns to the previous value

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-257783 in the post.

0
Login to Vote

Unresolved
CreatedMar 19, 2025
UpdatedMar 19, 2025
View Jira Issue