I would like to read and change a value in the Geometry Node editor using a python script. If for example I want to change the Density in the PointDistribution node, how would this be doing using a Python script?

I tried this to get started:

node_group = bpy.data.node_groups['Point Distribute']

but that gave me an error: Key "Point Distribute" not found.

I am using Blender 2.93.

Thank you.

  • 3
    $\begingroup$ Related, blender.stackexchange.com/questions/222535/… .. unfortunately @Gorgious removed his answer ... but could by the looks add it here. , if gm = context.active_object.modifiers.get("GeometryNodes") is the modifier, then gm.node_group is the node group. $\endgroup$
    – batFINGER
    Jul 13 '21 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.