← All ideas
  • Published 24 Jan 2024

Command Line Rendering with Geometry nodes

Hi. Will be there something possible in the future? So instead clicking with the mouse on the GeometryNodes panel i would like to pass this values from command line.

2024-01-24 20_12_46.jpg

100%

Development Status: Open

Upvote 1 Downvote 0
dejan1
24 Jan 2024

3 Comments

dejan1 Author

Yes, I completely forgot. 🤦‍♂️

For example: material = bpy.data.materials['Material'] bpy.context.object.modifiers["GeometryNodes"]["Socket_2"] = material

and then I use "obj.data.update()"

obj = bpy.context.active_object obj.data.update()

You can use the Scripting tab and it will print out the code you need.

raimund.klink97

Isn't that already possible with the help of Python (bpy)?

iCameiSawiBlended

You can, though it's clunky:

First scan items_tree for the socket of the name you want: e.g. 2 bpy.data.node_groups["Geometry Nodes"].interface.items_tree[2].name

Then use the socket number you found to access the item you want: n = 2 bby.context.active_object.modifiers["GeometryNodes"][f'Socket_{n}'])

Possible there is an easier way I don't know of.