We have an Editor Utility Widget that lets users bake vertex values to imported static meshes. This workflow is fantastic, but users noticed that running the tool removes all of the “import asset” functionality. This is understandable as the tool uses Geometry Scripting to create a new static mesh asset which is no longer related to the original imported asset. I was wondering if there is a way to preserve the import settings. Perhaps one way is to sample the imported static mesh, make modifications, get the original static mesh source file, export the newly generated dynamic mesh to the source fbx path and then re-import it. But I wanted to see if this is a viable option, or perhaps there is a better way.
The import settings should be in the AssetUserData of the StaticMesh. I would try duplicating those and adding them to your new StaticMesh.
You can call either GetAssetUserDataArray if you want to copy everything or GetAssetUserDataOfClass if you want to be selective. Then use DuplicateObject(AssetUserData, NewStaticMesh) to create a copy of the settings.
Finally, add them to your static mesh using NewStaticMesh->AddAssetUserData.
Thanks [mention removed] the suggested node worked like a charm! I just had to transfer some of the source mesh options to keep things intact. Thanks for your help!