home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Raytracing / Raytracer / LW5VT09.LHA / Toaster / Arexx_examples / PlugIns / ConfigVT3D.lwm < prev    next >
Encoding:
Text File  |  1996-06-10  |  27.2 KB  |  721 lines

  1. /* CMD: ½ConfigVT3D                                                     */
  2. /* By Brett Evan Hester      13032 Copenhill Rd. Dallas, Tx. 75240-5302 */
  3.     MacrosName = "ConfigVT3D"
  4. /* Macro Type:                                                          */
  5. /* SPECIAL     * WARNING!  * REMEMBERS                                  */
  6. /* Description:                                                         */
  7. /* -------------------------------------------------------------------- */
  8. /*      This macro allows for easier and perminent changes to certain   */
  9. /*      LightWave default settings. ":Toaster/3D/LW-Config" is the file */
  10. /*      loaded, edited, and saved. The Toaster only reads this file     */
  11. /*      when first entering LightWave's layout area. The Toaster also   */
  12. /*      saves this file when leaving LightWave's layout area. Since     */
  13. /*      the file is only read when first entering LightWave, and this   */
  14. /*      macro edits the file while inside LightWave; the file must be   */
  15. /*      protected from being overwritten with the standard settings     */
  16. /*      when leaving LightWave. To protect the file from being          */
  17. /*      overwritten the AmigaDOS PROTECT command is used. Since the     */
  18. /*      file will be protected, LightWave will notify the user of an    */
  19. /*      error when leaving LightWave. A unprotect patch is also a part  */
  20. /*      of this macro; for the next time the user enters the modeler    */
  21. /*      after completely leaving LightWave.                             */
  22. /* -------------------------------------------------------------------- */
  23.  
  24. Info1A = "!ConfigVT3D ©                  Information 1 of 2"
  25. Info1B = ""
  26. Info1C = "@This macro sets LightWave's default settings.   "
  27. Info1D = "@There are four pages of settings. This page     "
  28. Info1E = "@allows for user definable requester buttons.    "
  29. Info1F = ""
  30. Info1G = "þ BUTTONs 1 to 4 relate to those next to parent "
  31. Info1H = "¤ button on all file requesters.                "
  32. Info1I = ""
  33. Info1J = "þ NAME string is the title which appears on the "
  34. Info1K = "¤ specified button.                             "
  35. Info1L = ""
  36. Info1M = "þ PATH string is the actual device and path for "
  37. Info1N = "¤ the specified button.                         "
  38.  
  39. Info2A = "!ConfigVT3D ©                  Information 1 of 2"
  40. Info2B = ""
  41. Info2C = "@This macro sets LightWave's default settings.   "
  42. Info2D = "@There are four pages of settings. This page     "
  43. Info2E = "@allows for user definable default file pathes.  "
  44. Info2F = ""
  45. Info2G = "þ Note: not only the standard (device and path) "
  46. Info2H = "¤     format supported but that of just the name"
  47. Info2I = "¤     of specified drawer within the 3D drawer. "
  48. Info2J = "þ Example- SCENES path could be:                "
  49. Info2K = "¤                                               "
  50. Info2L = "¤          SYS:Toaster/3D/Scenes/               "
  51. Info2M = "¤                                               "
  52. Info2N = "¤          Scenes                               "
  53.  
  54. Info3A = "!ConfigVT3D ©                  Information 1 of 2"
  55. Info3B = ""
  56. Info3C = "@This macro sets LightWave's default settings.   "
  57. Info3D = "@There are four pages of settings. This page sets"
  58. Info3E = "@the --LightWave Layout Record Menu-- defaults.  "
  59. Info3F = ""
  60. Info3G = "þ All settings correlate to those of of the     "
  61. Info3H = "¤ `Record Menu' in LightWave's Layout Area.     "
  62. Info3I = ""
  63. Info3J = "þ If no default setting is wanted for:          "
  64. Info3K = "¤    RECORD SETUP 1                             "
  65. Info3L = "¤    RECORD SETUP 2                             "
  66. Info3M = "¤    RECORD COMMAND                             "
  67. Info3N = "þ Type `(NONE)' in the desired field or fields. "
  68.  
  69. Info4A = "!ConfigVT3D ©                  Information 1 of 2"
  70. Info4B = ""
  71. Info4C = "@This macro sets LightWave's default settings.   "
  72. Info4D = "@There are four pages of settings. This page sets"
  73. Info4E = "@some defaults that cannot be set anywhere else. "
  74. Info4F = ""
  75. Info4G = "þ STATUS FILE is a file saved while rendering.  "
  76. Info4H = "¤ This is for those who know or use ARexx.      "
  77. Info4I = ""
  78. Info4J = "þ DEFAULT TENSION relates to motion path tension"
  79. Info4K = "þ DEFAULT ZOOM relates to a camera's zoom factor"
  80. Info4L = "þ FRAME END BEEP for when rendering is finished "
  81. Info4M = "þ EXPERT MODE stops the showing of requesters   "
  82. Info4N = "¤ like: `This option may increase render time'  "
  83.  
  84. Info5A = "!ConfigVT3D ©                  Information 2 of 2"
  85. Info5B = "@               Plug-Ins and Go! ©               "
  86. Info5C = "                           Hester and associates"
  87. Info5D = "                           13032 Copenhill Road "
  88. Info5E = "                           Dallas, Texas 75240  "
  89. Info5F = "@Special Thanks to:                              "
  90. Info5G = "Arnie Cachelin  Henry Ribron    Mark J. Holland "
  91. Info5H = "J. Phil Kelso   Terry Wester    Steven K. Simms "
  92. Info5I = "Kevin DeRita    Greg Glaser     William S. Hawes"
  93. Info5J = "NewTek ©        Commodore ©     INOVAtronics ©  "
  94. Info5K = ""
  95. Info5L = "@This macro represents a lot of time & hard work."
  96. Info5M = "@Encourage people to create new ones and not kill"
  97. Info5N = "@that possibility by stealing those that are out."
  98.  
  99. /* -------------------------------------------------------------------- */
  100.                                      /* Start Error Detection (See End) */
  101. SIGNAL ON ERROR
  102. SIGNAL ON SYNTAX
  103.                                                    /* Address LightWave */
  104. VT3DLib = ADDLIB("LWModelerARexx.port",0)
  105. ADDRESS "LWModelerARexx.port"
  106.                                                /* Add Support Functions */
  107. SupportLib = "rexxsupport.library"
  108. IF POS(SupportLib , SHOW('L')) = 0 THEN
  109.     IF ~ADDLIB(SupportLib , 0 , -30 , 0) THEN DO
  110.         CALL Notify(1,"!Can't find "SupportLib)
  111.         IF (VT3DLib) THEN CALL REMLIB("LWModelerARexx.port")
  112.         EXIT
  113.     END
  114.  
  115. /* -------------------------------------------------------------------- */
  116.                                                        /* Startup Patch */
  117. IF (EXISTS(":Toaster/3D/LW-Config")) THEN DO
  118.     PARSE VALUE STATEF(":Toaster/3D/LW-Config") WITH TempA TempB TempC ProtectionBits .
  119.     IF ProtectionBits = "----R---" THEN DO
  120.         ReqA = "!ConfigVT3D ©                                                    NOTE / PATCH"
  121.         ReqB = ""
  122.         ReqC = "@- - - - - - - The LightWave Configuration File is protected. - - - - - - - -"
  123.         ReqD = ""
  124.         ReqE = "  If you already used this macro,        If you already used this macro,    "
  125.         ReqF = "  to change the default settings,        to change the default settings,    "
  126.         ReqG = "  and completely exited LightWave at     and have not completely exited     "
  127.         ReqH = "  least once.                            LightWave, please do so and return."
  128.         ReqI = ""
  129.         ReqJ = "@Select OK to turn off the protection | Select CANCEL to leave the protection"
  130.         ReqK = "@on the configuration file.           | on the configuration file.           "
  131.         ReqL = "@  ·                                  |                                 ·    "
  132.         IF Notify(2, ReqA, ReqB, ReqC, ReqD, ReqE, ReqF, ReqG, ReqH, ReqI, ReqJ, ReqK, ReqL) = 1 THEN DO
  133.             ADDRESS COMMAND 'PROTECT ":Toaster/3D/LW-Config" rwed'
  134.             CALL Notify(1,"!Unprotecting...","@:Toaster/3D/LW-Config","!DONE!")
  135.         END
  136.         CALL Exiting
  137.     END
  138. END
  139.  
  140. /* -------------------------------------------------------------------- */
  141.                                                         /* Startup Note */
  142. ReqA = "!ConfigVT3D ©                                      NOTE / PATCH"
  143. ReqB = ""
  144. ReqC = "@þ Note: When exiting LightWave, the current configuration file"
  145. ReqD = "@  is normally saved.  In order for this macro to work it must "
  146. ReqE = "@  write-protect the configuration file created by this macro. "
  147. ReqF = "@  A requester will appear when exiting LightWave, saying:     "
  148. ReqG = "!""Can't open configuration file"""
  149. ReqH = "@þ To remove this requester:                                   "
  150. ReqI = "@  Exit and Return to LightWave, Select ConfigVT3D again       "
  151. ReqJ = ""
  152. ReqK = "þ  This may sound akward but it works.-                        "
  153. ReqL = ""
  154. OKorCANCEL = Notify(2, ReqA, ReqB, ReqC, ReqD, ReqE, ReqF, ReqG, ReqH, ReqI, ReqJ, ReqK, ReqL)
  155. IF OKorCancel = 0 THEN CALL Exiting
  156.  
  157. /* -------------------------------------------------------------------- */
  158.                                           /* Perminent Default Settings */
  159. DfltName1 = "DH0" ; DfltPath1 = "DH0:"
  160. DfltName2 = "DH1" ; DfltPath2 = "DH1:"
  161. DfltName3 = "DF0" ; DfltPath3 = "DF0:"
  162. DfltName4 = "RAM" ; DfltPath4 = "RAM:"
  163. DfltScn = "Scenes"
  164. DfltObj = "Objects"
  165. DfltSrf = "Surfaces"
  166. DfltImg = "Images"
  167. DfltFrm = "Images"
  168. DfltMtn = "Motions"
  169. DfltEnv = "Envelopes"
  170. DfltPre = "Previews"
  171. DfltStatusFile = "(none)"
  172. DfltDfltTension = "0.000000"
  173. DfltDfltZoom = "3.200000"
  174. DfltFrmEndBeep  = "0"
  175. DfltRecS1 = "(none)"
  176. DfltRecS2 = "(none)"
  177. DfltRecCmd = "(none)"
  178. DfltRecDel = "0.000000"
  179. DfltFrmDel = "0.000000"
  180. DfltExpertMode = "0"
  181.  
  182. /* -------------------------------------------------------------------- */
  183.                                               /* Recalling Macro config */
  184. BEHName1 = "DH0" ; BEHPath1 = "DH0:"
  185. BEHName2 = "DH1" ; BEHPath2 = "DH1:"
  186. BEHName3 = "DF0" ; BEHPath3 = "DF0:"
  187. BEHName4 = "RAM" ; BEHPath4 = "RAM:"
  188. BEHScn = "Scenes"
  189. BEHObj = "Objects"
  190. BEHSrf = "Surfaces"
  191. BEHImg = "Images"
  192. BEHFrm = "Images"
  193. BEHMtn = "Motions"
  194. BEHEnv = "Envelopes"
  195. BEHPre = "Previews"
  196. BEHStatusFile = "(none)"
  197. BEHDfltTension = "0.000000"
  198. BEHDfltZoom = "3.200000"
  199. BEHFrmEndBeep  = "0"
  200. BEHRecS1 = "(none)"
  201. BEHRecS2 = "(none)"
  202. BEHRecCmd = "(none)"
  203. BEHRecDel = "0.000000"
  204. BEHFrmDel = "0.000000"
  205. BEHExpertMode = "0"
  206.  
  207. IF (EXISTS(":Toaster/3D/LW-Config")) THEN DO
  208.     IF (~OPEN(BEHConfigFile, ":Toaster/3D/LW-Config", 'R')) THEN BREAK
  209.     IF (READLN(BEHConfigFile) ~= "LWCO") THEN BREAK
  210.  
  211.     X = READLN(BEHConfigFile)
  212.  
  213.     PARSE VALUE READLN(BEHConfigFile) with X BEHName1 BEHPath1
  214.     BEHName1 = STRIP(BEHName1)
  215.     BEHPath1 = STRIP(BEHPath1)
  216.     PARSE VALUE READLN(BEHConfigFile) with X BEHName2 BEHPath2
  217.     BEHName2 = STRIP(BEHName2)
  218.     BEHPath2 = STRIP(BEHPath2)
  219.     PARSE VALUE READLN(BEHConfigFile) with X BEHName3 BEHPath3
  220.     BEHName3 = STRIP(BEHName3)
  221.     BEHPath3 = STRIP(BEHPath3)
  222.     PARSE VALUE READLN(BEHConfigFile) with X BEHName4 BEHPath4
  223.     BEHName4 = STRIP(BEHName4)
  224.     BEHPath4 = STRIP(BEHPath4)
  225.  
  226.     PARSE VALUE READLN(BEHConfigFile) with X BEHScn
  227.     BEHScn = STRIP(BEHScn)
  228.     PARSE VALUE READLN(BEHConfigFile) with X BEHObj
  229.     BEHObj = STRIP(BEHObj)
  230.     PARSE VALUE READLN(BEHConfigFile) with X BEHSrf
  231.     BEHSrf = STRIP(BEHSrf)
  232.     PARSE VALUE READLN(BEHConfigFile) with X BEHImg
  233.     BEHImg = STRIP(BEHImg)
  234.     PARSE VALUE READLN(BEHConfigFile) with X BEHFrm
  235.     BEHFrm = STRIP(BEHFrm)
  236.     PARSE VALUE READLN(BEHConfigFile) with X BEHMtn
  237.     BEHMtn = STRIP(BEHMtn)
  238.     PARSE VALUE READLN(BEHConfigFile) with X BEHEnv
  239.     BEHEnv = STRIP(BEHEnv)
  240.     PARSE VALUE READLN(BEHConfigFile) with X BEHPre
  241.     BEHPre = STRIP(BEHPre)
  242.  
  243.     PARSE VALUE READLN(BEHConfigFile) with X BEHStatusFile
  244.     BEHStatusFile = STRIP(BEHStatusFile)
  245.     PARSE VALUE READLN(BEHConfigFile) with X BEHDfltTension
  246.     BEHDfltTension = STRIP(BEHDfltTension)
  247.     PARSE VALUE READLN(BEHConfigFile) with X BEHDfltZoom
  248.     BEHDfltZoom = STRIP(BEHDfltZoom)
  249.     PARSE VALUE READLN(BEHConfigFile) with X BEHFrmEndBeep
  250.     BEHFrmEndBeep = STRIP(BEHFrmEndBeep)
  251.     PARSE VALUE READLN(BEHConfigFile) with X BEHRecS1
  252.     BEHRecS1 = STRIP(BEHRecS1)
  253.     PARSE VALUE READLN(BEHConfigFile) with X BEHRecS2
  254.     BEHRecS2 = STRIP(BEHRecS2)
  255.     PARSE VALUE READLN(BEHConfigFile) with X BEHRecCmd
  256.     BEHRecCmd = STRIP(BEHRecCmd)
  257.     PARSE VALUE READLN(BEHConfigFile) with X BEHRecDel
  258.     BEHRecDel = STRIP(BEHRecDel)
  259.     PARSE VALUE READLN(BEHConfigFile) with X BEHFrmDel
  260.     BEHFrmDel = STRIP(BEHFrmDel)
  261.     PARSE VALUE READLN(BEHConfigFile) with X BEHExpertMode
  262.     BEHExpertMode = STRIP(BEHExpertMode)
  263.  
  264.     CALL CLOSE(BEHConfigFile)
  265. END
  266.  
  267. /* -------------------------------------------------------------------- */
  268.                                               /* For Information Window */
  269. BEHInfo = 1
  270.                       /* For Coming Back to Main Menu after Info Window */
  271. DO WHILE BEHInfo > 0
  272.  
  273. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  274.  
  275.     CALL Req_Begin("File Requester Buttons          1 of 4")
  276.  
  277.     CALL Req_AddControl("",'T', "ConfigVT3D ©    By Brett Hester     ")
  278.     CALL Req_AddControl("",'T', "")
  279.     CALL Req_AddControl("",'T', "Button Number 1 ")
  280.     ReqName1 = Req_AddControl("Name",'S', '30')
  281.     ReqPath1 = Req_AddControl("Path",'S', '30')
  282.     CALL Req_AddControl("",'T', "Button Number 2")
  283.     ReqName2 = Req_AddControl("Name",'S', '30')
  284.     ReqPath2 = Req_AddControl("Path",'S', '30')
  285.     CALL Req_AddControl("",'T', "Button Number 3")
  286.     ReqName3 = Req_AddControl("Name",'S', '30')
  287.     ReqPath3 = Req_AddControl("Path",'S', '30')
  288.     CALL Req_AddControl("",'T', "Button Number 4")
  289.     ReqName4 = Req_AddControl("Name",'S', '30')
  290.     ReqPath4 = Req_AddControl("Path",'S', '30')
  291.     BEHInfo = Req_AddControl("",'CH', 'File Req. Default Information')
  292.  
  293.     CALL Req_SetVal(ReqName1, BEHName1)
  294.     CALL Req_SetVal(ReqPath1, BEHPath1)
  295.     CALL Req_SetVal(ReqName2, BEHName2)
  296.     CALL Req_SetVal(ReqPath2, BEHPath2)
  297.     CALL Req_SetVal(ReqName3, BEHName3)
  298.     CALL Req_SetVal(ReqPath3, BEHPath3)
  299.     CALL Req_SetVal(ReqName4, BEHName4)
  300.     CALL Req_SetVal(ReqPath4, BEHPath4)
  301.     CALL Req_SetVal(BEHInfo, 0)
  302.  
  303.     IF Req_Post() = 0 THEN CALL Exiting
  304.  
  305.     BEHName1 = Req_GetVal(ReqName1)
  306.     BEHPath1 = Req_GetVal(ReqPath1)
  307.     BEHName2 = Req_GetVal(ReqName2)
  308.     BEHPath2 = Req_GetVal(ReqPath2)
  309.     BEHName3 = Req_GetVal(ReqName3)
  310.     BEHPath3 = Req_GetVal(ReqPath3)
  311.     BEHName4 = Req_GetVal(ReqName4)
  312.     BEHPath4 = Req_GetVal(ReqPath4)
  313.     BEHInfo = Req_GetVal(BEHInfo)
  314.  
  315.     CALL Req_End()
  316.  
  317. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  318.                                          /* Using File Requester Format */
  319.     IF BEHInfo = 1 THEN DO
  320.         BEHPath1 = GetFileName("-- #1 "||BEHName1||" --", BEHPath1)
  321.         BEHPath2 = GetFileName("-- #1 "||BEHName2||" --", BEHPath2)
  322.         BEHPath3 = GetFileName("-- #1 "||BEHName3||" --", BEHPath3)
  323.         BEHPath4 = GetFileName("-- #1 "||BEHName4||" --", BEHPath4)
  324.     END
  325.  
  326. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  327.                                  /* Recalling standard default settings */
  328.     IF BEHInfo = 2 THEN DO
  329.         BEHName1 = DfltName1
  330.         BEHPath1 = DfltPath1
  331.         BEHName2 = DfltName2
  332.         BEHPath2 = DfltPath2
  333.         BEHName3 = DfltName3
  334.         BEHPath3 = DfltPath3
  335.         BEHName4 = DfltName4
  336.         BEHPath4 = DfltPath4
  337.     END
  338.  
  339. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  340.  
  341.     InfoOnScreen = 1
  342.     IF BEHInfo = 3 THEN CALL InformationWindows
  343.  
  344. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  345.                                                         /* Verify Input */
  346.     Error = 0 ; ReqB = "" ; ReqC = "" ; ReqD = "" ; ReqE = ""
  347.  
  348.     IF LENGTH(BEHName1) > 7 THEN DO
  349.         Error = 1 ; ReqB = '@Button Number 1 - "'||BEHName1||'" is too long.'
  350.     END
  351.     IF LENGTH(BEHName2) > 7 THEN DO
  352.         Error = 1 ; ReqC = '@Button Number 2 - "'||BEHName2||'" is too long.'
  353.     END
  354.     IF LENGTH(BEHName3) > 7 THEN DO
  355.         Error = 1 ; ReqD = '@Button Number 3 - "'||BEHName3||'" is too long.'
  356.     END
  357.     IF LENGTH(BEHName4) > 7 THEN DO
  358.         Error = 1 ; ReqE = '@Button Number 4 - "'||BEHName4||'" is too long.'
  359.     END
  360.  
  361.     IF Error ~= 0 THEN DO
  362.         ReqA = "!Sorry!,"
  363.         ReqF = "No more than seven characters is allowed for a button name."
  364.         CALL Notify(1, ReqA, ReqB, ReqC, ReqD, ReqE, ReqF)
  365.         BEHInfo = 4
  366.     END
  367.  
  368.     IF BEHPath1 = "(none)" THEN DO
  369.         BEHPath1 = GetFileName("#1 "||BEHName1||" -- PATH WAS NOT DEFINED!", DfltPath1)
  370.         BEHInfo = 4
  371.     END
  372.     IF BEHPath2 = "(none)" THEN DO
  373.         BEHPath2 = GetFileName("#2 "||BEHName2||" -- PATH WAS NOT DEFINED!", DfltPath2)
  374.         BEHInfo = 4
  375.     END
  376.     IF BEHPath3 = "(none)" THEN DO
  377.         BEHPath3 = GetFileName("#3 "||BEHName3||" -- PATH WAS NOT DEFINED!", DfltPath3)
  378.         BEHInfo = 4
  379.     END
  380.     IF BEHPath4 = "(none)" THEN DO
  381.         BEHPath4 = GetFileName("#4 "||BEHName4||" -- PATH WAS NOT DEFINED!", DfltPath4)
  382.         BEHInfo = 4
  383.     END
  384.  
  385. END
  386.  
  387. /* -------------------------------------------------------------------- */
  388.                                               /* For Information Window */
  389. BEHInfo = 1
  390.                       /* For Coming Back to Main Menu after Info Window */
  391. DO WHILE BEHInfo > 0
  392.  
  393. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  394.  
  395.     CALL Req_Begin("LightWave File Pathes           2 of 4")
  396.  
  397.     CALL Req_AddControl("",'T', "ConfigVT3D ©    By Brett Hester     ")
  398.     CALL Req_AddControl("",'T', "")
  399.     ReqScn = Req_AddControl("Scenes",'S','30')
  400.     ReqObj = Req_AddControl("Objects",'S','30')
  401.     ReqSrf = Req_AddControl("Surfaces",'S','30')
  402.     ReqImg = Req_AddControl("Images",'S','30')
  403.     ReqFrm = Req_AddControl("Framestores",'S','30')
  404.     ReqMtn = Req_AddControl("Motions",'S','30')
  405.     ReqEnv = Req_AddControl("Envelopes",'S','30')
  406.     ReqPre = Req_AddControl("Previews",'S','30')
  407.     BEHInfo = Req_AddControl("",'CH', 'File Req. Default Information')
  408.  
  409.     CALL Req_SetVal(ReqScn, BEHScn )
  410.     CALL Req_SetVal(ReqObj, BEHObj )
  411.     CALL Req_SetVal(ReqSrf, BEHSrf )
  412.     CALL Req_SetVal(ReqImg, BEHImg )
  413.     CALL Req_SetVal(ReqFrm, BEHFrm )
  414.     CALL Req_SetVal(ReqMtn, BEHMtn )
  415.     CALL Req_SetVal(ReqEnv, BEHEnv )
  416.     CALL Req_SetVal(ReqPre, BEHPre )
  417.     CALL Req_SetVal(BEHInfo, 0)
  418.  
  419.     IF Req_Post() = 0 THEN CALL Exiting
  420.  
  421.     BEHScn = Req_GetVal(ReqScn)
  422.     BEHObj = Req_GetVal(ReqObj)
  423.     BEHSrf = Req_GetVal(ReqSrf)
  424.     BEHImg = Req_GetVal(ReqImg)
  425.     BEHFrm = Req_GetVal(ReqFrm)
  426.     BEHMtn = Req_GetVal(ReqMtn)
  427.     BEHEnv = Req_GetVal(ReqEnv)
  428.     BEHPre = Req_GetVal(ReqPre)
  429.     BEHInfo = Req_GetVal(BEHInfo)
  430.  
  431.     CALL Req_End()
  432.  
  433. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  434.                                          /* Using File Requester Format */
  435.     IF BEHInfo = 1 THEN DO
  436.         BEHScn = GetFileName("-- Scenes --", BEHScn)
  437.         BEHObj = GetFileName("-- Objects --", BEHObj)
  438.         BEHSrf = GetFileName("-- Surfaces --", BEHSrf)
  439.         BEHImg = GetFileName("-- Images --", BEHImg)
  440.         BEHFrm = GetFileName("-- Framestores --", BEHFrm)
  441.         BEHMtn = GetFileName("-- Motions --", BEHMtn)
  442.         BEHEnv = GetFileName("-- Envelopes --", BEHEnv)
  443.         BEHPre = GetFileName("-- Previews --", BEHPre)
  444.     END
  445.  
  446. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  447.                                  /* Recalling standard default settings */
  448.     IF BEHInfo = 2 THEN DO
  449.         BEHScn = DfltScn
  450.         BEHObj = DfltObj
  451.         BEHSrf = DfltSrf
  452.         BEHImg = DfltImg
  453.         BEHFrm = DfltFrm
  454.         BEHMtn = DfltMtn
  455.         BEHEnv = DfltEnv
  456.         BEHPre = DfltPre
  457.     END
  458.  
  459. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  460.     InfoOnScreen = 2
  461.     IF BEHInfo = 3 THEN CALL InformationWindows
  462. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  463.                                                         /* Verify Input */
  464.     IF BEHScn = "(none)" THEN DO
  465.         BEHScn = GetFileName("Scenes -- PATH WAS NOT DEFINED!", DfltScn)
  466.         BEHInfo = 4
  467.     END
  468.     IF BEHObj = "(none)" THEN DO
  469.         BEHObj = GetFileName("Objects -- PATH WAS NOT DEFINED!", DfltObj)
  470.         BEHInfo = 4
  471.     END
  472.     IF BEHSrf = "(none)" THEN DO
  473.         BEHSrf = GetFileName("Surfaces -- PATH WAS NOT DEFINED!", DfltSrf)
  474.         BEHInfo = 4
  475.     END
  476.     IF BEHImg = "(none)" THEN DO
  477.         BEHImg = GetFileName("Images -- PATH WAS NOT DEFINED!", DfltImg)
  478.         BEHInfo = 4
  479.     END
  480.     IF BEHFrm = "(none)" THEN DO
  481.         BEHFrm = GetFileName("Framestores -- PATH WAS NOT DEFINED!", DfltFrm)
  482.         BEHInfo = 4
  483.     END
  484.     IF BEHMtn = "(none)" THEN DO
  485.         BEHMtn = GetFileName("Motions -- PATH WAS NOT DEFINED!", DfltMtn)
  486.         BEHInfo = 4
  487.     END
  488.     IF BEHEnv = "(none)" THEN DO
  489.         BEHEnv = GetFileName("Envelopes -- PATH WAS NOT DEFINED!", DfltEnv)
  490.         BEHInfo = 4
  491.     END
  492.     IF BEHPre = "(none)" THEN DO
  493.         BEHPre = GetFileName("Previews -- PATH WAS NOT DEFINED!", DfltPre)
  494.         BEHInfo = 4
  495.     END
  496.  
  497. END
  498.  
  499. /* -------------------------------------------------------------------- */
  500.                                               /* For Information Window */
  501. BEHInfo = 1
  502.                       /* For Coming Back to Main Menu after Info Window */
  503. DO WHILE BEHInfo > 0
  504.  
  505. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  506.  
  507.     CALL Req_Begin("Record Settings                 3 of 4")
  508.  
  509.     CALL Req_AddControl("",'T', "ConfigVT3D ©    By Brett Hester     ")
  510.     CALL Req_AddControl("",'T', "")
  511.     ReqRecS1 = Req_AddControl("Record Setup 1",'S','30')
  512.     ReqRecS2 = Req_AddControl("Record Setup 2",'S','30')
  513.     ReqRecCmd = Req_AddControl("Record Command",'S',''30)
  514.     ReqRecDel = Req_AddControl("Record Delay",'S','30')
  515.     ReqFrmDel = Req_AddControl("First Frame Delay",'S','30')
  516.     BEHInfo = Req_AddControl("",'CH', 'Default Information')
  517.  
  518.     CALL Req_SetVal(ReqRecS1, BEHRecS1 )
  519.     CALL Req_SetVal(ReqRecS2, BEHRecS2 )
  520.     CALL Req_SetVal(ReqRecCmd, BEHRecCmd )
  521.     CALL Req_SetVal(ReqRecDel, BEHRecDel )
  522.     CALL Req_SetVal(ReqFrmDel, BEHFrmDel )
  523.     CALL Req_SetVal(BEHInfo, 0)
  524.  
  525.     IF Req_Post() = 0 THEN CALL Exiting
  526.  
  527.     BEHRecS1 = Req_GetVal(ReqRecS1)
  528.     BEHRecS2 = Req_GetVal(ReqRecS2)
  529.     BEHRecCmd = Req_GetVal(ReqRecCmd)
  530.     BEHRecDel = Req_GetVal(ReqRecDel)
  531.     BEHFrmDel = Req_GetVal(ReqFrmDel)
  532.     BEHInfo = Req_GetVal(BEHInfo)
  533.  
  534. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  535.                                  /* Recalling standard default settings */
  536.     IF BEHInfo = 1 THEN DO
  537.         BEHRecS1 = DfltRecS1
  538.         BEHRecS2 = DfltRecS2
  539.         BEHRecCmd = DfltRecCmd
  540.         BEHRecDel = DfltRecDel
  541.         BEHFrmDel = DfltFrmDel
  542.     END
  543.  
  544.     CALL Req_End()
  545.  
  546. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  547.  
  548.     InfoOnScreen = 3
  549.     IF BEHInfo = 2 THEN CALL InformationWindows
  550.  
  551. END
  552.  
  553. /* -------------------------------------------------------------------- */
  554.                                               /* For Information Window */
  555. BEHInfo = 1
  556.                       /* For Coming Back to Main Menu after Info Window */
  557. DO WHILE BEHInfo > 0
  558.  
  559. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  560.  
  561.     CALL Req_Begin("Miscellaneous                   4 of 4")
  562.  
  563.     CALL Req_AddControl("",'T', "ConfigVT3D ©    By Brett Hester     ")
  564.     CALL Req_AddControl("",'T', "")
  565.     ReqStatusFile = Req_AddControl("Status File",'S','30')
  566.     ReqDfltTension = Req_AddControl("Default Tension",'S','30')
  567.     ReqDfltZoom = Req_AddControl("Default Zoom Factor",'S','30')
  568.     ReqFrmEndBeep = Req_AddControl("Frame End Beep",'B')
  569.     ReqExpertMode = Req_AddControl("Expert Mode",'B')
  570.     BEHInfo = Req_AddControl("",'CH','Default Information')
  571.  
  572.     CALL Req_SetVal(ReqStatusFile, BEHStatusFile)
  573.     CALL Req_SetVal(ReqDfltTension, BEHDfltTension)
  574.     CALL Req_SetVal(ReqDfltZoom, BEHDfltZoom)
  575.     CALL Req_SetVal(ReqFrmEndBeep, BEHFrmEndBeep)
  576.     CALL Req_SetVal(ReqExpertMode, BEHExpertMode)
  577.     CALL Req_SetVal(BEHInfo, 0)
  578.  
  579.     IF Req_Post() = 0 THEN CALL Exiting
  580.  
  581.     BEHStatusFile = Req_GetVal(ReqStatusFile)
  582.     BEHDfltTension = Req_GetVal(ReqDfltTension)
  583.     BEHDfltZoom = Req_GetVal(ReqDfltZoom)
  584.     BEHFrmEndBeep = Req_GetVal(ReqFrmEndBeep)
  585.     BEHExpertMode = Req_GetVal(ReqExpertMode)
  586.     BEHInfo = Req_GetVal(BEHInfo)
  587.  
  588. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  589.                                  /* Recalling standard default settings */
  590.     IF BEHInfo = 1 THEN DO
  591.         BEHStatusFile = DfltStatusFile
  592.         BEHDfltTension = DfltDfltTension
  593.         BEHDfltZoom = DfltDfltZoom
  594.         BEHFrmEndBeep = DfltFrmEndBeep
  595.         BEHExpertMode = DfltExpertMode
  596.     END
  597.  
  598.     CALL Req_End()
  599.  
  600. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  */
  601.  
  602.     InfoOnScreen = 4
  603.     IF BEHInfo = 2 THEN CALL InformationWindows
  604.  
  605. END
  606.  
  607. /* -------------------------------------------------------------------- */
  608.                                                 /* Unprotecting Config. */
  609. IF (EXISTS(":Toaster/3D/LW-Config")) THEN DO
  610.     ADDRESS COMMAND 'PROTECT ":Toaster/3D/LW-Config" rwed'
  611. END
  612.  
  613. /* -------------------------------------------------------------------- */
  614.                                               /* Recording Macro Config */
  615.  
  616. IF (OPEN(BEHConfigFile, ":Toaster/3D/LW-Config", 'W')) THEN DO
  617.     CALL WRITELN(BEHConfigFile, "LWCO")
  618.     CALL WRITELN(BEHConfigFile, "0")
  619.  
  620.     CALL WRITELN(BEHConfigFile, "FileReqPreset1" BEHName1 BEHPath1)
  621.     CALL WRITELN(BEHConfigFile, "FileReqPreset2" BEHName2 BEHPath2)
  622.     CALL WRITELN(BEHConfigFile, "FileReqPreset3" BEHName3 BEHPath3)
  623.     CALL WRITELN(BEHConfigFile, "FileReqPreset4" BEHName4 BEHPath4)
  624.  
  625.     CALL WRITELN(BEHConfigFile, "ScenesDirectory" BEHScn)
  626.     CALL WRITELN(BEHConfigFile, "ObjectsDirectory" BEHObj)
  627.     CALL WRITELN(BEHConfigFile, "SurfacesDirectory" BEHSrf)
  628.     CALL WRITELN(BEHConfigFile, "ImagesDirectory" BEHImg)
  629.     CALL WRITELN(BEHConfigFile, "FramestoresDirectory" BEHFrm)
  630.     CALL WRITELN(BEHConfigFile, "MotionsDirectory" BEHMtn)
  631.     CALL WRITELN(BEHConfigFile, "EnvelopesDirectory" BEHEnv)
  632.     CALL WRITELN(BEHConfigFile, "PreviewsDirectory" BEHPre)
  633.  
  634.     CALL WRITELN(BEHConfigFile, "StatusFilename" BEHStatusFile)
  635.     CALL WRITELN(BEHConfigFile, "DefaultTension" BEHDfltTension)
  636.     CALL WRITELN(BEHConfigFile, "DefaultZoomFactor" BEHDfltZoom)
  637.     CALL WRITELN(BEHConfigFile, "FrameEndBeep" BEHFrmEndBeep)
  638.     CALL WRITELN(BEHConfigFile, "RecordSetup1" BEHRecS1)
  639.     CALL WRITELN(BEHConfigFile, "RecordSetup2" BEHRecS2)
  640.     CALL WRITELN(BEHConfigFile, "RecordCommand" BEHRecCmd)
  641.     CALL WRITELN(BEHConfigFile, "RecordDelay" BEHRecDel)
  642.     CALL WRITELN(BEHConfigFile, "FirstFrameDelay" BEHFrmDel)
  643.     CALL WRITELN(BEHConfigFile, "ExpertMode" BEHExpertMode)
  644.  
  645.     CALL CLOSE BEHConfigFile
  646. END
  647.  
  648. /* -------------------------------------------------------------------- */
  649.                                                   /* Protecting Config. */
  650. ADDRESS COMMAND 'PROTECT ":Toaster/3D/LW-Config" r'
  651.  
  652. ReqA = "!Saving...  Protecting..."
  653. ReqB = "@:Toaster/3D/LW-Config"
  654. ReqC = "!DONE!"
  655. ReqD = ""
  656. ReqE = "@After completely leaving LightWave,"
  657. ReqF = "@please return to this macro.       "
  658.  
  659. CALL Notify(1,ReqA,ReqB,ReqC,ReqD,ReqE,ReqF)
  660.  
  661. CALL Exiting
  662.  
  663. /* -------------------------------------------------------------------- */
  664.                                                               /* Ending */
  665. Exiting:
  666.  
  667.     IF (VT3DLib) THEN CALL REMLIB("LWModelerARexx.port")
  668.     EXIT
  669.  
  670. RETURN
  671.  
  672. /* -------------------------------------------------------------------- */
  673.                                                  /* Information Windows */
  674. InformationWindows:
  675.  
  676.     IF InfoOnScreen = 1 THEN OKorCancel = Notify(2, Info1A, Info1B, Info1C, Info1D, Info1E, Info1F, Info1G, Info1H, Info1I, Info1J, Info1K, Info1L, Info1M, Info1N)
  677.     IF InfoOnScreen = 2 THEN OKorCancel = Notify(2, Info2A, Info2B, Info2C, Info2D, Info2E, Info2F, Info2G, Info2H, Info2I, Info2J, Info2K, Info2L, Info2M, Info2N)
  678.     IF InfoOnScreen = 3 THEN OKorCancel = Notify(2, Info3A, Info3B, Info3C, Info3D, Info3E, Info3F, Info3G, Info3H, Info3I, Info3J, Info3K, Info3L, Info3M, Info3N)
  679.     IF InfoOnScreen = 4 THEN OKorCancel = Notify(2, Info4A, Info4B, Info4C, Info4D, Info4E, Info4F, Info4G, Info4H, Info4I, Info4J, Info4K, Info4L, Info4M, Info4N)
  680.     IF OKorCancel = 1 THEN CALL Notify(1, Info5A, Info5B, Info5C, Info5D, Info5E, Info5F, Info5G, Info5H, Info5I, Info5J, Info5K, Info5L, Info5M, Info5N)
  681.  
  682. RETURN
  683.  
  684. /* -------------------------------------------------------------------- */
  685.                                                       /* Error Handling */
  686. SYNTAX:
  687. ERROR:
  688.  
  689.     ErrCode = RC
  690.     ErrLine = SIGL
  691.     ErrInfo = ERRORTEXT(ErrCode)
  692.  
  693.     Err1 = "!Sorry!"
  694.     Err2 = "An Error has been detected"
  695.     Err3 = "@þ Macro -            "
  696.     Err4 = "@þ Line Number -      "
  697.     Err5 = "@þ Error Code -       "
  698.     Err6 = "@þ Error Description -"
  699.     Err7 = "@¤ Please Inform -    "
  700.     Err8 = '  "Error Notice"     '
  701.     Err9 = "  13032 Copenhill Rd."
  702.     Err10 = "  Dallas, TX. 75240  "
  703.  
  704.     Call Notify(1,Err1,Err2,Err3,MacrosName,Err4,ErrLine,Err5,ErrCode,Err6,ErrInfo,Err7,Err8,Err9,Err10)
  705.  
  706. /* -------------------------------------------------------------------- */
  707.                                              /* Advanced Error Handling */
  708.     CALL SETCLIP("ErrorMacro",MacrosName)
  709.     CALL SETCLIP("ErrorLine",ErrLine)
  710.     CALL SETCLIP("ErrorCode",ErrCode)
  711.     CALL SETCLIP("ErrorDesc",ErrInfo)
  712.  
  713.     PARSE SOURCE TempA TempB ErrFile TempC TempD TempE
  714.  
  715.     CALL SETCLIP("ErrorFile",ErrFile)
  716.  
  717. /* -------------------------------------------------------------------- */
  718.  
  719.     IF (VT3DLib) THEN CALL REMLIB("LWModelerARexx.port")
  720.     EXIT
  721.