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

  1. -- Macro Scripts File
  2. -- Created:  Nov 17 1998
  3. -- Modified: Jan 23 1999 8:45pm
  4. -- Author:   Frank DeLise
  5. -- Macro Scripts for Lights
  6. --***********************************************************************************************
  7. -- MODIFY THIS AT YOUR OWN RISK
  8.  
  9. macroScript Omni_Light 
  10.             category:"Lights and Cameras"
  11.             internalcategory:"Lights and Cameras"
  12.             tooltip:"Omni Light"
  13.             ButtonText:"Omni Light" 
  14.             icon:#("Lights",3)
  15. (
  16.      on execute do StartObjectCreation OmniLight 
  17.      on isChecked return mcrUtils.IsCreating OmniLight 
  18.  
  19. macroScript Target_Spotlight 
  20.             category:"Lights and Cameras"
  21.             internalcategory:"Lights and Cameras"
  22.             ButtonText:"Target Spotlight" 
  23.             tooltip:"Target Spotlight" 
  24.             icon:#("Lights",1)
  25. (
  26.      on execute do StartObjectCreation Targetspot 
  27.      on isChecked return mcrUtils.IsCreating Targetspot 
  28. )
  29.  
  30. macroScript Target_Directional_Light 
  31.             category:"Lights and Cameras"
  32.             internalcategory:"Lights and Cameras"
  33.             ButtonText:"Target Directional Light" 
  34.             tooltip:"Target Directional Light" 
  35.             icon:#("Lights",2)
  36. (
  37.      on execute do StartObjectCreation TargetDirectionalLight 
  38.      on isChecked return mcrUtils.IsCreating TargetDirectionalLight 
  39. )
  40.  
  41. macroScript Free_Spotlight 
  42.             category:"Lights and Cameras"
  43.             internalcategory:"Lights and Cameras"
  44.             ButtonText:"Free Spotlight"
  45.             tooltip:"Free Spotlight" 
  46.             icon:#("Lights",4)
  47. (
  48.      on execute do StartObjectCreation FreeSpot 
  49.      on isChecked return mcrUtils.IsCreating FreeSpot 
  50. )
  51.  
  52. macroScript Directional_Light 
  53.             category:"Lights and Cameras"
  54.             internalcategory:"Lights and Cameras"
  55.             ButtonText:"Directional Light"
  56.             tooltip:"Directional Light" 
  57.             icon:#("Lights",5)
  58. (
  59.      on execute do StartObjectCreation DirectionalLight 
  60.      on isChecked return mcrUtils.IsCreating DirectionalLight 
  61. )
  62.  
  63. MacroScript Light_On
  64.             ButtonText:"Light On"
  65.             category:"Lights and Cameras"
  66.             internalcategory:"Lights and Cameras"
  67.             Tooltip:"Light On/Off Toggle" 
  68. (
  69.     On IsVisible Return Filters.Is_Light $ and (isProperty $ #on or (isProperty $ #delegate and isProperty $.delegate #on))
  70.     on ischecked Do
  71.         Try (if isProperty $ #on then $.on else $.delegate.on) 
  72.         Catch ()
  73.     
  74.     On Execute Do
  75.         Try 
  76.         (    if isProperty $ #on then 
  77.                 $.on = not $.on 
  78.             else 
  79.                 $.delegate.on = not $.delegate.on
  80.         )
  81.         Catch ()
  82. )
  83.  
  84. MacroScript Light_Shadows
  85.             ButtonText:"Cast Shadows"
  86.             category:"Lights and Cameras"
  87.             internalcategory:"Lights and Cameras"
  88.             Tooltip:"Shadows On/Off Toggle" 
  89. (
  90.  
  91.     On IsVisible Return Filters.Is_Light $ and (isProperty $.baseObject #castShadows or (isProperty $ #delegate and isProperty $.delegate #castShadows))
  92.     on ischecked Do
  93.         Try (if isProperty $.baseObject #castShadows then $.baseObject.castShadows else $.delegate.castShadows)
  94.         Catch ()
  95.     
  96.     On Execute Do 
  97.         Try 
  98.         (    if isProperty $.baseObject #castShadows then 
  99.                 $.baseObject.castShadows = not $.baseObject.castShadows
  100.             else 
  101.                 $.delegate.castShadows = not $.delegate.castShadows
  102.         )
  103.         Catch ()
  104. )
  105.  
  106. MacroScript Light_AffectDiffuse
  107.             ButtonText:"Affect Diffuse"
  108.             category:"Lights and Cameras"
  109.             internalcategory:"Lights and Cameras"
  110.             Tooltip:"Affect Diffuse Toggle" 
  111. (
  112.  
  113.     On IsVisible Return Filters.Is_Light $ and (isProperty $ #AffectDiffuse or (isProperty $ #delegate and isProperty $.delegate #AffectDiffuse))
  114.     on ischecked Do
  115.         Try (if isProperty $ #AffectDiffuse then $.AffectDiffuse else $.delegate.AffectDiffuse)
  116.         Catch ()
  117.     
  118.     On Execute Do
  119.         Try 
  120.         (    if isProperty $ #AffectDiffuse then
  121.                 $.AffectDiffuse = not $.AffectDiffuse
  122.             else 
  123.                 $.delegate.AffectDiffuse = not $.delegate.AffectDiffuse
  124.         )    
  125.         Catch ()
  126. )
  127.  
  128. MacroScript Light_AffectSpecular
  129.             ButtonText:"Affect Specular"
  130.             category:"Lights and Cameras"
  131.             internalcategory:"Lights and Cameras"
  132.             Tooltip:"Affect Specular Toggle" 
  133. (
  134.  
  135.     On IsVisible Return Filters.Is_Light $ and (isProperty $ #AffectSpecular or (isProperty $ #delegate and isProperty $.delegate #AffectSpecular))
  136.     on ischecked Do
  137.         Try (if isProperty $ #AffectSpecular then $.AffectSpecular else $.delegate.AffectSpecular) 
  138.         Catch ()
  139.     
  140.     On Execute Do 
  141.         Try 
  142.         (    if isProperty $ #AffectSpecular then 
  143.                 $.AffectSpecular = not $.AffectSpecular
  144.             else 
  145.                 $.delegate.AffectSpecular = not $.delegate.AffectSpecular
  146.         ) 
  147.         Catch ()
  148. )
  149.  
  150. MacroScript Light_AmbientOnly
  151.             ButtonText:"Ambient Only"
  152.             category:"Lights and Cameras"
  153.             internalcategory:"Lights and Cameras"
  154.             Tooltip:"Ambient Only Toggle" 
  155. (
  156.  
  157.     On IsVisible Return Filters.Is_Light $ and (isProperty $ #AmbientOnly or (isProperty $ #delegate and isProperty $.delegate #AmbientOnly))
  158.     on ischecked Do
  159.         Try (if isProperty $ #AmbientOnly then $.AmbientOnly else $.delegate.AmbientOnly) 
  160.         Catch ()
  161.     
  162.     On Execute Do
  163.         Try 
  164.         (    if isProperty $ #AmbientOnly then 
  165.                 $.AmbientOnly = not $.AmbientOnly
  166.             else 
  167.                 $.delegate.AmbientOnly = not $.delegate.AmbientOnly
  168.         )
  169.         Catch ()
  170. )
  171.  
  172. MacroScript Light_SelectTarget
  173.             ButtonText:"Select Target"
  174.             category:"Lights and Cameras"
  175.             internalcategory:"Lights and Cameras"
  176.             Tooltip:"Select Target (Lights)" 
  177. (
  178.  
  179.     On IsVisible Return Filters.Is_Light $
  180.     On Execute Do Try(if $.target != undefined do select $.Target) Catch()
  181.  
  182. )