Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix - detect console mode using bpy.app.background #212

Merged
merged 1 commit into from
Aug 4, 2024
Merged

bug fix - detect console mode using bpy.app.background #212

merged 1 commit into from
Aug 4, 2024

Conversation

Andrej730
Copy link
Contributor

Resolves errors like below on register() if blender is currently in background mode:

Exception in module register(): \Blender\4.2\extensions\blender_org\screencast_keys\__init__.py
Traceback (most recent call last):
  File "\Blender\4.2\scripts\modules\addon_utils.py", line 482, in enable
    mod.register()
  File "\Blender\4.2\extensions\blender_org\screencast_keys\__init__.py", line 135, in register
    gpu_utils.shader.ShaderManager.register_shaders()
  File "\Blender\4.2\extensions\blender_org\screencast_keys\gpu_utils\shader.py", line 52, in register_shaders
    gpu.platform.backend_type_get() != 'OPENGL':

Resolves errors like below on register if blender is currently in background mode:

Exception in module register(): C:\Users\Andrej\AppData\Roaming\Blender Foundation\Blender\4.2\extensions\blender_org\screencast_keys\__init__.py
Traceback (most recent call last):
  File "\Blender\4.2\scripts\modules\addon_utils.py", line 482, in enable
    mod.register()
  File "\Blender\4.2\extensions\blender_org\screencast_keys\__init__.py", line 135, in register
    gpu_utils.shader.ShaderManager.register_shaders()
  File "\Blender\4.2\extensions\blender_org\screencast_keys\gpu_utils\shader.py", line 52, in register_shaders
    gpu.platform.backend_type_get() != 'OPE
@nutti nutti added the bug Something isn't working label Aug 4, 2024
@nutti nutti merged commit 47ad5c0 into nutti:master Aug 4, 2024
9 checks passed
@nutti
Copy link
Owner

nutti commented Aug 4, 2024

@Andrej730 Thank you!

@nutti nutti added this to the Version 4.0.1 milestone Sep 28, 2024
nutti pushed a commit that referenced this pull request Sep 28, 2024
nutti pushed a commit that referenced this pull request Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants