Mustard2 / MustardUI

Custom UI for Blender human models. It features automatic outfits switch, custom properties support, armature panel creation, and much more.
https://mustard3d.eu
MIT License
318 stars 30 forks source link

Crash when changing Outfit #109

Closed RaySly closed 1 year ago

RaySly commented 1 year ago

using Blender 3.6.0 When changing costumes make blender shut down. this happens randomly with costumes. imagen_2023-08-17_172523359

Mustard2 commented 1 year ago

Hi! Do you have a link to the model I can check?

mokujinh commented 1 year ago

Hi, if it is of any help, I found this same issue when adding the UI to a model I didn't make myself, used the name conversion, then it would crash blender when I select an outfit. The solution was appending the model to a new file, selection and making everything "local", delete the linked library links on the blendfile and save it as a new project. Apparently that solved the crashing for some reason.

Mustard2 commented 1 year ago

Thanks for the information!

Very weird, if you have the blend file affected by the issue I can surely have a look at it. Unfortunately I'm not being able to replicate the issue myself so far.

mokujinh commented 1 year ago

I do have to report this issue also happens to me, weirdly enough it happens to a model I made on a previous blender version (3.5) where changing the outfit worked without any issues. The issue started after I updated the model and added a new outfit to it in a newer blender version (3.6). I can still manually select the outfit in the outliner and manually activate the armature modifiers for the outfit and the meshes work just fine, but that method obviously renders the entire purpose of the UI menu pointless.

mokujinh commented 1 year ago

Also appending the model with the method mentioned above doesn't seem to work either. The crash doesn't allow me to view error logs either. Here's the model just in case: https://gofile.io/d/9PKc36 Blender version I use is Blender 3.6.5 so maybe it's related to the blender version. The crash happens whenever I try to swap to the howdy or captain outifts.

Mustard2 commented 1 year ago

Thank you very much! With the file I can try to fix this. :)

Unfortunately I coudn't without the file because I wasn't able to reproduce the error. :(

Mustard2 commented 1 year ago

@mokujinh @RaySly Try the attached version, it shouldn't crash now (I hope). Can you also check if it's still working as intended (switching outfits correctly)?

Link: mustard_ui.zip

Technical Explanation

The problem was all_objects when Sub-collection are enabled in the Outfit settings:

https://docs.blender.org/api/master/info_gotcha.html#unfortunate-corner-cases

The problem was solved with a better handling of items list loop pre-saving the list of Objects in a dictionary.

mokujinh commented 1 year ago

Yes works like a charm!

Mustard2 commented 1 year ago

Great, I'm closing this but let me know if the issue persists in other parts of the UI. :)