Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
nutti committed Feb 3, 2024
1 parent bcda8bf commit 04e1330
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/screencast_keys/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ def unregister_addon_enable_property():


def register():
if not common.is_console_mode():
gpu_utils.shader.ShaderManager.register_shaders()
gpu_utils.shader.ShaderManager.register_shaders()
register_updater(bl_info)
# Register Screencast Key's enable property at here to use it in the
# both SK_PT_ScreencastKeys Panel and SK_PT_ScreencastKeys_Overlay Panel.
Expand Down Expand Up @@ -213,8 +212,7 @@ def unregister():
call_silently(bpy.utils.unregister_class, ui.SK_PT_ScreencastKeys)
bpy.utils.unregister_class(preferences.DisplayEventTextAliasProperties)
unregister_addon_enable_property()
if not common.is_console_mode():
gpu_utils.shader.ShaderManager.unregister_shaders()
gpu_utils.shader.ShaderManager.unregister_shaders()


if __name__ == "__main__":
Expand Down
3 changes: 3 additions & 0 deletions src/screencast_keys/gpu_utils/shader.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import os
import gpu
from .. import common


class ShaderManager:
Expand Down Expand Up @@ -51,6 +52,8 @@ def register_shaders(cls):
gpu.platform.backend_type_get() != 'OPENGL':
return

if common

for shader_name, shader_files in cls.SHADER_FILES.items():
vert_code = None
frag_code = None
Expand Down
1 change: 0 additions & 1 deletion tests/python/screencast_keys_test/ui_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ class TestUI(common.TestBase):
module_name = "ui"
idname = [
('PANEL', 'SK_PT_ScreencastKeys'),
('PANEL', 'SK_PT_ScreencastKeys_Overlay'),
]

# this test can not be done because area always NoneType in console run
Expand Down

0 comments on commit 04e1330

Please sign in to comment.