Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To support Blender4.0 #660

Open
existyay opened this issue Jan 27, 2024 · 11 comments
Open

To support Blender4.0 #660

existyay opened this issue Jan 27, 2024 · 11 comments

Comments

@existyay
Copy link

如果你想在4.0里面使用该插件
if you want to use the plugin in Blender4.0
我找到了一个方法能使其在其中加载
I just found a way to load it in blender:
根据第一个报错可以看出是try的时候mod.register()无法正常加载导致的
According to the first error, it can be seen that mod.register() cannot be loaded normally during try
报错的文件在
The error file is here:
C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\addon_utils.py from line 401
try:
第二个错误直接指出原因
You can find
C:\Users(用户)\Your Computer name(电脑名)\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\cats-blender-plugin-0-19-0_init_.py
修改其中的第319行代码
Modify the code from line 319
bpy.context.window_manager.addon_support = {'OFFICIAL', 'COMMUNITY'}
删除Testing
delete 'Testing'
该方法使得其能在Blender4.0中使用
但是删除代码的代价尚不可知:主要的Testing的那一部分不能用,或者说是Blender4.0加载插件的方式比2.7和2.8来说少了一部分

@Likuid-S
Copy link

I fixed it by myself "Apparently" I went to: "C:\Users\USERNAMEONYOURPC\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\cats-blender-plugin-master" and opened the file: init.py with a text editor then I went to the line 319 and deleted the word 'Testing'

Result:
"bpy.context.window_manager.addon_support = {'OFFICIAL', 'COMMUNITY'}"

I don't know if this doesn't break something be careful testing it first!

@Yusarina
Copy link

First of all you should not be using the main branch of cats you should be using the dev branch which already has this fix and many other fixes. The main branch should not be used on anything more then blender 3.3.

Second cats won't work well on blender 4.0 both main and dev due to the changes with blender 4.0 and that MMD tools has still not been fully updated to work with blender 4.0.

However there are people who have created there own version including myself who has made it worked as best as there can with blender 4.0 check out the many forks out there.

Lastly the official version of cats will most likely never be updated from now on.

@SelftaughtNinja
Copy link

First of all you should not be using the main branch of cats you should be using the dev branch which already has this fix and many other fixes. The main branch should not be used on anything more then blender 3.3.

Second cats won't work well on blender 4.0 both main and dev due to the changes with blender 4.0 and that MMD tools has still not been fully updated to work with blender 4.0.

However there are people who have created there own version including myself who has made it worked as best as there can with blender 4.0 check out the many forks out there.

Lastly the official version of cats will most likely never be updated from now on.

I am wholly new to all this, and I feel like I'm doing something wrong here and am desperate for any assistance you may be willing to offer.
I have followed all directions, even going as far as uninstalling everything and doing it all over again just in case I'd missed a step somewhere. Went through all the comments you'd left to others just to be sure and followed the directions you'd given to them there, nothing doing...
I've just gotten done attempting to apply this code to various versions of Blender, from 2.6 and up, as well as using the separate works others have created for Blender 4.0 to absolutely no avail. I feel like its more than just bad luck and ready to tear out my hair!
May you help me, please?

@Yusarina
Copy link

Yusarina commented Feb 3, 2024

Ok have you tried my version (Which has the most changes and fixes out of any fork).

https://github.com/Yusarina/Cats-Blender-Plugin-Unofficial-

Second if you have an issue with my version, create an issue on there and I help you, seeing as I can update my version if it's an issue with cats itself.

@SelftaughtNinja
Copy link

SelftaughtNinja commented Feb 3, 2024 via email

@Yusarina
Copy link

Yusarina commented Feb 3, 2024

Hi

Please use Blender 3.6 for a start (MMD tools doesn't fully support 4.0 yet).
Second please use my own version as I know what is fixed and what isn't there: https://github.com/Yusarina/Cats-Blender-Plugin-Unofficial-/releases/tag/3.6.5.2

First import the model into blender via the Import panel on cats, once done go to MMD Options and click fix mmd model. This should apply most fixes, then click fix materials which is also in MMD options.
Once done export the model via the cats panel (At on the top right it be next to import model).

Once done import it into Unity and go from there.

If there is any other issues please open an issue here: https://github.com/Yusarina/Cats-Blender-Plugin-Unofficial-/issues and I can help there as I quite active, I don't monitor the official version of cats much anymore and no one else does.

@SelftaughtNinja
Copy link

SelftaughtNinja commented Feb 3, 2024 via email

@SelftaughtNinja
Copy link

SelftaughtNinja commented Feb 4, 2024 via email

@Yusarina
Copy link

Yusarina commented Feb 4, 2024

No worries, glad it works!

@Nixilliscyte
Copy link

I fixed it by myself "Apparently" I went to: "C:\Users\USERNAMEONYOURPC\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\cats-blender-plugin-master" and opened the file: init.py with a text editor then I went to the line 319 and deleted the word 'Testing'

Result: "bpy.context.window_manager.addon_support = {'OFFICIAL', 'COMMUNITY'}"

I don't know if this doesn't break something be careful testing it first!

Once you've done that and if you still get an error after clicking on the wrench logo "Fix Model Setting" like this :

C:\Users*****\AppData\Roaming\UPBGE\Blender\3.6\scripts\addons\cats-blender-plugin-master\ui\armature.py", line 205, in invoke
return context.window_manager.invoke_props_dialog(self, width=dpi_value * 3.25)
TypeError: WindowManager.invoke_props_dialog(): error with keyword argument "width" - Function.width expected an int type, not float.

Just go to your C:\Users*****\AppData\Roaming\UPBGE\Blender\3.6\scripts\addons\cats-blender-plugin-master\ui\armature.py", line 205

And replace : "return context.window_manager.invoke_props_dialog(self, width=dpi_value * 3.25)"

By : "return context.window_manager.invoke_props_dialog(self, width=int(dpi_value * 3.25))"

@Yusarina
Copy link

Yusarina commented Feb 23, 2024

Your gonna hit alot more problems as also this means your using the main branch instead of the dev branch which is not for blender 3.0+

The dev branch has been updated for blender 3.1 to 3.5 however if your using blender 3.6 it still should work.

Or just use my version as advised earlier which contains further fixes and improvements for both 3.6 and 4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants