home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2002 April / GSSH42002.iso / EDITOREN / DS / gmax / gmaxinst_1-1.exe / gmaxsetup11.cab / Macro_SkinTools.mcr < prev    next >
Text File  |  2002-02-13  |  11KB  |  371 lines

  1. -- Skin Operations MacroScript File
  2. --
  3. -- Created:          Aug 6 2000
  4. -- Last Updated:     Jan 2 2001 Fred Ruff
  5. --             
  6. --
  7. -- Author :   Peter Watje
  8. -- Version:  3ds max 4
  9. --
  10. -- 
  11. -- SkinOps operations Macroscript file.
  12. --***********************************************************************************************
  13. -- MODIFY THIS AT YOUR OWN RISK
  14. -- 
  15.  
  16. MacroScript AddBonesFromView
  17. ButtonText:"Add Bones"
  18. Category:"Skin Modifier" 
  19. internalCategory:"Skin Modifier" 
  20. Tooltip:"Add Bones (Skin)" 
  21. -- Needs Icon
  22. (
  23.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  24.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  25.     On Execute do
  26.         (
  27.         format "-- Click object to add as Bone\n"
  28.         skinOps.AddBoneFromViewStart  (modPanel.GetcurrentObject())
  29.         )
  30. )
  31.  
  32. MacroScript multiRemove
  33. ButtonText:"Remove Bones"
  34. Category:"Skin Modifier" 
  35. internalCategory:"Skin Modifier" 
  36. Tooltip:"Remove Multiple Bones (Skin)" 
  37. -- Needs Icon
  38. (
  39.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  40.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  41.     On Execute do
  42.         (
  43.         skinOps.MultiRemove  (modPanel.GetcurrentObject())
  44.         )
  45. )
  46.  
  47. MacroScript selectPrevious
  48. ButtonText:"Previous Bone"
  49. Category:"Skin Modifier" 
  50. internalCategory:"Skin Modifier" 
  51. Tooltip:"Select Previous Bone (Skin)" 
  52. -- Needs Icon
  53. (
  54.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  55.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  56.     On Execute do
  57.         (
  58.         skinOps.SelectPreviousBone  (modPanel.GetcurrentObject()) 
  59.         )
  60. )
  61.  
  62. MacroScript selectNext
  63. ButtonText:"Next Bone"
  64. Category:"Skin Modifier" 
  65. internalCategory:"Skin Modifier" 
  66. Tooltip:"Select Next Bone (Skin)" 
  67. -- Needs Icon
  68. (
  69.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  70.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  71.     On Execute do
  72.         (
  73.         skinOps.SelectNextBone  (modPanel.GetcurrentObject())
  74.         )
  75. )
  76.  
  77. MacroScript zoomToBone
  78. ButtonText:"Zoom To Bone"
  79. Category:"Skin Modifier" 
  80. internalCategory:"Skin Modifier" 
  81. Tooltip:"Zoom To Selected Bone (Skin)" 
  82. -- Needs Icon
  83. (
  84.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  85.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  86.     On Execute do
  87.         (
  88.         skinOps.ZoomToBone  (modPanel.GetcurrentObject()) FALSE
  89.         )
  90. )
  91.  
  92. MacroScript zoomToGizmo
  93. ButtonText:"Zoom To Gizmo"
  94. Category:"Skin Modifier" 
  95. internalCategory:"Skin Modifier" 
  96. Tooltip:"Zoom To Selected Gizmo (Skin)" 
  97. -- Needs Icon
  98. (
  99.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  100.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  101.     On Execute do
  102.         (
  103.         skinOps.ZoomToGizmo  (modPanel.GetcurrentObject()) FALSE
  104.         )
  105. )
  106.  
  107.  
  108. MacroScript selectEndPoint
  109. ButtonText:"Select End Point"
  110. Category:"Skin Modifier" 
  111. internalCategory:"Skin Modifier" 
  112. Tooltip:"Select End Point (Skin)" 
  113. -- Needs Icon
  114. (
  115.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  116.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  117.     On Execute do
  118.         (
  119.         skinOps.SelectEndPoint  (modPanel.GetcurrentObject())
  120.         )
  121. )
  122.  
  123. MacroScript selectStartPoint
  124. ButtonText:"Select Start Point"
  125. Category:"Skin Modifier" 
  126. internalCategory:"Skin Modifier" 
  127. Tooltip:"Select Start Point (Skin)" 
  128. -- Needs Icon
  129. (
  130.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  131.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  132.     On Execute do
  133.         (
  134.         skinOps.SelectStartPoint  (modPanel.GetcurrentObject())
  135.         )
  136. )
  137.  
  138. MacroScript filterVertices
  139. ButtonText:"Select Vertices"
  140. Category:"Skin Modifier" 
  141. internalCategory:"Skin Modifier" 
  142. Tooltip:"Filter Vertices (Skin)" 
  143. -- Needs Icon
  144. (
  145.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  146.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  147.     on isChecked return (
  148.                         if (classof(modPanel.GetcurrentObject())) == Skin then return  (modPanel.GetcurrentObject()).filter_vertices
  149.                         return FALSE
  150.                         )
  151.  
  152.     On Execute do
  153.         (
  154.         if  (modPanel.GetcurrentObject()).filter_vertices then
  155.              (modPanel.GetcurrentObject()).filter_vertices = FALSE
  156.         else  (modPanel.GetcurrentObject()).filter_vertices = TRUE
  157.         )
  158. )
  159.  
  160. MacroScript filterEnvelopes
  161. ButtonText:"Select Envelopes"
  162. Category:"Skin Modifier" 
  163. internalCategory:"Skin Modifier" 
  164. Tooltip:"Filter Envelopes (Skin)" 
  165. -- Needs Icon
  166. (
  167.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  168.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  169.     on isChecked return (
  170.                         if (classof(modPanel.GetcurrentObject())) == Skin then return  (modPanel.GetcurrentObject()).filter_cross_sections
  171.                         return FALSE
  172.                         )    
  173.  
  174.     On Execute do
  175.         (
  176.         if  (modPanel.GetcurrentObject()).filter_cross_sections then
  177.              (modPanel.GetcurrentObject()).filter_cross_sections  = FALSE
  178.         else  (modPanel.GetcurrentObject()).filter_cross_sections  = TRUE
  179.         )
  180. )
  181.  
  182. MacroScript filterCrossSections
  183. ButtonText:"Select Cross Sections"
  184. Category:"Skin Modifier" 
  185. internalCategory:"Skin Modifier" 
  186. Tooltip:"Filter Cross Sections (Skin)" 
  187. -- Needs Icon
  188. (
  189.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  190.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  191.     on isChecked return (
  192.                         if (classof(modPanel.GetcurrentObject())) == Skin then return  (modPanel.GetcurrentObject()).filter_envelopes
  193.                         return FALSE
  194.                         )    
  195.  
  196.     On Execute do
  197.         (
  198.         if  (modPanel.GetcurrentObject()).filter_envelopes then
  199.              (modPanel.GetcurrentObject()).filter_envelopes  = FALSE
  200.         else  (modPanel.GetcurrentObject()).filter_envelopes  = TRUE
  201.         )
  202. )
  203.  
  204. MacroScript excludeVerts
  205. ButtonText:"Exclude Verts"
  206. Category:"Skin Modifier" 
  207. internalCategory:"Skin Modifier" 
  208. Tooltip:"Exclude Verts (Skin)" 
  209. -- Needs Icon
  210. (
  211.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  212.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  213.  
  214.     On Execute do
  215.         (
  216.         skinOps.ButtonExclude  (modPanel.GetcurrentObject())
  217.         )
  218. )
  219.  
  220. MacroScript includeVerts
  221. ButtonText:"Include Verts"
  222. Category:"Skin Modifier" 
  223. internalCategory:"Skin Modifier" 
  224. Tooltip:"Include Verts (Skin)" 
  225. -- Needs Icon
  226. (
  227.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  228.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  229.  
  230.     On Execute do
  231.         (
  232.         skinOps.ButtonInclude  (modPanel.GetcurrentObject())
  233.         )
  234. )
  235.  
  236. MacroScript selectIncludeVerts
  237. ButtonText:"Select Excluded Verts"
  238. Category:"Skin Modifier" 
  239. internalCategory:"Skin Modifier" 
  240. Tooltip:"Select Excluded Verts (Skin)" 
  241. -- Needs Icon
  242. (
  243.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  244.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  245.  
  246.     On Execute do
  247.         (
  248.         skinOps.ButtonSelectExcluded  (modPanel.GetcurrentObject())
  249.         )
  250. )
  251.  
  252. -- Added August 27 2000 Fred Ruff
  253.  
  254. MacroScript CopySelectedBone
  255. ButtonText:"Copy Envelope"
  256. Category:"Skin Modifier" 
  257. internalCategory:"Skin Modifier" 
  258. Tooltip:"Copy Envelope (Skin)" 
  259. -- Needs Icon
  260. (
  261.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  262.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  263.  
  264.     On Execute do
  265.         (
  266.         skinOps.copySelectedBone (modPanel.GetcurrentObject())
  267.         )
  268. )
  269. MacroScript PasteToSelectedBone
  270. ButtonText:"Paste Envelope"
  271. Category:"Skin Modifier" 
  272. internalCategory:"Skin Modifier" 
  273. Tooltip:"Paste Envelope (Skin)" 
  274. -- Needs Icon
  275. (
  276.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  277.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  278.  
  279.     On Execute do
  280.         (
  281.         skinOps.PasteToSelectedBone (modPanel.GetcurrentObject())
  282.         )
  283. )
  284. MacroScript PasteToAllBones
  285. ButtonText:"Paste to All Envelope"
  286. Category:"Skin Modifier" 
  287. internalCategory:"Skin Modifier" 
  288. Tooltip:"Paste To All Envelopes (Skin)" 
  289. -- Needs Icon
  290. (
  291.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  292.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  293.  
  294.     On Execute do
  295.         (
  296.         skinOps.PasteToAllBones  (modPanel.GetcurrentObject())
  297.         )
  298. )
  299. MacroScript AddCrossSection
  300. ButtonText:"Add Cross Section"
  301. Category:"Skin Modifier" 
  302. internalCategory:"Skin Modifier" 
  303. Tooltip:"Add Cross Section (Skin)" 
  304. -- Needs Icon
  305. (
  306.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  307.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin) 
  308.  
  309.     On Execute do
  310.         (
  311.         skinOps.ButtonAddCrossSection  (modPanel.GetcurrentObject())
  312.         )
  313. )
  314. MacroScript RemoveCrossSection
  315. ButtonText:"Remove Cross Section"
  316. Category:"Skin Modifier" 
  317. internalCategory:"Skin Modifier" 
  318. Tooltip:"Remove Cross Section (Skin)" 
  319. -- Needs Icon
  320. (
  321.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  322.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin) 
  323.  
  324.     On Execute do
  325.         (
  326.         skinOps.ButtonRemoveCrossSection  (modPanel.GetcurrentObject())
  327.         )
  328. )
  329. MacroScript DrawEnvelopeOnTop
  330. ButtonText:"Envelope On Top"
  331. Category:"Skin Modifier" 
  332. internalCategory:"Skin Modifier" 
  333. Tooltip:"Draw Envelope On Top (Skin)" 
  334. -- Needs Icon
  335. (
  336.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  337.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  338.     on isChecked return (
  339.                         if (classof(modPanel.GetcurrentObject())) == Skin then return  (modPanel.GetcurrentObject()).envelopesAlwaysOnTop
  340.                         return FALSE
  341.                         )
  342.  
  343.     On Execute do
  344.         (
  345.         if Selection[1].modifiers[#Skin].envelopesAlwaysOnTop then
  346.             Selection[1].modifiers[#Skin].envelopesAlwaysOnTop = FALSE
  347.         else Selection[1].modifiers[#Skin].envelopesAlwaysOnTop = TRUE
  348.         )
  349. )
  350. MacroScript DrawCrossSectionsOnTop
  351. ButtonText:"CrossSections On Top"
  352. Category:"Skin Modifier" 
  353. internalCategory:"Skin Modifier" 
  354. Tooltip:"Draw CrossSections On Top (Skin)" 
  355. -- Needs Icon
  356. (
  357.     on isVisible return ( (classof(modPanel.GetcurrentObject())) == Skin)
  358.     on isEnabled return ((classof(modPanel.GetcurrentObject())) == Skin)
  359.     on isChecked return (
  360.                         if (classof(modPanel.GetcurrentObject())) == Skin then return  (modPanel.GetcurrentObject()).crossSectionsAlwaysOnTop
  361.                         return FALSE
  362.                         )
  363.  
  364.     On Execute do
  365.         (
  366.         if (modPanel.GetcurrentObject()).crossSectionsAlwaysOnTop then
  367.              (modPanel.GetcurrentObject()).crossSectionsAlwaysOnTop = FALSE
  368.         else  (modPanel.GetcurrentObject()).crossSectionsAlwaysOnTop = TRUE
  369.         )
  370. )
  371.