for the past few weeks I've been trying to write a python script that accesses the rotation of the custom split normals on my object. I then want it to transfer the x,y and z rotation of the custom split normals to the coordinates of separate uv maps. I've managed to access the split normals using calc_normals_split but now I'm having trouble isolating and transferring the xyz coordinates to the uv maps.Here is the python script I'm using.
import bpy
import numpy as np
context = bpy.context
ob = context.object
me = ob.data
calc split normals
me.calc_normals_split()
normal = Loop.normal
ob.data.uv_layers["xy"].data[loop.normal].uv = (normal.x, normal.y)
ob.data.uv_layers["z"].data[loop.normal].uv = (normal.z, 0)
I need to transfer the normal x,y, and z coordinates to separate uv maps because uv maps are 2 dimensional.
