leomoon-studios / leomoon-lightstudio

Light Studio plugin for Blender
https://leomoon.com/store/plugins/leomoon-lightstudio/
GNU General Public License v3.0
353 stars 45 forks source link

Blender 3.5 on macOS Issue #73

Closed leomoon closed 9 months ago

leomoon commented 1 year ago

LightStudio can't be activated on macOS using Blender 3.5.1:

Traceback (most recent call last):
  File "/Applications/Blender.app/Contents/Resources/3.5/scripts/modules/addon_utils.py", line 333, in enable
    mod = __import__(module_name)
  File "/Users/rebecca/Library/Application Support/Blender/3.5/scripts/addons/leomoon-lightstudio-master/__init__.py", line 21, in <module>
    auto_load.init()
  File "/Users/rebecca/Library/Application Support/Blender/3.5/scripts/addons/leomoon-lightstudio-master/auto_load.py", line 30, in init
    modules = get_all_submodules(Path(__file__).parent)
  File "/Users/rebecca/Library/Application Support/Blender/3.5/scripts/addons/leomoon-lightstudio-master/auto_load.py", line 67, in get_all_submodules
    return list(iter_submodules(directory, [directory.name](http://directory.name/)))
  File "/Users/rebecca/Library/Application Support/Blender/3.5/scripts/addons/leomoon-lightstudio-master/auto_load.py", line 74, in iter_submodules
    yield importlib.import_module("." + name, package_name)
  File "/Applications/Blender.app/Contents/Resources/3.5/python/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/Users/rebecca/Library/Application Support/Blender/3.5/scripts/addons/leomoon-lightstudio-master/deleteOperator.py", line 4, in <module>
    from . import light_list
  File "/Users/rebecca/Library/Application Support/Blender/3.5/scripts/addons/leomoon-lightstudio-master/light_list.py", line 6, in <module>
    from . operators import modal
  File "/Users/rebecca/Library/Application Support/Blender/3.5/scripts/addons/leomoon-lightstudio-master/operators/modal.py", line 5, in <module>
    from . modal_utils import *
  File "/Users/rebecca/Library/Application Support/Blender/3.5/scripts/addons/leomoon-lightstudio-master/operators/modal_utils.py", line 183, in <module>
    lightIconShader = gpu.types.GPUShader(vertex_shader, fragment_shader)
Exception: Shader Compile Error, see console for more details
teddylindsey commented 1 year ago

Sounds like cross-platform shader generation needs to use the new gpu API that supports Mac/Metal.

leomoon commented 1 year ago

more info: https://www.projects.blender.org/blender/blender/issues/107332

need to use new GPU API: https://docs.blender.org/api/current/gpu.html#triangle-with-custom-shader

dusticelli commented 1 year ago

What should be done to fix the problem?

this file should be pasted to the text-editor and executed, like descirbed? https://docs.blender.org/api/current/gpu.html#triangle-with-custom-shader

That doesn't change anything for me. It is still not possible to activate LightStudio on a Mac and Blender 3.5.1. I would love to use it on the latest stable blender version. Will this issue be fixed in a future release?

leomoon commented 1 year ago

We are working on a fix to support Metal on macOS but by changing GPU Backend from Metal to OpenGL you can use LightStudio on macOS until we have a fix.

leomoon commented 9 months ago

This is fixed in the new version.