Requires Blender 4
In this page:
<> Code
button at the top of the page -> Download Zip
In Blender:
Edit
> Preferences
Add-ons
tabInstall...
in the top-right of the windowAutoMDL-main.zip
, then click Install Add-on
All the setup needed is that the .blend needs to be inside a models folder, or any subdirectory inside it!
The AutoMDL tab will appear in the Sidebar (press N)
Save .blend file anywhere in a models folder
Select a visual mesh and hit Update MDL
By default, the materials search path mirrors the blend path:
models/c17/post.blend
models/c17/post.mdl
materials/models/c17/
Shows exactly where the VMTs are expected to be:
(In this case, there is 1 material called metal
)
You can also define a different search path if needed (or multiple search paths):
You can compile without a collision model. If you choose a mesh for it, collision specific options appear:
Some details: Automatically detects whether the collision should be $concave or not, and counts loose parts to set the correct amount of $maxconvexpieces
This is my first addon and my first time coding in python so the code is so so bad
But if you have a suggestion or a bug, do make an issue
Hopefully this addon inspires change in other more sophisticated tools to do things in a similar way