Skip to content

About

A simple Python script to convert exported GeckoLib Blockbench Bedrock .animation.json files to Java edition compatible files.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License

geckolib-animation-converter

A simple Python script to convert GeckoLib animations exported from Blockbench as Bedrock .animation.json files into Java Edition compatible files.
🐛 Report Bug · ✨ Request Feature


Table of Contents
  1. About The Project
  2. Usage
  3. Contributing
  4. License
  5. Contact

🔗 About The Project

Blockbench's Bedrock animation export writes some keyframes as objects with pre and post values (for smooth interpolation, or a jump at a keyframe). The Java Edition version of GeckoLib expects a plain value at each keyframe, so it can't read them. This script replaces every such keyframe with its post value and leaves everything else as it was.

Before:

"rotation": {
  "0.0": [0, 0, 0],
  "0.5": { "post": [0, 45, 0], "lerp_mode": "catmullrom" },
  "1.0": { "pre": [0, 90, 0], "post": [0, 0, 0] }
}

After:

"rotation": {
  "0.0": [0, 0, 0],
  "0.5": [0, 45, 0],
  "1.0": [0, 0, 0]
}

🚀 Usage

You need Python 3. There's nothing to install.

python main.py ./model.animation.json ./output.animation.json

On Windows, use py instead of python. The first argument is the exported animation, the second is where to write the converted one. Give it a new file each time: the script appends to the output file, so writing over an existing one leaves invalid JSON.


🤝 Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE.txt for more information.


📬 Contact

Rhys Bishop - https://sy.hr/ - mail@rhysbi.shop

Project Link: https://github.com/ssyyhhrr/geckolib-animation-converter

About

A simple Python script to convert exported GeckoLib Blockbench Bedrock .animation.json files to Java edition compatible files.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages