hlorus / CAD_Sketcher

Constraint-based geometry sketcher for blender
GNU General Public License v3.0
2.69k stars 129 forks source link

Cannot create sketch in Blender 4.0 alpha[BUG] #388

Closed meikasahara closed 1 year ago

meikasahara commented 1 year ago

Description

The latest Blender 4.0 alpha builds, after May the 22nd, break compatibility with the addon. It appears to be active and installed in the user preferences, and it appears both in the 3d Viewport and on the N-Panel, but it is not functional. Upon attempting to create a new sketch, the following error appears in the terminal:


Traceback (most recent call last):
  File "/home/user/.config/blender/4.0/scripts/addons/CAD_Sketcher-main/draw_handler.py", line 81, in draw_cb
    update_elements(context, force=force)
  File "/home/user/.config/blender/4.0/scripts/addons/CAD_Sketcher-main/draw_handler.py", line 58, in update_elements
    e.update()
  File "/home/user/.config/blender/4.0/scripts/addons/CAD_Sketcher-main/model/point_3d.py", line 28, in update
    self._shader, "POINTS", {"pos": (self.location[:],)}
  File "/home/user/.config/blender/4.0/scripts/addons/CAD_Sketcher-main/model/base_entity.py", line 67, in _shader
    return Shaders.uniform_color_3d()
  File "/home/user/.config/blender/4.0/scripts/addons/CAD_Sketcher-main/shaders.py", line 60, in uniform_color_3d
    return gpu.shader.from_builtin("3D_UNIFORM_COLOR")
ValueError: expected a string in ('FLAT_COLOR', 'IMAGE', 'IMAGE_COLOR', 'SMOOTH_COLOR', 'UNIFORM_COLOR', 'POLYLINE_FLAT_COLOR', 'POLYLINE_SMOOTH_COLOR', 'POLYLINE_UNIFORM_COLOR'), got '3D_UNIFORM_COLOR'

Addon Version

Latest

Blender Version

4.0

What platform are you running on?

Linux

hlorus commented 1 year ago

Thanks for reporting, looks like the shader was simply renamed, see: https://projects.blender.org/blender/blender/commit/8cfca8e1bd85

I'll try to get to it tomorrow.