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

Issue with 2.3.10 on Blender 2.79b : Copy BLS profile breaks BLS functionality #13

Closed geomagpeterjepsen closed 5 years ago

geomagpeterjepsen commented 5 years ago

Preface: I love BLS and use it often for product renders. Documentation on BLS is scarse, it is not clear to me if profile copying is supposed to work or is still on the "future ideas" list like Copy Profile to Scene.

Postulate: Copying a profile breaks BLS index logic and stops profile switching from working, basically breaking the scene if you have different BLS profiles (I do that a lot unfortunately)

Versions: Blender 2.79b BLS 2.3.10

Minimun steps to reproduce: Blender standard startup scene (the one with the cube) (Button) Create Light Studio (Icon) Copy Light Profile -> Copy Profile Click the two profiles in the list, profile switching is not working from this point, no matter what you do.

Error: (From console)

DAG zero... not allowed to happen! Index update 1 Traceback (most recent call last): File "C:\Users\Windows 10\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-light-studio\light_profiles.py", line 319, in update_list_index context.scene.objects.unlink(ob) RuntimeError: Error: Object 'BLS_HANDLE.001' is not in this scene 'Scene'

File "C:\Users\Windows 10\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blender-light-studio\light_profiles.py", line 304, in update_list_index

Post scriptum: As well as this being fixed in future versions, I'd like if we can figure out a way of manually rescuing a scene that has been borked by this error. I have two important Blender scenes that were borked by this copy error, and I'd like to recover them back to working order. I've programmed PHP in the past but Python in Blender is still witchcraft to me, and I can't figure out where the data for profiles is kept in the scene.

theres1 commented 5 years ago

Please try 2.3.11 from dev branch. It should fix problems with new files and should be able to open malformed profiles, though they might need some manual correction (look at fresh profile hierarchy).

leomoon commented 5 years ago

I tested it and it works now. Dev branch is merged. This bugfix is for Blender 2.79b.

@geomagpeterjepsen please test it out: https://leomoon.com/static/?file=blender-light-studio.zip

geomagpeterjepsen commented 5 years ago

Hello all. I am happy to report that the bug reported above is fixed, and my two previously broken scenes came back to life. My compliments! For your viewing pleasure I've attached an example of what I use BLS for. BLS render result

Question to developers before we close this report: Is there interest in a thorough bug testing and reporting of this version for 2.79b, or is there already another further developed and polished branch in anticipation of Blender 2.8 ?

leomoon commented 5 years ago

Good that your old scenes are working now.

We're on code freeze right now until blender 2.80 final comes out. Then we'll start to make Blender Light Studio for Blender 2.80.

geomagpeterjepsen commented 5 years ago

Understood. Closing this issue since it's resolved.