I'm creating a node for Sverchok which will apply custom UV map to an object. Pretty simple thing but after applying new UV coordinates to an object object it doesn't update the viewer somehow. Switching to Edit Mode works but I'm sure there is a better way.
The problem can be reproduced this way:
then call the code for assigning new UV coordiantes:
import bpy obj = bpy.context.active_object new_uv = [(0.5, 0), (1, 0.5), (0.5, 1), (0, 0.5)] obj.data.uv_layers['UVMap'].data.foreach_set("uv", [n for v in new_uv for n in v]) print('Done')