Each one of the following scripts (which provide different collections as input for the Geometry-Node) work as expected on their own and output different values:
Script 1 (Isometric Reference Collection) :
import bpy
from bpy import data as D
from bpy import context as C
# specify input for Geometry Node (i.e. collection):
D.objects["Floor Plane"].modifiers["GeometryNodes"]["Input_15"]\
= D.collections["Isometric Reference Collection"]
# retrieve comptuted output (via Named-Attribute) from Geometry Node
H_REF = D.objects["Floor Plane"].evaluated_get(C.evaluated_depsgraph_get())\
.data.attributes["H_MAX"].data[0].value
print("H_REF = " + str(H_REF))
Script 2 (Isometric Render Collection):
import bpy
from bpy import data as D
from bpy import context as C
# specify input for Geometry Node (i.e. collection):
D.objects["Floor Plane"].modifiers["GeometryNodes"]["Input_15"]\
= D.collections["Isometric Render Collection"]
# retrieve comptuted output (via Named-Attribute) from Geometry Node
H_MAX = D.objects["Floor Plane"].evaluated_get(C.evaluated_depsgraph_get())\
.data.attributes["H_MAX"].data[0].value
print("H_MAX = " + str(H_MAX))
However, I need both values H_REF and H_MAX in a single script, but if I combine the two above scripts to a single one then both values are the same.
Script 3 (evaluating both collections):
import bpy
from bpy import data as D
from bpy import context as C
# specify input for Geometry Node (i.e. collection):
D.objects["Floor Plane"].modifiers["GeometryNodes"]["Input_15"]\
= D.collections["Isometric Reference Collection"]
# retrieve comptuted output (via Named-Attribute) from Geometry Node
H_REF = D.objects["Floor Plane"].evaluated_get(C.evaluated_depsgraph_get())\
.data.attributes["H_MAX"].data[0].value
print("H_REF = " + str(H_REF))
# specify input for Geometry Node (i.e. collection):
D.objects["Floor Plane"].modifiers["GeometryNodes"]["Input_15"]\
= D.collections["Isometric Render Collection"]
# retrieve comptuted output (via Named-Attribute) from Geometry Node
H_MAX = D.objects["Floor Plane"].evaluated_get(C.evaluated_depsgraph_get())\
.data.attributes["H_MAX"].data[0].value
print("H_MAX = " + str(H_MAX))
I just could duplicate the corresponding Geometry-Node with providing specific collections, but how to fix this via Python, any ideas (I use blender version 3.4)?