Skip to content

Commit 6eb1cc9

Browse files
Blender 4.0 Compatibility Update
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.
1 parent 2eae047 commit 6eb1cc9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

BigPicNode.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ def draw_callback_px(self, context):
4444
x = draw_position[0] + (node.width * scale_x)
4545
y = draw_position[1] - height
4646

47-
shader = gpu.shader.from_builtin('2D_IMAGE')
47+
try:
48+
shader = gpu.shader.from_builtin('IMAGE')
49+
except NameError:
50+
shader = gpu.shader.from_builtin('2D_IMAGE')
51+
4852
batch = batch_for_shader(
4953
shader, 'TRI_FAN',
5054
{

__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
bl_info = {
2727
"name": "MindMapper",
2828
"author": "Spectral Vectors, tin2tin, Bazza, cannibalox",
29-
"version": (1, 6, 0),
29+
"version": (1, 7, 0),
3030
"blender": (2, 90, 0),
3131
"location": "Custom Node Editor, and Shader, Geometry, Compositor Nodes",
3232
"description": "A multi-line text and image flow chart node",

0 commit comments

Comments
 (0)