You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using bqt as a dependency of a custom addon we created. For this addon we need disable wrapping of blender using the env variable "BQT_DISABLE_WRAP".
Here we are facing the following problem:
We want to set this variable temporarily, while blender is open, using os.environ["BQT_DISABLE_WRAP"] = "1" in the register() function of our own Plugin. However since the Plugin needs bqt to be registered first, bqt can not take the env. var. into account.
Is there a way for us to set the environment variable before bqt is registered?
We have tried to enable the bqt addon in the register function of our own addon but this also did not work due to a _RestrictContext problem on blender side.
It appears to be impossible to access the correct context before all addons are loaded in.
So what we would need to have is something like this:
Start blender
Set disable_wrap using: os.environ["BQT_DISABLE_WRAP"] = "1"
enable bqt
enable our addon
The text was updated successfully, but these errors were encountered:
Since blender doesn't allow you to control the order plugins are loaded in on startup, i don't see an easy way how to do this after you started blender but before bqt loads.
what you could consider is
method 1
enable your plugin, it checks if bqt is enabled.
if bqt enabled, disable the bqt plugin, and ask the user to restart blender
now on startup your plugin loads. then after loading it can load the bqt plugin without saving the loaded plugins.
this would work as long as the user doesnt enable/disable any other plugins.
method 2
a cleaner solution is to create a "launcher" for the user that starts blender with modified environment variables.
this could be a little script, or a shortcut that modifies the ENV vars. and then launches blender.
other
i was looking at disabling wrap, since it is not as stable as i'd like it too be.
wrap was the original solution but since then i have been rewritting bqt to move away from wrap.
if the non wrap solution is stable enough, that will become the default behaviour of bqt. but i can't promise a timeline for that.
tbh the easiest thing for now would be to clarify this as a warning on your tool in blender, if bqt is enabled in wrap mode.
inform the user they need to set this env var and restart blender.
and provide documentation on how to do this.
We are using bqt as a dependency of a custom addon we created. For this addon we need disable wrapping of blender using the env variable "
BQT_DISABLE_WRAP
".Here we are facing the following problem:
We want to set this variable temporarily, while blender is open, using
os.environ["BQT_DISABLE_WRAP"] = "1"
in theregister()
function of our own Plugin. However since the Plugin needs bqt to be registered first, bqt can not take the env. var. into account.Is there a way for us to set the environment variable before bqt is registered?
We have tried to enable the bqt addon in the register function of our own addon but this also did not work due to a
_RestrictContext
problem on blender side.It appears to be impossible to access the correct context before all addons are loaded in.
So what we would need to have is something like this:
os.environ["BQT_DISABLE_WRAP"] = "1"
The text was updated successfully, but these errors were encountered: