Advertisement
Lucas_3D

ScaleImagePlane function

Jun 8th, 2021
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. fn scaleImagePlane _theImagePlane _refPointA _refPointB=
  2. (
  3. _refPointA.parent = _theImagePlane
  4. _refPointB.parent = _theImagePlane
  5. local targetDistance = spnTargetDistance.value
  6. local theDistance = (distance _refPointA _refPointB)
  7. local scaleAmt = undefined
  8. if theDistance != targetDistance do
  9. (
  10. scaleAmt = targetDistance / theDistance
  11. scale _theImagePlane [scaleAmt, scaleAmt, scaleAmt]
  12. )
  13. select _theImagePlane
  14. max zoomext sel all
  15. print ("The distance is " + distance refPointA refPointB as string)
  16. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement