Closed jasperges closed 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".
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. :)
Hi @mottosso, do you have time to have a quick glance and give your opinion?
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.
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
theloader
andsceneinventory
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?