absolute-quantum / cats-blender-plugin

:smiley_cat: A tool designed to shorten steps needed to import and optimize models into VRChat. Compatible models are: MMD, XNALara, Mixamo, DAZ/Poser, Blender Rigify, Sims 2, Motion Builder, 3DS Max and potentially more
https://catsblenderplugin.com
MIT License
3.53k stars 456 forks source link

Update for changes in Blender 4.0 #648

Open Mysteryem opened 1 year ago

Mysteryem commented 1 year ago

Blender 4.0 removed bone layers and bone groups, replacing them with Bone Collections.

This patch adds a "Blender 3.6 or older" check and uses new Bone Collection code when using Blender 4.0.

Bone collections are not removed like bone groups were because they are the direct replacement for armature/bone layers, which were not removed before. The bone color properties of bone groups were instead replaced in 4.0 by setting each bone's color individually. This patch does not modify bone colors like removing bone groups would have done in older versions.


Blender 4.0 replaced the ability to call operators with a context override argument with Context.temp_override.

A new version-independent function for calling operators with context overrides has been added to common.py and code has been updated to use this new function.


It should be noted that mmd tools is broken in many areas with the update to 4.0, but the upstream mmd tools repository is yet to update for 4.0: https://github.com/UuuNyaa/blender_mmd_uuunyaa_tools. Though note that mmd tools' priority is supporting the latest LTS release, which 4.0 is not, so mmd tools updating could take some time. https://mmd-blender.fandom.com/wiki/MMD_UuuNyaa_Tools#Requirements

Rawrgurl commented 10 months ago

it seems i'll have to wait a while then, because I just downloaded 4.0 because the previous downloads for 3.5 where broken. I'm glad I kept a version of blender that still works with mmd tools because right now its currently broken. I cannot even import a model anymore unless i save the project in an older version and open it in 4.0.

AraHaan commented 10 months ago

I would suggest for now using steam to use Blender 3.6 stable until cats is updated to support Blender v4.0