I am currently working on an blueprint importer tool using the interchange pipeline.
I’d like to add metadata to the freshly created asset during the import process (as well as automatically save it to prevent mistakes/data being lost when the editor crashes) but as far as I know, the “import asset” blueprint node only tells you if the import succeeded or failed, it doesn’t have a Created asset output that I could use to add metadata.
The Execute post import pipeline event has this output but so far I have not yet managed to cast it to my blueprint to use it.
What am i missing here?
What do you mean you cast it to your blueprint? Where does that blueprint come from?
Can we get a bit more details on the steps that you are executing in the pipeline and the type of file you are importing?
Interchange will pass you the assets created by the factories and they will be textures, static mesh, skeletal mesh, materials, there is no blueprint unless you have done something earlier on in the pipeline?
Here is a quick example based on the documentation from Unreal (can’t post the actual tool for NDA reasons). When I import using the interchange, there is no pin to output the imported Object.
In the second screenshot, I tried to make a second blueprint with the execute post import pipeline, which apparently does have access to the imported object in order to try to cast it to my importer but it simply doesn’t work.
On the 3rd screenshot, this is how I handled the addition of metadata using the old system. Imported objects were automatically added to an array by the “import assets automated” node and that array could easily be accessed to add metadata.
Basically all I want is to get the reference of the freshly imported object so I can add metadata to it (and automatically save it with the “save asset” node).
For now I’m focusing on importing static meshes but one of the point of the new pipeline is to be able to import any kind of format
In the custom interchange pipeline you show in second screenshot is something that is going to be applied during import process. The post import function will be called for every single asset created during the import process. However your EUW blueprint is an editor blueprint that is used to trigger the import and it will not be in the list of created assets and you do not want to reference it in the pipeline anyway.
Changing tag in the pipeline blueprint would make more sense but the set metadata tag function is an editor only operation so you sadly cannot call it from the pipeline blueprint
I would propose to not run the pipeline import asset function but to run an asset import task instead. That will still rely on interchange under the hood. And then you get your objects from the import task object once import process is over.
Last question then, the reason why I switched from using asset import tasks and tried to use the interchange pipeline was to be able to use those neat interchange pipeline asset files that can easily be edited, duplicated and added to data tables rather than using dozens of variables and huge data tables to handle each preset.
Is there any way to use them with the assets import task?
You change in your project settings your default stacks configurations with your custom stacks. Import asset task will take the corresponding default interchange pipeline stack for your file.