getavalon / core

The safe post-production pipeline - https://getavalon.github.io/2.0
MIT License
214 stars 48 forks source link

'loader' and 'sceneinventory' don't use the current project when using `AVALON_DEBUG` #460

Closed jasperges closed 4 years ago

jasperges commented 4 years ago

While working on the Blender integration I ran into something I thought was an issue with my code. When you have set AVALON_DEBUG=1 the loader and sceneinventory use the first project from the database instead of the 'active' one.

See the relevant lines for the loader and the sceneinventory.

To be honest I found this quite confusing. Is there a specific reason for this? Would it be okay to remove this?

BigRoy commented 4 years ago

Good question. I think the reason was to ease starting these tools in a quick test environment, but I agree that the behavior sounds confusing. I believe originally that code was written by @mottosso looking at the BLAME reports on Github.

Does AVALON_DEBUG give any additional debugging output you actually need? I don't recall it actually becoming more verbose nor can I find much code related to AVALON_DEBUG. Is it useful either way? Aside of it producing this confusing behavior.

Admittedly the AVALON_DEBUG as it currently is implemented feels more like AVALON_DEMO where it starts the tools in such a way that it "demos" the toolset. However I'd feel that should never run on a live database either way. Maybe if we need the behavior to persist so tools can easily initialize into a project without requiring to explicitly set it first this could be refactored to "demo" as opposed to "debug".

jasperges commented 4 years ago

After digging around a bit, it seems that AVALON_DEBUG is actually quite useless. I do use it a little bit in the Blender integration.

It would be nice to have a 'proper' debugging mode and probably also have a 'demo' mode. But that seems like quite a bit of work to get right and in my opinion doesn't have a very high priority.

I personally feel it would already be a good start to get rid of the 'confusing' behaviour in the loader and sceneinventory, but let's see what @mottosso has to say. :)

jasperges commented 4 years ago

Hi @mottosso, do you have time to have a quick glance and give your opinion?

mottosso commented 4 years ago

When you have set AVALON_DEBUG=1 the loader and sceneinventory use the first project from the database instead of the 'active' one.

I'm equally stumped. :S Can't remember implementing this kind of behavior, would be happy to see it removed. Thanks for checking.