Reimport With New File - Python

Hi there,

First time posting here, so I will do my best to describe my issue.

In Unreal you can right-click an asset in the content browser and select “Reimport With New File”, which reimports the asset pointing to a different source I believe?

I am trying to replicate that behaviour using Python and on an fbx asset. For example a rock fbx where I can change the source to the most recent version e.g. rock_0002 and so on.

I have already managed to import the fbx, but haven’t managed to reimport pointing to a new source. I have googled every query I can think of but I haven’t found anything. In the python api there seems to be a factory here.

Any help would be appreciated and code examples would be even better.

I’m looking for the same thing. :frowning: Any luck?

Hey! Yes, I managed to get somewhere with it.

There are two things you will need to do, first being setting the unreal.AssetImportTask editor propertyreplace_existing’ to true.

Secondly, you will need to set the editor propertydestination_name’ to the existing filename i.e. if you import model_01.fbx and then want to reimport model_02.fbx you need to set it to the existing file model_01.fbx.

I hope this helps!

1 Like