dg = context.evaluated_depsgraph_get()
bm = bmesh.new()
for ob in obs:
if use_mesh_modifiers:
ob_eval = ob.evaluated_get(dg)
me = ob_eval.to_mesh(preserve_all_data_layers=True, depsgraph=dg)
else:
ob_eval = ob
me = ob_eval.to_mesh()
me.transform(ob.matrix_world)
uv_names = [uvlayer.name for uvlayer in me.uv_layers]
print(uv_names)
color_names = [color.name for color in me.color_attributes]
print(color_names)
bm.from_mesh(me)
ob_eval.to_mesh_clear()
When i use origin mesh, the layers printed normally:
[‘UVMap’, ‘uv’]
[‘TestBlue’, ‘Col.001’, ‘Color’, ‘TestRed’, ‘Col’, ‘Mask’]
When I use geometry node to modify vert and faces, i can get vert and index correctly, but cannot get my output color layers, and color_attributes & uv_layers is null, so what’s wrong with my code and operation?