animate1978 / MB-Lab

MB-Lab is a character creation tool for Blender 4.0 and above, based off ManuelBastioniLAB
Other
1.85k stars 314 forks source link

Load Config file for MB-Dev #290

Closed animate1978 closed 4 years ago

animate1978 commented 4 years ago

Describe the bug When trying to "Load Configuration" in Model Integration part of MB-Dev, this error is produced. This is after saving the config file...

Logs `Switching to fully guarded memory allocator. Blender 2.82 (sub 7) Build: 2020-02-12 17:14:50 Linux Release argv[0] = /home/farishta/blender-2.82/blender argv[1] = --debug Read prefs: /home/farishta/.config/blender/2.82/config/userpref.blend read file /home/farishta/.config/blender/2.82/config/startup.blend Version 282 sub 7 date 2020-02-12 16:20 hash 77d23b0bd76f found bundled python: /home/farishta/blender-2.82/2.82/python mb_lab updater verbose is enabled cls BA: <class 'MB-Lab.addon_updater_ops.addon_updater_install_popup'> cls: <class 'MB-Lab.addon_updater_ops.addon_updater_install_popup'> cls BA: <class 'MB-Lab.addon_updater_ops.addon_updater_check_now'> cls: <class 'MB-Lab.addon_updater_ops.addon_updater_check_now'> cls BA: <class 'MB-Lab.addon_updater_ops.addon_updater_update_now'> cls: <class 'MB-Lab.addon_updater_ops.addon_updater_update_now'> cls BA: <class 'MB-Lab.addon_updater_ops.addon_updater_update_target'> cls: <class 'MB-Lab.addon_updater_ops.addon_updater_update_target'> cls BA: <class 'MB-Lab.addon_updater_ops.addon_updater_install_manually'> cls: <class 'MB-Lab.addon_updater_ops.addon_updater_install_manually'> cls BA: <class 'MB-Lab.addon_updater_ops.addon_updater_updated_successful'> cls: <class 'MB-Lab.addon_updater_ops.addon_updater_updated_successful'> cls BA: <class 'MB-Lab.addon_updater_ops.addon_updater_restore_backup'> cls: <class 'MB-Lab.addon_updater_ops.addon_updater_restore_backup'> cls BA: <class 'MB-Lab.addon_updater_ops.addon_updater_ignore'> cls: <class 'MB-Lab.addon_updater_ops.addon_updater_ignore'> cls BA: <class 'MB-Lab.addon_updater_ops.addon_updater_end_background'> cls: <class 'MB-Lab.addon_updater_ops.addon_updater_end_background'> mb_lab Updater: Read in json settings from file File not found: toon_config.json Traceback (most recent call last): File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/init.py", line 5630, in execute creation_tools_ops.load_config(name) File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/creation_tools_ops.py", line 141, in load_config config_content["data_directory"] = config_name TypeError: 'NoneType' object does not support item assignment

location: :-1

location: :-1 Error: Traceback (most recent call last): File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/init.py", line 5630, in execute creation_tools_ops.load_config(name) File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/creation_tools_ops.py", line 141, in load_config config_content["data_directory"] = config_name TypeError: 'NoneType' object does not support item assignment

location: :-1

Traceback (most recent call last): File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/init.py", line 3557, in draw creation_tools_ops.set_data_directory(cleaned_name) File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/creation_tools_ops.py", line 116, in set_data_directory config_content["data_directory"] = dir TypeError: 'NoneType' object does not support item assignment

location: :-1

location: :-1 Traceback (most recent call last): File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/init.py", line 3557, in draw creation_tools_ops.set_data_directory(cleaned_name) File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/creation_tools_ops.py", line 116, in set_data_directory config_content["data_directory"] = dir TypeError: 'NoneType' object does not support item assignment

location: :-1

location: :-1 Traceback (most recent call last): File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/init.py", line 3557, in draw creation_tools_ops.set_data_directory(cleaned_name) File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/creation_tools_ops.py", line 116, in set_data_directory config_content["data_directory"] = dir TypeError: 'NoneType' object does not support item assignment

location: :-1

location: :-1 Traceback (most recent call last): File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/init.py", line 3557, in draw creation_tools_ops.set_data_directory(cleaned_name) File "/home/farishta/.config/blender/2.82/scripts/addons/MB-Lab/creation_tools_ops.py", line 116, in set_data_directory config_content["data_directory"] = dir TypeError: 'NoneType' object does not support item assignment

location: :-1

location: :-1

`

animate1978 commented 4 years ago

Not sure if I am doing this right again... trying to test out the Model Integration part of MB-Dev again

TetoTheSquirrelFox commented 4 years ago

After the change I did few days ago :

animate1978 commented 4 years ago

That might have been the issue.

toon_config.json saves in /data/ however which may confuse people (including myself). Anyway to change that?

EDIT : So checking again....

TetoTheSquirrelFox commented 4 years ago

Yes, I think that I miss to change doc somewhere but that's it. You can have one or more configs file in your project folder, say /toon/, but this file refers to all data under /toon/ and not elsewhere. So if your blend or your config that belong to /toon/ are under /data/ that will not work anymore.

TetoTheSquirrelFox commented 4 years ago

So I did understand what you wanted to say, and I did the commit today.

animate1978 commented 4 years ago

I have merged the commit and it seems to work much better so far.