I am on Windows 10 and I am using Blender 3.4.1 with a simple geometry node set-up in my blend file geonodes.blend. In this file, my render settings are set to my liking (Cycles is used and JPEG is the output format). A single JPEG file should be obtained (I am not running a sequential render).
I wish to alter the float values for Input_1 and Input_2 (both defaulted to zero) of my geometry node modifier via a python script called update_values.py. However, I wish to do that outside of Blender itself by using the command prompt.
In command prompt, I run:
cd /D D:\Projects\blender\geonodes
blender ./geonodes.blend -b -P ./update_values.py
with update_values.py being:
from bpy import context as C
S = C.scene
R = S.render
CO = C.object
from bpy import ops as O
OR = O.render
CO.modifiers["GeometryNodes"]["Input_1"] = 10
CO.modifiers["GeometryNodes"]["Input_2"] = 20
R.filepath = "//renders/output/updated_inputs."
OR.render(use_viewport = True, write_still=True)
In the command prompt, no error messages are returned and yet, when I open updated_inputs.jpg, the image output has clearly ignored the updated values for Input_1 and Input_2.
Is there something I am doing wrong? Any help or pointers on this would be greatly appreciated.