Skip to content

Commit

Permalink
Blender 4.0 Compatibility Update
Browse files Browse the repository at this point in the history
Despite listing numerous changes to the way nodes, node trees etc are handled in 4.0, this addon seemed to mostly as intended.
The only bug I encountered was the BigPic node not displaying the picture, which was resolved by changing the built_in gpu shader from '2D_Image' to 'Image'
I wrapped it in a try, except so that it should cover both 4.0 and previous versions.
  • Loading branch information
SpectralVectors authored Nov 16, 2023
1 parent 2eae047 commit 6eb1cc9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion BigPicNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ def draw_callback_px(self, context):
x = draw_position[0] + (node.width * scale_x)
y = draw_position[1] - height

shader = gpu.shader.from_builtin('2D_IMAGE')
try:
shader = gpu.shader.from_builtin('IMAGE')
except NameError:
shader = gpu.shader.from_builtin('2D_IMAGE')

batch = batch_for_shader(
shader, 'TRI_FAN',
{
Expand Down
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
bl_info = {
"name": "MindMapper",
"author": "Spectral Vectors, tin2tin, Bazza, cannibalox",
"version": (1, 6, 0),
"version": (1, 7, 0),
"blender": (2, 90, 0),
"location": "Custom Node Editor, and Shader, Geometry, Compositor Nodes",
"description": "A multi-line text and image flow chart node",
Expand Down

0 comments on commit 6eb1cc9

Please sign in to comment.