Unreal - How to change the source file or source data path in an AssetImportData object

View in #engine_unreal on Slack

@speuzer: Is there any way to change or clear the “Source file” string on imported assets, using blueprint? We want to do this in bulk. Bulk editor doesn’t seem to work for this, and we can’t find a straightforward way to do it in editor script.

spencer luebbert: After further investigation, that source file path is under a sub object assigned to “AssetImportData” for a static mesh, and this can be set to any number of things. Looks like you can set it in python but I haven’t found the blueprint path for setting it, seems like there is some missing functionality around this part of the assets.

Jan Kaluza: Afaik yes, this should be possible with editor utility blueprints

Jan Kaluza: Not sure how exactly

spencer luebbert: To circle back on this, you have to use the GetEditorProperty on the AssetImportData, that gives you an object you can modify

spencer luebbert: The thing that was screwing me up, getEditorProperty returns a wildcard, and its the only way to get an AssetImportData object.So when you drag off the functions that act on AssetImportData objects, to see what auto complete thinks you can plug into them, nothing shows up

spencer luebbert: GetEditorProperty must be the only function that returns a wildcard, i can’t think of any other time I’ve seen that

Jan Kaluza: Hmm, maybe that was the only convenient way to deal with different kinds of non-related structs from different asset types