No, I hadn’t actually, but maybe that’s a good idea, if it has a chance of being accepted…
As a side note, I can’t seem to access blender.org currently, is it down?
No, I hadn’t actually, but maybe that’s a good idea, if it has a chance of being accepted…
As a side note, I can’t seem to access blender.org currently, is it down?
Ah, ok, it’s working now. Having a look at the addon guidelines for being accepted into Blender, it seems like it would probably work. I’d need to clean up the code quite a bit, but that should be possible.
I’ll have a look into it anyway.
That depends on your theme config, go to Settings / Themes / User Interface / Box / Inner, and change the alpha value to 0
Ok, I’ve added a couple of new features:
You can download it here:
Would it be possible to add an option to directly display the Node Pie Menu after dragging the connector line? (this way, completely replacing Blender’s default nodes “menu”)?
Mock-up:
That would be really nice, but unfortunately, I don’t think it’s possible with the api currently
Ok, I’ve submitted the addon for integration into the default Blender addon list, so fingers crossed the devs also think it’s useful
https://developer.blender.org/T100668
Grate work! Is it possible to highlight often used nodes with color, not size? Also have a question - how do you preview your nodes in provided video is it kinda addon or 3d view with plane?
Hi, unfortunately, it’s not possible to change the colours of buttons with the api, so changing the size is the only way
To preview the nodes, it’s just a plane with the material applied to it and the world colour set to black
I’m loving this addon! I use it with Right Click.
To use without breaking the Right click context menu you can assign the pie menu to ‘Right Mouse’ and change it to ‘Click Drag’ mode. Found in Keymap / Node Editor(Global) / Node pie.
Also needs changing for the Context menu to ‘Click’ mode instead of ‘Press’. Found in Keymap / Node editor(Global) / Node Context Menu
Oh, damn, that’s a really cool idea! I hadn’t thought about just binding it to the drag mode, that could be faster than a key combination.
I would try adding it to the addon, but it requires changing blender’s default keymap, which is something I don’t think a small addon like this should be doing…
Great idea though, thanks for sharing
Hi! I changed the keymap to RMB instead of ctrl-A and disabled ctrl-LMB, but it resets to the defined default at startup. With manually saving the preferences too. I tried this yesterday with 3.2.2 and I changed the default in npie_prefs.py to my preference. I’ll see if this happens in 3.3.
I can reproduce and confirm this issue. I tried to disable ctrl+left click as it conflicts with noodler, but upon closing and reopening blender, the keymap is reset.
Oh, good point, I hadn’t really thought about that, I’ll have to have a look at it and see how to fix it.
I have just started Uni this week though, so I’m going to have a lot less time to work on this stuff for a while, it could be a bit before I get round to trying to fix it
For now, changing the keymap directly works! (had the same problem)
Hi Andrew,
New to Python and blender addons and was looking into your source code to try and understand how you obtain the menu list for the nodes, is there a BPY for this or you actively obtaining this from checking each plugin that is installed somehow?
Hi!
To get the categories of nodes, you can use the nodeitems_utils
and nodeitems_builtins
modules.
For example, this script will print all the shader node categories and the nodes contained within those categories:
import bpy
import nodeitems_utils
class SimpleOperator(bpy.types.Operator):
bl_idname = "node.print_categories"
bl_label = "Print all categories and nodes"
@classmethod
def poll(self, context):
# The operator needs to be run in the node editor
return context.area.type == "NODE_EDITOR"
def execute(self, context):
# Print all node categories and their nodes in the current editor
# Iterate over the categories of nodes
for category in nodeitems_utils.node_categories_iter(context):
print(f"{category.name}:")
# Iterate over the node_items contained in the category
for node_item in category.items(context):
# Some node items are empty for some reason, check for that
if hasattr(node_item, "label"):
print(f" {node_item.label}")
return {'FINISHED'}
def register():
bpy.utils.register_class(SimpleOperator)
def unregister():
bpy.utils.unregister_class(SimpleOperator)
if __name__ == "__main__":
register()
To use it, run it from the operator search in any node editor, giving this result:
Input:
Ambient Occlusion
Attribute
Bevel
Camera Data
Color Attribute
Curves Info
Fresnel
Geometry
Layer Weight
Light Path
Object Info
Particle Info
Point Info
RGB
Tangent
Texture Coordinate
UV Map
Value
Volume Info
Wireframe
Output:
AOV Output
Light Output
Material Output
Shader:
Add Shader
Anisotropic BSDF
Diffuse BSDF
etc.
I would definitely recommend playing about with nodeitems_utils
and nodeitems_builtins
in the python console, though, as there are a lot of useful things in there.
Hope that helps!
Important
Currently, the addon will not work for Geometry nodes in Blender 3.4, due to an intentional change to the API (that I consider to be a massive downgrade).
As far as I can see, there is no easy way to regain this functionality, and as such, it is quite possible that the addon will simply cease to function in the 3.4 release version.
The change has been added to the python API section of the release notes under the “breaking changes” section, and the suggested workaround will not work for this addon.
I think that this is a massive oversight by the developers, as it will essentially remove useful functionality from the API, and while I understand that there are valid reasons for the change, I believe that it is worth the extra effort to make it compatible with the API.
I’ve made a topic about it on devtalk, and I’d be very grateful to see other people’s thoughts on it:
Hopefully this can be resolved before 3.4 is released