Posted By

martinB on 02/06/09


Tagged

plugin helper dummy


Versions (?)

Scripted Helper object plugin


 / Published in: Maxscript
 

Code originally by Larry Minton

  1. plugin Helper HelperTest_DisplayMesh
  2. name:"HelperTest"
  3. classID:#(0x47db14fe, 0x4e9b5f90)
  4. category:"Standard"
  5. extends:dummy
  6. (
  7. local lastSize, meshObj
  8.  
  9. parameters pblock rollout:params (
  10. size type:#float animatable:true ui:amount default:40.0
  11. )
  12.  
  13. rollout params "HelperTest Parameters" (
  14. Spinner amount "Size:" range:[0, 1e9, 40]
  15. )
  16.  
  17. on getDisplayMesh do (
  18. if (meshObj == undefined) do (
  19. meshObj = createInstance teapot radius:size mapCoords:false
  20. lastSize = size
  21. )
  22.  
  23. if size != lastSize do (
  24. meshObj.radius = size
  25. lastSize = size
  26. )
  27. meshObj.mesh
  28. )
  29.  
  30. tool create (
  31. on mousePoint click do (
  32. viewTM = getCPTM()
  33. nodeTM = (transMatrix worldPoint) * (inverse viewTM)
  34. #stop
  35. )
  36. )
  37. )

Report this snippet  

You need to login to post a comment.