Master the Basics of Blender Python for Geo Nodes in Just One Video

preview_player
Показать описание
This is a Blender Python Tutorial on the basics of using Python to create Geo Nodes! In this video, I will guide you through adding and connecting Geometry Nodes with Python, as well as updating the default input socket values.

Initial Code

Final Code

Geo Nodes Python documentation

00:00 - Intro
00:29 - Set up the workspace
01:24 - Add a mesh and a geo nodes modifier
02:50 - Create a reference to the node tree
03:40 - Get the group output node
04:16 - Add the Cube Mesh Geo Node
05:25 - Add the Subdivide Mesh Geo Node
06:30 - Update the position of the nodes
08:00 - Define links between nodes
11:00 - Refactor node creation code
13:37 - Add the Triangulate Geo Node
16:25 - Add the Split Edges Geo Node and the Scale Elements Geo Node
19:00 - Update Geo Node default inputs

#blender #python #scripting #tutorial #geometrynodes
Рекомендации по теме
Комментарии
Автор

It's awesome ! I had started a little but now I understand the lack of knowledge that I had! Thank you very much we must continue to do this kind of

dolmenbretagne
Автор

Thanks for the videos! I would highly recommend writing a better from-to node link helper method where you can specify the from-to types in the function call. Here's what I wrote below:

#
def link_nodes_by_socket_type(node_tree, from_node, from_node_type, to_node, to_node_type):
node_tree.links.new(from_node.outputs[from_node_type], to_node.inputs[to_node_type])
#

With this, you can easily link the nodes in one line without updating from-to vars each time :-)

#
link_nodes_by_socket_type(node_tree, from_node = split_edges_node, from_node_type = "Mesh", to_node = separate_geometry_node, to_node_type = "Geometry")
#

SunshinePosseCrew
Автор

kinda sucks that there isn't a "formatGraph" function, setting x/y coordinates for nodes feels tedious

VladyVeselinov
Автор

Hey CG Pyhton, plz make a video about importing and controlling the inputs of an already created geometry nodes file, making use of a custom n-menu panel.

aaayerus
Автор

Outstanding! Do you know how to export it as .gltf with materials to? Thanks!

nicolassuarez
Автор

Thanks for this awesome tutorial.
I have a problem with creating links between nodes.
linking geometry (green dots) input/outputs works as intended but it doesn't work when I create a link between two attribute (diamonds) input/outputs.
I checked the DATA API and saw that the links were actually created but they were kinda disabled (Is_Hidden is enabled and cannot be disabled).

Pooriel
Автор

thank you for the tutorial I only have one question how do you use Vim commands in blender

TPSNS
Автор

How to add geometry node on a mesh created from json data in the python script

abiuniverse
Автор

fantastic, , , , can you please make a video on python rigging

avinashkaushik
Автор

Nice lesson! Thanks! Is there a way to pan and zoom view of geometry node editor with python?

VitalyBanny
Автор

Its so troublesome to create geometry nodes, what are advantages in using blender python compare to geometry nodes editor

Besvy-zxrz
Автор

can you make Blender python geo node tutorial for wrapping a object please, something like wrap master. I am trying to learn proceduralism in blender

havinthiranv
Автор

started looking for the version of Blender. Didnt find in description text or in the first 5 min of the video, so didnt continue.

stefankarlssonse
Автор

Hi sir, can you create a tutorial about matrix snapping for fk/ik snapp?

AliMohammadi-vg
Автор

I am using Blenders Geometry Nodes to create models (not using python). When I have created a model using geometry nodes I would like to export all the coördinates from the vertices as processed in the Group Output. Is there a way to obtain the data using python (as is presented in the Spreadsheet)?

PeterKonijnenbelt
Автор

Thank you for the great tutorial! I used this as a foundation for some geo nodes I am using in an add on. However, I keep getting this error: {AttributeError: 'geo_nodes' object has no attribute 'node' } on the line where I define my out_node as group output. I am using Blender 3.5. Do you have any advice on solving this error? I am relatively new to blender and python

ashlynmccann
Автор

Do you know how create a new modifier ? using class do not add the modifer in the add modifier list, even with MyModifier registered in the script as usual.

surtvalheim