Modify morph target vertex normal delta value in c++

Hi guys, I just want to modify morph target vertex normal delta value in c++ but it won’t registered…

In custom plugin using ISkeletalMeshEditor class and posted custom button in Skeletal Mesh Editor.

The Skeletal Mesh from ISkeletalMeshEditor->GetPersonaToolkit()->GetMesh() and modify morph target vertex delta normal code is below.

FScopedSuspendAlternateSkinWeightPreview ScopedSuspendAlternateSkinnWeightPreview(SkeletalMesh);
		{
			//	 *@param InbCallPostEditChange - if we are the first scope PostEditChange will be called.
			//   *@param InbReregisterComponents - if we are the first scope we will re register component from world and also component render data.
			bool bCallPostEditChange = true;
			bool bReregisterComponents = true;
			FScopedSkeletalMeshPostEditChange SkeletalMeshPostEditChange(SkeletalMesh, bCallPostEditChange, bReregisterComponents);
			FScopedTransaction ScopedTransaction(LOCTEXT("ModifyMorphTargetDelta", "Modify Morph Target Delta"));
			SkeletalMesh->ClearFlags(RF_Transient);
			SkeletalMesh->Modify();
			SkeletalMesh->SetFlags(RF_Transactional);
		}

		FSkeletalMeshModel* mesh = SkeletalMesh->GetImportedModel();
		FString morphName = GetMorphName();
		UMorphTarget* morphMesh = FindObject<UMorphTarget>(SkeletalMesh, *morphName);
		if (mesh && morphMesh && morphMesh->HasValidData())
		{
			TMap<FVector, FVector> vertDeltaMap3DSMAX = it->Value;
			
			morphMesh->Modify(true);
			morphMesh->SetFlags(RF_Transactional);

			const int32 numLods = mesh->LODModels.Num();
			for (int32 lodIndex = 0; lodIndex < numLods; lodIndex++)
			{
				if (mesh->LODModels.IsValidIndex(lodIndex))
				{
					TArray<FMorphTargetLODModel> morphLODMesh = morphMesh->MorphLODModels;
					for (int32 morphIndex = 0; morphIndex < morphLODMesh.Num(); morphIndex++)
					{
						TArray<FMorphTargetDelta>& newVertDeltas = morphLODMesh[morphIndex].Vertices;
						RegenerateVertDeltas(newVertDeltas);

						bool bCompareNormal = false;
						bool bGeneratedByReductionSetting = true;
						TArray<FSkelMeshSection> sections = mesh->LODModels[lodIndex].Sections;
						morphMesh->PopulateDeltas(newVertDeltas, lodIndex, sections, bCompareNormal, bGeneratedByReductionSetting);
							
						morphMesh->MarkPackageDirty();
					}
				}
				bool bInvalidateRenderData = false;
				SkeletalMesh->RegisterMorphTarget(morphMesh, bInvalidateRenderData);
			}
		}

The problem is after the procedure finished, the skeletal mesh vertex normal changed at that moment but if I exit the unreal project and then start it come back the initial state.

I have several own possibility, the first one is the unreal engine look at the property as transient and the second one is it’s not saved deeply, the third one is when start the engine it automatically calculated data.

Any ideas? :(…

ps. I do reference PersonaMeshDetails.cpp line 3388 which is function of ApplyLODChanges(int32 LODIndex).