3
$\begingroup$

enter image description here

I'm trying to set "Rotation", I can set a keyframe, but want to set it to (1,1,1) as a vector, but I cannot do it.

The keyframe insert works:

bpy.data.node_groups['Geometry Nodes'].keyframe_insert(data_path='nodes["Instance on Points"].inputs[5].default_value', frame=2 )

but that's it

$\endgroup$

2 Answers 2

2
$\begingroup$

nvm, Zanqdo on Blenderchat told me to copy full data path and that would be where i set the value.

$\endgroup$
2
$\begingroup$

If you want to just set the value without adding a keyframe

bpy.data.node_groups['Geometry Nodes'].node_group.nodes["Instance on Points"].inputs[5].default_value = ROTATION

replacing ROTATION with a 3-tuple of (x, y, z) rotation values would work.

$\endgroup$
2
  • $\begingroup$ that's the full data path, yes. $\endgroup$
    – 4nof
    Commented Mar 20, 2022 at 21:38
  • $\begingroup$ but note that the above code only works if you don't change the name of the modifier or the name of the instance on points node; and will stop working if the devs reorganize the inputs to the instance on points node. the bpy api for accessing nodes is very fragile. $\endgroup$ Commented Mar 20, 2022 at 23:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .