nik684

RandomizeUvwMap

Apr 30th, 2025
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. (
  2. fn GetUvwMap objs =
  3. (
  4. local result = #()
  5. join result (getclassinstances Uvwmap target:obj)
  6. result
  7. )
  8. mapped fn TransformUvwMap uvmod tm =
  9. (
  10. uvmod.gizmo.transform *= tm
  11. )
  12. mapped fn RandomizeUvwMap obj range =
  13. (
  14. if not isvalidnode obj do return undefined
  15. local mod_arr = getclassinstances Uvwmap target:obj
  16. local random_p3 = random (-range) range
  17. local random_tm = transmatrix random_p3
  18. TransformUvwMap mod_arr random_tm
  19. )
  20.  
  21. /* change +- range here */
  22. range = [10,10,0]
  23.  
  24. RandomizeUvwMap selection range
  25. )
Advertisement
Add Comment
Please, Sign In to add comment