[Unreal][Tool]Interchange Python Pipeline
- Max Liu
- Apr 28
- 2 min read
Today I want to talk about how to use Python to create a interchange custom pipeline.
What is interchange? According to Unreal document:
"The Interchange Framework is Unreal Engine's import and export framework. It is file format agnostic, asynchronous, customizable, and can be used at runtime."
In my opinion, it is a import system which hlep to organize imported file, textures, models, etc.
Step 1:
Setup python file in project settings: According to Scripting the Unreal Editor Using Python | Unreal Engine 5.5 Documentation | Epic Developer Community In your Project Settings, you can specify any number of Python scripts that you want to run every time you open that Project. The Editor runs these scripts after the default startup Level is fully loaded.
Select Edit > Project Settings.... Under the Plugins list, select Python. Then, add your scripts to the Startup scripts setting:
Press the Add button, Type in your python code name.
Restart the Unreal Editor when done. The next time the Editor loads your Project, it should run your new startup scripts.
Example:
Let's say you have 100 models with 300 textures.
Based on the name and type of each file, we want to create the corresponding sub-paths automatically.
In the python script that create sub- folder:
The recursive_set_node_sub_path method traverses asset nodes recursively. It checks if a node is a texture, material, mesh.
Extand to view Python code
Step 2:
In the Content Browser, right-click and create a new Interchange Python Pipeline.
Then, head back to the Project Settings.
Search for Interchange, and under Textures Pipeline Stacks, add your custom pipeline to the list.
Test the result.
留言