leomoon-studios / leomoon-lightstudio

Light Studio plugin for Blender
https://leomoon.com/store/plugins/leomoon-lightstudio/
GNU General Public License v3.0
353 stars 45 forks source link

Error when creating lightstudio #81

Closed Anon35236263 closed 6 months ago

Anon35236263 commented 6 months ago

blender_3Ev5YgXg8j blender_EFqCyXk4hi

I have a lot of problems with LLS version 2.15 and blender 4.0.2, I can't edit anything in existing profiles because the program closes, I can't delete or create, the only thing that works is switching between previously created profiles :/

This problem occurs when I try to create a new LLS, the error I pasted appears and copies of objects are created, I manually deleted everything from the file related to LLS, restarted blender and still the same.

Python: Traceback (most recent call last): File "C:\Users\Kafel\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\leomoon-lightstudio-master\light_operators.py", line 370, in execute bpy.ops.lls_list.new_profile() File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\bpy\ops.py", line 109, in __call__ ret = _op_call(self.idname_py(), kw) RuntimeError: Error: Python: Traceback (most recent call last): File "C:\Users\Kafel\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\leomoon-lightstudio-master\light_profiles.py", line 213, in execute check_profiles_consistency(context) File "C:\Users\Kafel\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\leomoon-lightstudio-master\light_profiles.py", line 34, in check_profiles_consistency profile_menu_item = scene_profile_list[context.scene.LLStudio.profile_list_index] IndexError: bpy_prop_collection[index]: index 1 out of range, size 1 Location: C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\bpy\ops.py:109

leomoon commented 6 months ago

Hi Anon,

LightStudio has an issue with Blender 4.0+ and we don't have a solution for it yet.

Anon35236263 commented 6 months ago

Hello, I downloaded version 2.15.1 which is supposed to fix problems with Blender 4.0 and when I create a new file everything works, but I wanted to add LLS to an existing project in which version 2.15.0 did not work before, the error has changed a bit but it still works the same. When creating the LLS, the attached error appears and an empty copy of the LLS is created, in addition, the "Lights" tab is displayed in the N panel, even though the LLS does not exist, in the new project this tab is not there before the LLS was created. Is there any way to fix this project? I removed everything related to LLS from the file, reinstalled the addon but nothing helped.

blender_8eKzqKTyRl blender_WGjwWa17Dc

Python: Traceback (most recent call last): File "C:\Users\Kafel\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\leomoon-lightstudio-master\light_operators.py", line 368, in execute bpy.ops.lls_list.new_profile() File "C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\bpy\ops.py", line 109, in __call__ ret = _op_call(self.idname_py(), kw) RuntimeError: Error: Python: Traceback (most recent call last): File "C:\Users\Kafel\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\leomoon-lightstudio-master\light_profiles.py", line 213, in execute check_profiles_consistency(context) File "C:\Users\Kafel\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\addons\leomoon-lightstudio-master\light_profiles.py", line 34, in check_profiles_consistency profile_menu_item = scene_profile_list[context.scene.LLStudio.profile_list_index] IndexError: bpy_prop_collection[index]: index 1 out of range, size 1 Location: C:\Program Files\Blender Foundation\Blender 4.0\4.0\scripts\modules\bpy\ops.py:109

leomoon commented 6 months ago

I can't replicate your problem. What do you use for chat? I can remote in and see if I can fix it.

I'm in PST timezone.

theres1 commented 6 months ago

Unfortunately, I have not been able to replicate your issue. However, please try removing everything LLS related from outliner (with Blender File display mode) obraz

Then please run this script in text editor:

import bpy
bpy.context.scene.LLStudio.profile_list.clear()
bpy.context.scene.LLStudio.profile_list_index = 0
bpy.context.scene.LLStudio.light_list.clear()
bpy.context.scene.LLStudio.light_list_index = -1
bpy.context.scene.LLStudio.initialized = False

After this, hopefully, you will be able to create a fresh LLS.

Anon35236263 commented 6 months ago

I can't replicate your problem. What do you use for chat? I can remote in and see if I can fix it.

I ran Windows Sandbox to check if the file was corrupt on a clean install and it appeared.

Virtual machine -> Blender 4.0.2 downloaded from blender.org -> installation of LLS 2.15.1 -> it works in the new file -> I restarted blender -> I opened the attached file (there are only cameras in it, I removed the rest of the unnecessary things) > the problem is same

I hope this helps remove bugs :)

LLS Bug.zip

However, please try removing everything LLS related from outliner (with Blender File display mode)

I did this by trying to fix the error myself, but

import bpy bpy.context.scene.LLStudio.profile_list.clear() bpy.context.scene.LLStudio.profile_list_index = 0 bpy.context.scene.LLStudio.light_list.clear() bpy.context.scene.LLStudio.light_list_index = -1 bpy.context.scene.LLStudio.initialized = False

This fixed my file :) Thank you very much for your help! Great addon!