I'm trying to find a way to link an object axis rotation to some parameters of a shader: Basically I would like to drive a VRay shader VRayEnvImage.fhrotation ( Ranging from 0 to 360 ) to the Y rotation of an object ( Ranging from minus a lot to a lot
In Python I would do that:
Code: Select all
def degreeToRotation(value):
rotation = value
while rotation >= 360:
rotation -= 360
while rotation < 0:
rotation += 360
return rotation
print degreeToRotation(-1620)Cheers,
KS