Changes to Geometry, Materials, and Textures
When you reimport a Datasmith scene:
- Datasmith recreates Static Mesh and Texture Assets only if you have modified them in your source file since the last time you imported the scene.
- Datasmith always recreates all Material Assets, regardless of whether or not they have been modified in your source file.
When Datasmith recreates an Asset, it may overwrite changes that you've made to that Asset in Unreal!
Typically, you should not lose any information that Datasmith tracks as overrides, or any information that is specific to the Unreal representation of your scene's objects. However, you might lose changes that you've made in Unreal to information that is brought in by Datasmith, but that Datasmith does not track as an override. For example, overwriting an Asset will overwrite changes that you've made in Unreal to the internals of a Material graph, to the properties of an Instanced Material, or to the geometry of a Static Mesh Asset.
To avoid losing changes that you make to your Assets in Unreal, you have two options:
- When you re-import, deselect the Process checkbox for the corresponding asset type in the Reimport Options dialog box, to avoid reimporting that type of Asset. For example, if you've modified some Material properties in Unreal, and you don't want to lose those changes, you could deselect the Materials & Textures option. However, if there are other Material Assets that you do want to update from the source, this approach won't work. In this case, you could selectively reimport only the Assets of that type that you want to update; see Option 2. Individual Asset Reimport below.
- Whenever you need to modify an Asset that you've imported with Datasmith, duplicate the Asset you want to modify into a different folder and modify the duplicate instead. Then, update any uses of the original Asset to use your duplicate instead. When you re-import, the original Asset will be overwritten, but your duplicate will remain untouched.
When you reimport the scene after deleting objects or materials in your source file, Datasmith does not delete the Assets that it had previously created for those objects. The Assets remain in your Content Browser, so that you can continue using them in the Unreal Editor as standalone Assets, outside the context of the Datasmith Scene. However, when you synchronize a Datasmith Scene Actor in one of your Levels to match the reimported Datasmith Scene Asset, instances of those deleted Assets will be removed (unless they contain any overrides).
The following before-and-after image illustrates what happens to Static Mesh Assets when you reimport a scene:
- Objects that you've modified in the source scene — the light globe in this example — are re-created in Unreal, and the old versions of the Assets are overwritten.
- Objects that you've deleted in the source scene — the yellow lift elements in this example — are not removed from your Project's Content Browser.
- Objects that you've added to the source scene — the toolbox in this example — are added to the Content Browser as new Assets.
Click for full image.
Remember that when you make a change to an Asset in the Unreal Engine, that change is immediately reflected everywhere that the Asset is used. The same applies when Datasmith recreates or modifies an Asset during a reimport. For example, if you change the geometry of an object in your source application, you'll see that after reimporting the corresponding Static Mesh Asset, all Actors in all Levels that instantiate that Static Mesh Asset are updated automatically to show the new geometry.