
maxsdkcli
in-progressA Rust CLI that scaffolds 3ds Max plugin projects for C++, C#, Python, and Rust — pick a language, get a build-ready plugin skeleton.
rustcli3ds-maxautodeskcodegencppcsharppython
What it does
maxsdkcli (binary mxsdkcli) scaffolds 3ds Max plugin projects across four languages. Run mxsdkcli init <project> --cpp|--rs|--cs|--py and it generates a build-ready skeleton with the right project files, plugin class, and registration boilerplate for that stack.
- C++: GUP, Utility Object, or Modifier scaffolds (all 21 plugin types), CMake or vcxproj
- Rust: a GUP crate wired into the nearest Cargo workspace, using the maxsdk git deps
- C#: .csproj, assembly descriptor, and plugin class
- Python: a pip-installable package with setup.py and package layout
Why I built it
Getting a 3ds Max plugin off the ground means a lot of repetitive, error-prone setup — class IDs, GUIDs, build files, and registration wiring that differ per language. This turns that into a single command.
How it works
- Language: Rust, clap for argument parsing and dispatch
- Templates: raw .tmpl assets embedded via include_str! and rendered per language
- Codegen: random Class ID / GUID generation, name-case transforms, and per-language scaffold generators (cpp.rs, rs.rs, cs.rs, py.rs)
- Workspace-aware: the Rust generator walks up to find a Cargo [workspace] and registers the new crate in workspace.members automatically
What I learned
Structuring a codegen tool so adding a new language is a five-step, well-defined change — templates in, constants exposed, a generator module, a module declaration, and a CLI flag — keeps the tool extensible without turning main.rs into a mess.