Skip to content

Blender plugin allowing to pretend that the source engine reads .blend files

Notifications You must be signed in to change notification settings

NvC-DmN-CH/AutoMDL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 

Repository files navigation

Requires Blender 4

Installation:

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 click Install Add-on
  • Enable the checkbox to the left of the addon name

Fast iteration thanks to Hammer++'s hotloading ability:


Simplify workflow, as if the engine reads .blend files:

All the setup needed is that the .blend needs to be inside a models folder, or any subdirectory inside it!

compiling_showcase


Where the addon appears:

The AutoMDL tab will appear in the Sidebar (press N)


How to use:

  • Save .blend file anywhere in a models folder

  • Select a visual mesh and hit Update MDL

e


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:

image

(In this case, there is 1 material called metal)



You can also define a different search path if needed (or multiple search paths):

image


You can compile without a collision model. If you choose a mesh for it, collision specific options appear:

image

Some details: Automatically detects whether the collision should be $concave or not, and counts loose parts to set the correct amount of $maxconvexpieces

Misc:

  • 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)

Todo:

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


Note

  • 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

About

Blender plugin allowing to pretend that the source engine reads .blend files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages