Extra Nodes for GeometryNodes

Hi,
I was trying to figure out a way to deform custom normals (taken from static-baked VCol, due to not being supported yet), which seems relatively futile, probably due to lack of experience in vector math.
But would it be feasible to attempt adding Custom Normal field node with slightly above beginner Python knowledge? Can mesh.loops be within python scope if executed from nodes?

Hi @BD3D,

Firstly, great job working on these custom Geometry Nodes! Not only do I see they are helpful, but your code has helped me to create my own custom GeoNodes too. So thank you!

As mentioned, I’ve been using this/your approach to create custom nodes. However, I have an issue with my custom nodes I feel you may be able to help me with. I know this is not exactly the correct way to approach you about such matters, but I wasn’t sure of how else to do it. If there is a more appropriate platform/forum, please let me know.

Simply:
I have NodeGroupA, which has its “update” method triggered by the “bpy.app.handlers.frame_change_pre” event handler. This works fine.

I have NodeGroupB, which contains an instance of NodeGroupA (created via “ng.nodes.new(“ID_NAME”)”). It seems as though the instance of NodeGroupA within NodeGroupB is not receiving the call to its “update” function.

Any ideas? Is there a better way to reach out to you in order to discuss and share some example code?

Thanks!

Hi
glad to know i was helpful :slight_smile:

How do you send your update signal?
I would suggest:

for ng in bpy.data.node_groups:
    if ng.startswith("NodeGroupA"): #so you also support dupplicates
        ng.my_update_function()

I think centralizing “how to make custom node groups info” here is fine
But one thing is certain it’s all smoke and mirror compared to a proper C++ implementation

1 Like

Thanks @BD3D,

I’ve opened a thread named “How To Extend: GeometryNodeCustomGroup”. Hopefully, there, we can talk a little more about the details.

I should provide some code to demonstrate my predicament, I know, but I’ve not had time to allow myself to do that yet. I imagine within the next day or two I can.

The “ng.startswith(“NodeGroupA”)” is a very good idea! However, I feel I may need to review a more elaborate demo in order to fully comprehend your idea. I feel I get it, I don’t have time right now to test, but it feels very good! :stuck_out_tongue:

Thanks!

Have you thought about making more nodes? I won’t use py,I want an expression node, although I have suggested it, but it seems that they are not made

Have you thought about making more nodes? I won’t use py,I want an expression node, although I have suggested it, but it seems that they are not made

You have a mockup?



Simple expression function node (floating point type) (blender.community)
Two models are provided, along with functionality application links

3 Likes

I mean, it could be done with the smoke and mirrors of a node group plugin, we could create a function that creates a node tree dynamically depending on the user expression. Looks like fun to do :slight_smile:

Yes, it makes computing nodes easy, but no one makes this :tired_face:

Can you make it? Thank you

This is what I want in any node system. It could avoid chaining a lot of nodes but for a simple expression.

Yes, you can reduce nodes, so that beginners can better understand, now there are a lot of people do not understand how to join functions

I made an add-on that converts expressions into node trees. Not perfect but still very useful in some cases.

5 Likes

Impressive work :grinning: is there some notes on the plugin structure?

What do you mean with plugin structure?
There is a documentation file for how to use the add-on:

There is no documentation on the code itself, if that’s what you’re wondering. You’d have to figure it out from the code comments I’m afraid. In general the process is:
Scanning/lexing source to tokens → parse tokens into AST → transform AST into typed AST and resolve function overloading etc. → Compile typed AST into “bytecode”-like instructions → Interpret instruction into nodes

1 Like

Okay, thanks for the info :slight_smile:

Good, but he didn’t reduce the nodes.

Hey, I’ve been messing around with the scripts and trying to create a custom interface for a nodegroup, but it’s really difficult and intimidating for a novice who has very little experience with python scripting in blender. I’d be very grateful if someone would lend me a hand and give me a quick rundown on the steps one would take to add a nodegroup with a custom interface, using the provided template.

Thanks :slightly_smiling_face:


@BD3D, @Strike_Digital

1 Like

Ah, yeah sure, have a look at this:

It’s basically a very condensed version of one of the other nodes, that you should be able to modify easily to fit your needs.
It is a fairly advanced bpy topic though, so I’d definitely recommend getting to grips with other parts of the API as well, if not first. @sybren has done an amazing series that I’d highly recommend called Scripting for Artists

Hope that helps!

3 Likes

Thanks a lot, I’ll check them out!

1 Like