Geen omschrijving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sb_lensReflections_callbacks.py 839B

123456789101112131415161718192021222324252627282930
  1. # Add following to menu.py:
  2. # import sb_lensReflections_callbacks
  3. import nuke
  4. def sb_lensReflections_callbacks():
  5. n = nuke.thisNode()
  6. k = nuke.thisKnob()
  7. if k.name() in ["selected", "xpos", "ypos"]:
  8. return
  9. if k.name() == "method":
  10. noiseKnobs = ["noise_controls_text", "random_seed", "aspect_ratio", "mix", "noise_controls"]
  11. plateKnobs = ["dirtPlate_text", "blackpoint_1", "whitepoint_1", "gamma_5", "saturation_1"]
  12. if n["method"].value() == "generated noise":
  13. for i in noiseKnobs:
  14. n.knobs()[i].setVisible(True)
  15. for i in plateKnobs:
  16. n.knobs()[i].setVisible(False)
  17. elif n["method"].value() == "dirt plate":
  18. for i in noiseKnobs:
  19. n.knobs()[i].setVisible(False)
  20. for i in plateKnobs:
  21. n.knobs()[i].setVisible(True)
  22. nuke.addKnobChanged(sb_lensReflections_callbacks, nodeClass="sb_lensReflections")