Is there a way of overwriting the UVMap of the object, the one used by the Texture Coordinate node, with the generated uv_map that geometry nodes produce with the primitives? I want my procedural geo node objects to have usable UV's without having to change my textures to use the generated uv_map attribute.
2 Answers
This is a Known Issue for now. Hopefully it will be resolved in future implementations.
You can use this script to convert UVMap attributes to a regular UVMap. Just copy it into the text editor and execute. Tested in Blender 3.2.2.
Important before doing it:
Your UVMap attribute has to be named
UVMap
.You need to apply the geometry nodes modifier first.
You need to select your UVMap attribute inside the Attributes tab in the data properties of your geometry nodes object.
import bpy a = bpy.context.object.data.attributes a.active = a['UVMap'] bpy.ops.geometry.attribute_convert(mode='UV_MAP', domain='CORNER', data_type='FLOAT2')
The original hint is by Andrey-730 and can be found here: https://devtalk.blender.org/t/attribute-transfer-to-uv-layer/23016/7