Advertisement
Guest User

Untitled

a guest
Mar 30th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. import bpy
  2. import colorsys
  3.  
  4. rgb = bpy.data.materials["Material"].node_tree.nodes["Principled BSDF"].inputs[0].default_value
  5. hsv = colorsys.rgb_to_hsv(rgb[0], rgb[1], rgb[2])
  6. hue = hsv[0]
  7.  
  8. mid_point = 0.5
  9.  
  10. #if hue < mid_point:
  11. #    hue = hue + mid_point
  12. #    print(round(hue%1, 6))
  13. #else:
  14. #    hue = hue - mid_point
  15. #    print(round(hue%1, 6))
  16.  
  17. print(round(hue%1, 6))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement