Hello, I’ve started looking into the interchange framework for customizing my asset imports and I’ve run into issues extending the behavior. The issue primarily comes from wanting to add additional functionality on top of the generic asset import and it’s sub-objects ( MaterialPipeline, MeshPipeline, AnimationPipeline). These classes are overly encapsulated and virtually impossible to extend - seemingly by design.
In particular UInterchangeGenericMeshPipeline::GetMeshesInformationFromTranslatedData is hard coded to ignore static meshes in the same file if a skeletal mesh is in the same file for some unknown reason. I don’t want this behavior and at the very least would expect this to be a flag exposed as a pipeline settings. This called by UInterchangeGenericMeshPipeline::CreateMeshPipelineUtilities which sets bIgoreStaticMeshes which will cause UInterchangePipelineMeshesUtilities::GetAllStaticMeshInstance to return an empty list during UInterchangeGenericMeshPipeline::ExecutePreImportPipelineStaticMesh and no static mesh factories to be created as a result.
My request comes down to the following
- Change all private modifiers to protected or public on UInterchangeGenericMeshPipeline. This class is meant to be a base and it’s really counter-productive to have to create a new pipeline from scratch to do small modifications. I also don’t want to double up on epic’s work and duplicate a bunch of boilerplate that has already been written
- Add virtual liberally to functions on these pipelines. They should be open to extension since the whole point of interchange is to open up import and non-virtual methods really limits control.
- Change the constructor of UInterchangeGenericAssetsPipeline to use the one taking FObjectInitializer. Since this is not using the object intializer variant none of the sub-objects can be subclassed using ObjectIntializer.SetDefaultSubobjectClass. This would be a really powerful change because it would let us just change the mesh pipeline without an engine mod.
- Consider adding virtual methods or delegates that fire at different parts of default asset pipelines that child classes can hook.
- Expose bIgoreStaticMeshes if skeletal meshes present as a pipeline variable and set it to false by default. I also think it would make more sense if the factories were created and deactivated rather than just skipped. Since they’re not created at all in the first place it makes it much more tedious to add factories after the fact and apply settings that are currently encapsulated consistently.