I mean the Material Slot in StaticMesh Editor. I want to batch change static mesh asset’s material.
I’ve explored the help(unreal.StaticMesh), but there is nothing about Material Slots Editor set property.
Thanks in advance.
unreal.StaticMesh.set_materia l(material_index , new_material )
Hope that helps I’m actually looking for how to set materials on Skeletal Meshes. Let me know if you found a way for that
unreal.StaticMesh.set_materia l(material_index , new_material )
Hope that helps I’m actually looking for how to set materials on Skeletal Meshes. Let me know if you found a way for that
Hi, Thanks, I’ve switched to use the open source UnrealEnginePython Plugin, it’s very simple and exposed tons of API with great example, from where I can build my own script very easily.
Check out this tutorial, there is the example solves your problem.
Your First Automated Pipeline with UnrealEnginePython (Part 1)
=
In this tutorial i will try to show you how to build a python script that can generate
a new Unreal Engine 4 Blueprint implementing a Kaiju (a big Japanese monster) with its materials and animations. In the second part a simple AI based on Behavior Trees will be added to the Blueprint as well as a bunch of simple unit tests..
Running the script from the Unreal Engine Python Console will result in a native Blueprint (as well as meshes, animations, a blackboard and a behaviour tree graph) that does not require the python plugin to work.
Technically i am showing the "editor scripting" features of the plugin, not its "gameplay scripting" mode.
If this is the first time you use the UnrealEnginePython plugin you should take in account the following notes:
* when you see CamelCase in the python code (for attributes and function calls) it means the UE4 reflection system is being used. Albeit CamelCase for variables and functions is not 'pythonic', you should see it as a 'signal' of jumping into UE4 reflection system.
* in this tutorial i use the embedded python editor. It is pretty raw, if you want you can use your favourite editor (Vim, Sublime, Emacs...). Anything that can edit python files will be good.
* Python scripts are stored in the '/Game/Scripts' folder of the project
* The Python code is pretty verbose and repeat itself constantly to show the biggest possible number of api features, i strongly suggest you to reorganize/refactor it if you plan to build something for your own pipeline
This file has been truncated. show original