This guide helps both new and experienced contributors understand MMD Tools’ goals, structure, and recommended practices. Please read it carefully before submitting ideas or pull requests.
- MMD Compatibility: MMD Tools preserves official MikuMikuDance (MMD) file formats for models, motions, and poses
- User-Friendly Workflow: By focusing on MMD-compatible features, MMD Tools provides a straightforward, efficient experience for MMD users within Blender
- Non-Breaking Enhancements: Only improvements and tools that do not break the MMD format integrity are added
- Import/Export - Read and write MMD formats without altering the MMD file formats
- Editing - Support editing and modifying MMD data in Blender while preserving MMD compatibility
- Verification - Preview and confirm MMD-compliant physics, motions, and other features directly in Blender
- MMD Format Changes - Any modification that breaks official MMD specifications or compatibility
- Extended Functionality - Features that significantly exceed MMD’s scope—such as advanced rigging or shader systems specialized for high-end movie production—should be developed as separate add-ons
- Third-Party Incorporations - Support for non-MMD workflows or custom file formats
- Ensure you have a matching version of Blender for the target development branch
- Use the correct Python version for your Blender release
- Get GitHub access to the MMD Tools repository
Blender Version | MMD Tools Version | Python Version | Branch |
---|---|---|---|
Blender 4.2 LTS | MMD Tools v4.x | 3.11 | main |
Blender 3.6 LTS | MMD Tools v2.x | 3.10 | blender-v3 |
- Use a dedicated Python virtual environment for development
- Use Ruff for linting and formatting
- Use fake-bpy-module for code completion and type checking in IDEs
blender_mmd_tools/
├── mmd_tools/ # Main module directory
│ ├── core/ # Core functionality
│ ├── operators/ # Blender operators
│ ├── panels/ # Blender UI panels
│ ├── properties/ # Blender Property definitions
│ ├── externals/ # Dependent 3rd-party modules with README.txt
│ └── typings/ # Python Type Hints (.pyi)
└── docs/ # Documentation (not yet)
- Use Ruff’s default style for linting and formatting
- Keep line length under 256 characters (
--line-length=256
) - Indent with 4 spaces (no tabs)
- Add the following comment block at the top of each Python file:
# -*- coding: utf-8 -*- # Copyright {year} MMD Tools authors # This file is part of MMD Tools.
- Follow Ruff’s conventions for classes, functions, variables, and constants
- Write docstrings for public functions, classes, and modules
- Provide clear comments for complex logic
- Keep docstrings and documentation updated as the code evolves
We adopt GitHub flow for a simple, flexible development process:
- Create a branch from
main
:git checkout -b feature/your-feature
- Make your changes in small, focused commits
- Write meaningful commit messages:
[Component] Short description ...
- Push your branch to your fork
- Open a pull request against
main
- Merge your pull request once it’s approved
Currently, only @UuuNyaa has permission to perform release tasks:
- Tag the commit in
main
with the version number (vMAJOR.MINOR.PATCH
) - Pushing the tag triggers a GitHub Action that builds artifacts and creates a draft release
- Manually finalize and publish the GitHub Release draft
- Manually upload the artifacts to Blender Extensions
If you need help with development:
- Ask questions in the MMD & Blender Discord Server
#addon-development
channel - Open an issue to discuss implementation details
- Refer to existing code for patterns and approaches
We appreciate your contributions and look forward to working together to improve MMD Tools!