Requires Blender 4
In this page:
- Click the green
<> Code
button at the top of the page ->Download Zip
In Blender:
- Go to
Edit
>Preferences
- Go to the
Add-ons
tab - Click
Install...
in the top-right of the window - Select the
AutoMDL-main.zip
, then clickInstall Add-on
- Enable the checkbox to the left of the addon name
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:
- if blend is
models/c17/post.blend
- mdl compiles at
models/c17/post.mdl
- engine will look for materials in
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
- For convenience, it also makes the appropriate folders in materials, and makes placeholder VMTs if none exist. This can be disabled in the addon preferences
- Should automatically detect all source engine games installed in steam, and put them in the dropdown to easily choose a compiler from. But if that detection fails it will prompt you to manually input the path to a bin folder containing studiomdl.exe (this should ideally never happen, if it does then please make an issue)
This is my first addon and my first time coding in python so the code is so so bad
- I couldn't figure out how to add proper linux support, but apparently it should work under proton
- Currently exporting freezes the UI because it waits for studiomdl.exe to finish
- It would be really cool if it could open compiled models
- No support for skins, bodygroups, lods, bones, or anything else yet really. This is just for making making static and physics props (dynamic too) since that's what I need the addon for.
But if you have a suggestion or a bug, do make an issue
- I made this for making props in mind, for now anything else like characters is beyond the scope of this addon, sorry! (may add more features in the future though)
Hopefully this addon inspires change in other more sophisticated tools to do things in a similar way