Node Preview - Rendered thumbnails for shader nodes

Yes, 2.93 beta is not supported yet. 2.93 will be supported once it’s at least in release candidate phase, until then, there might still be changes to the Python API.

Can you send me a .blend file with one such node setup in a private message so I can investigate?

1 Like

Okay, I understand about the release status. Thank you for your answer. :slightly_smiling_face:

Also for confirmation, should I use the message function of blenderartists.org for private messages?

For the .blend file, should I prepare a .blend file with all the nodes used by FxNodes for Blender pasted in?

You can use that, or send me a message via the Blender Market.

For a first look, just one node setup that can be used to reproduce the problem is enough.

1 Like

@B.Y.O.B Does the Node Preview add-on also visualize the Map Range node? Maybe something like this?

That’d be great.

2 Likes

@Metin_Seven This would be a visualisation of how the Map Range node works. It does not show me what it is currently doing in my node setup. I would be interested to know why you need this?

A graph would give visual feedback for the i.m.h.o. confusing dual min and max values.

1 Like

Okey for a few days it might be helpful for understanding, but I think after that it only costs space and performance unnecessarily. I would not welcome it as a replacement for the visual feedback of the node, because then the point of the addon would be lost.

1 Like

Someone added an interesting comment on my RCS post, suggesting the use of the RGB Curves node for a graphical representation of value changes. Didn’t think of that yet. The Map Range node could be used first, to normalize the input values in the 0-1 range.

1 Like

New video about the addon. Great to hear that CGMatter will be using it in future tutorials!

7 Likes

I have released v1.2, which brings the following changes:

  • Added support for macOS (Catalina or newer)
  • Fixed frames in node groups causing all thumbnails for the current node tree to disappear
  • Fixed unsupported nodes causing all previews to disappear
  • Added support for custom nodes which are internally node groups, e.g. FxNodes:
7 Likes

Can these previews be moved in the node rather than above it? Also, have them be collapsible (either per node or as an option for the whole tree)?

4 Likes

You did an amazing work with the addon!

4 Likes

Most nodes don’t have enough free space inside them for this, and an addon can’t edit nodes.
But I am planning to make it possible to shrink the thumbnails vertically (so they are rectangles instead of squares), which should help to get them out of the way a bit.

I’m planning to add this feature at some point in the future as well.

4 Likes

Hey, fristly thanks for sucha a great plugin!

I have just bought it and I have problems installing it. I get following error when I try to activate it.

Blender: 2.92.0-5
OS: Arch Linux


Exception in module register(): /home/kskitek/.config/blender/2.92/scripts/addons/NodePreview/__init__.py
Traceback (most recent call last):
  File "/usr/share/blender/2.92/scripts/modules/addon_utils.py", line 382, in enable
    mod.register()
  File "/home/kskitek/.config/blender/2.92/scripts/addons/NodePreview/__init__.py", line 161, in register
    from .display import display_register
  File "/home/kskitek/.config/blender/2.92/scripts/addons/NodePreview/display.py", line 60, in <module>
    raise Exception(msg + "\n\nImportError: %s" % error) from None
Exception: 

ImportError: cannot import name 'nodepreview_worker' from 'NodePreview' (/home/kskitek/.config/blender/2.92/scripts/addons/NodePreview/__init__.py)

Do you have any ideas what went wrong?

Did you maybe install Blender through your Linux distributions package manager? It could be that it’s using a different Python version than the official Blender 2.92. When you open Blender and make one of the areas into a Python Console, what Python version is printed for you?

Capture

I did install blender using package manager.

In the console I get:

PYTHON INTERACTIVE CONSOLE 3.9.4 (default, Apr 20 2021, 15:51:38)  [GCC 10.2.0]

Builtin Modules:       bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils
Convenience Imports:   from mathutils import *; from math import *
Convenience Variables: C = bpy.context, D = bpy.data

Ok, the reason is the incompatible Python version then. This addon contains a C++ module that requires Python 3.7.

You have two options:

  • You can install the official Blender 2.92 (zip package), it will have Python 3.7 bundled. In this case you can use the pre-compiled packages of Node Preview
  • You can download the source code package of Node Preview, go to the “Worker” folder, and follow the instructions in readme.md to compile it against Python 3.9

Great. Thank you - it works with the official version. I will try compiled version later on.

Maybe include an option to put them at the bottom, then? And if you add the collapsible feature, include an option for collapsed by default. Basically, I want them as unobtrusive as possible, but be able to view them when I need to.

Done, update will be out soon.

Unfortunately Blender doesn’t give us information about the node height.
For example, for the principled BSDF node, it gives width = 240 (accurate) and height = 100 (totally wrong).