colladaImport.ed.gui 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771
  1. //--- OBJECT WRITE BEGIN ---
  2. %guiContent = new GuiControl(ColladaImportDlg,EditorGuiGroup) {
  3. isContainer = "1";
  4. Profile = "ToolsGuiDefaultProfile";
  5. HorizSizing = "width";
  6. VertSizing = "height";
  7. position = "0 0";
  8. Extent = "1024 768";
  9. MinExtent = "8 2";
  10. canSave = "1";
  11. Visible = "1";
  12. tooltipprofile = "ToolsGuiToolTipProfile";
  13. hovertime = "1000";
  14. canSaveDynamicFields = "0";
  15. new GuiWindowCtrl() {
  16. resizeWidth = "0";
  17. resizeHeight = "0";
  18. canMove = "1";
  19. canClose = "1";
  20. canMinimize = "0";
  21. canMaximize = "0";
  22. minSize = "50 50";
  23. closeCommand = "Canvas.popDialog(ColladaImportDlg);";
  24. EdgeSnap = "1";
  25. text = "";
  26. Margin = "0 0 0 0";
  27. Padding = "0 0 0 0";
  28. AnchorTop = "1";
  29. AnchorBottom = "0";
  30. AnchorLeft = "1";
  31. AnchorRight = "0";
  32. isContainer = "1";
  33. Profile = "ToolsGuiWindowProfile";
  34. HorizSizing = "center";
  35. VertSizing = "center";
  36. position = "254 136";
  37. Extent = "516 477";
  38. MinExtent = "8 8";
  39. canSave = "1";
  40. Visible = "1";
  41. Accelerator = "escape";
  42. tooltipprofile = "ToolsGuiToolTipProfile";
  43. hovertime = "1000";
  44. internalName = "window";
  45. canSaveDynamicFields = "0";
  46. new GuiControl() {
  47. isContainer = "1";
  48. Profile = "ToolsGuiDefaultProfile";
  49. HorizSizing = "width";
  50. VertSizing = "height";
  51. position = "8 24";
  52. Extent = "238 437";
  53. MinExtent = "8 2";
  54. canSave = "1";
  55. Visible = "1";
  56. tooltipprofile = "ToolsGuiToolTipProfile";
  57. hovertime = "1000";
  58. canSaveDynamicFields = "0";
  59. new GuiScrollCtrl() {
  60. willFirstRespond = "1";
  61. hScrollBar = "dynamic";
  62. vScrollBar = "dynamic";
  63. lockHorizScroll = "0";
  64. lockVertScroll = "0";
  65. constantThumbHeight = "0";
  66. childMargin = "0 0";
  67. mouseWheelScrollSpeed = "-1";
  68. Margin = "0 0 0 0";
  69. Padding = "0 0 0 0";
  70. AnchorTop = "1";
  71. AnchorBottom = "0";
  72. AnchorLeft = "1";
  73. AnchorRight = "0";
  74. isContainer = "1";
  75. Profile = "ToolsGuiScrollProfile";
  76. HorizSizing = "right";
  77. VertSizing = "bottom";
  78. position = "0 3";
  79. Extent = "238 366";
  80. MinExtent = "8 2";
  81. canSave = "1";
  82. Visible = "1";
  83. tooltipprofile = "ToolsGuiToolTipProfile";
  84. hovertime = "1000";
  85. canSaveDynamicFields = "1";
  86. new GuiTreeViewCtrl(ColladaImportTreeView) {
  87. tabSize = "16";
  88. textOffset = "2";
  89. fullRowSelect = "0";
  90. itemHeight = "21";
  91. destroyTreeOnSleep = "0";
  92. MouseDragging = "0";
  93. MultipleSelections = "0";
  94. DeleteObjectAllowed = "0";
  95. DragToItemAllowed = "0";
  96. ClearAllOnSingleSelection = "1";
  97. showRoot = "1";
  98. internalNamesOnly = "0";
  99. objectNamesOnly = "0";
  100. useInspectorTooltips = "0";
  101. tooltipOnWidthOnly = "0";
  102. compareToObjectID = "1";
  103. canRenameObjects = "1";
  104. renameInternal = "0";
  105. isContainer = "1";
  106. Profile = "ToolsGuiTreeViewProfile";
  107. HorizSizing = "width";
  108. VertSizing = "height";
  109. position = "1 1";
  110. Extent = "74 63";
  111. MinExtent = "8 2";
  112. canSave = "1";
  113. Visible = "1";
  114. tooltipprofile = "ToolsGuiToolTipProfile";
  115. hovertime = "1000";
  116. canSaveDynamicFields = "0";
  117. };
  118. };
  119. };
  120. new GuiControl() {
  121. isContainer = "1";
  122. Profile = "ToolsGuiDefaultProfile";
  123. HorizSizing = "width";
  124. VertSizing = "height";
  125. position = "254 24";
  126. Extent = "254 437";
  127. MinExtent = "8 2";
  128. canSave = "1";
  129. Visible = "1";
  130. tooltipprofile = "ToolsGuiToolTipProfile";
  131. hovertime = "1000";
  132. canSaveDynamicFields = "0";
  133. new GuiBitmapBorderCtrl() {
  134. isContainer = "1";
  135. Profile = "ToolsGuiGroupBorderProfile";
  136. HorizSizing = "right";
  137. VertSizing = "bottom";
  138. position = "0 3";
  139. Extent = "254 60";
  140. MinExtent = "8 8";
  141. canSave = "1";
  142. Visible = "1";
  143. tooltipprofile = "ToolsGuiToolTipProfile";
  144. hovertime = "1000";
  145. canSaveDynamicFields = "0";
  146. new GuiTextCtrl() {
  147. text = "Nodes";
  148. maxLength = "1024";
  149. Margin = "0 0 0 0";
  150. Padding = "0 0 0 0";
  151. AnchorTop = "1";
  152. AnchorBottom = "0";
  153. AnchorLeft = "1";
  154. AnchorRight = "0";
  155. isContainer = "0";
  156. Profile = "ToolsGuiTextRightProfile";
  157. HorizSizing = "right";
  158. VertSizing = "bottom";
  159. position = "42 2";
  160. Extent = "32 16";
  161. MinExtent = "8 2";
  162. canSave = "1";
  163. Visible = "1";
  164. tooltipprofile = "ToolsGuiToolTipProfile";
  165. hovertime = "1000";
  166. canSaveDynamicFields = "0";
  167. };
  168. new GuiTextCtrl() {
  169. text = "";
  170. maxLength = "1024";
  171. Margin = "0 0 0 0";
  172. Padding = "0 0 0 0";
  173. AnchorTop = "1";
  174. AnchorBottom = "0";
  175. AnchorLeft = "1";
  176. AnchorRight = "0";
  177. isContainer = "0";
  178. Profile = "ToolsGuiTextProfile";
  179. HorizSizing = "right";
  180. VertSizing = "bottom";
  181. position = "90 2";
  182. Extent = "60 16";
  183. MinExtent = "8 2";
  184. canSave = "1";
  185. Visible = "1";
  186. tooltipprofile = "ToolsGuiToolTipProfile";
  187. hovertime = "1000";
  188. internalName = "nodes";
  189. canSaveDynamicFields = "0";
  190. };
  191. new GuiTextCtrl() {
  192. text = "Meshes";
  193. maxLength = "1024";
  194. Margin = "0 0 0 0";
  195. Padding = "0 0 0 0";
  196. AnchorTop = "1";
  197. AnchorBottom = "0";
  198. AnchorLeft = "1";
  199. AnchorRight = "0";
  200. isContainer = "0";
  201. Profile = "ToolsGuiTextRightProfile";
  202. HorizSizing = "right";
  203. VertSizing = "bottom";
  204. position = "36 22";
  205. Extent = "38 16";
  206. MinExtent = "8 2";
  207. canSave = "1";
  208. Visible = "1";
  209. tooltipprofile = "ToolsGuiToolTipProfile";
  210. hovertime = "1000";
  211. canSaveDynamicFields = "0";
  212. };
  213. new GuiTextCtrl() {
  214. text = "";
  215. maxLength = "1024";
  216. Margin = "0 0 0 0";
  217. Padding = "0 0 0 0";
  218. AnchorTop = "1";
  219. AnchorBottom = "0";
  220. AnchorLeft = "1";
  221. AnchorRight = "0";
  222. isContainer = "0";
  223. Profile = "ToolsGuiTextProfile";
  224. HorizSizing = "right";
  225. VertSizing = "bottom";
  226. position = "90 22";
  227. Extent = "60 16";
  228. MinExtent = "8 2";
  229. canSave = "1";
  230. Visible = "1";
  231. tooltipprofile = "ToolsGuiToolTipProfile";
  232. hovertime = "1000";
  233. internalName = "meshes";
  234. canSaveDynamicFields = "0";
  235. };
  236. new GuiTextCtrl() {
  237. text = "Polygons";
  238. maxLength = "1024";
  239. Margin = "0 0 0 0";
  240. Padding = "0 0 0 0";
  241. AnchorTop = "1";
  242. AnchorBottom = "0";
  243. AnchorLeft = "1";
  244. AnchorRight = "0";
  245. isContainer = "0";
  246. Profile = "ToolsGuiTextRightProfile";
  247. HorizSizing = "right";
  248. VertSizing = "bottom";
  249. position = "132 22";
  250. Extent = "47 16";
  251. MinExtent = "8 2";
  252. canSave = "1";
  253. Visible = "1";
  254. tooltipprofile = "ToolsGuiToolTipProfile";
  255. hovertime = "1000";
  256. canSaveDynamicFields = "0";
  257. };
  258. new GuiTextCtrl() {
  259. text = "";
  260. maxLength = "1024";
  261. Margin = "0 0 0 0";
  262. Padding = "0 0 0 0";
  263. AnchorTop = "1";
  264. AnchorBottom = "0";
  265. AnchorLeft = "1";
  266. AnchorRight = "0";
  267. isContainer = "0";
  268. Profile = "ToolsGuiTextProfile";
  269. HorizSizing = "right";
  270. VertSizing = "bottom";
  271. position = "193 22";
  272. Extent = "60 16";
  273. MinExtent = "8 2";
  274. canSave = "1";
  275. Visible = "1";
  276. tooltipprofile = "ToolsGuiToolTipProfile";
  277. hovertime = "1000";
  278. internalName = "polygons";
  279. canSaveDynamicFields = "0";
  280. };
  281. new GuiTextCtrl() {
  282. text = "Materials";
  283. maxLength = "1024";
  284. Margin = "0 0 0 0";
  285. Padding = "0 0 0 0";
  286. AnchorTop = "1";
  287. AnchorBottom = "0";
  288. AnchorLeft = "1";
  289. AnchorRight = "0";
  290. isContainer = "0";
  291. Profile = "ToolsGuiTextRightProfile";
  292. HorizSizing = "right";
  293. VertSizing = "bottom";
  294. position = "135 2";
  295. Extent = "44 16";
  296. MinExtent = "8 2";
  297. canSave = "1";
  298. Visible = "1";
  299. tooltipprofile = "ToolsGuiToolTipProfile";
  300. hovertime = "1000";
  301. canSaveDynamicFields = "0";
  302. };
  303. new GuiTextCtrl() {
  304. text = "";
  305. maxLength = "1024";
  306. Margin = "0 0 0 0";
  307. Padding = "0 0 0 0";
  308. AnchorTop = "1";
  309. AnchorBottom = "0";
  310. AnchorLeft = "1";
  311. AnchorRight = "0";
  312. isContainer = "0";
  313. Profile = "ToolsGuiTextProfile";
  314. HorizSizing = "right";
  315. VertSizing = "bottom";
  316. position = "193 2";
  317. Extent = "60 16";
  318. MinExtent = "8 2";
  319. canSave = "1";
  320. Visible = "1";
  321. tooltipprofile = "ToolsGuiToolTipProfile";
  322. hovertime = "1000";
  323. internalName = "Materials";
  324. canSaveDynamicFields = "0";
  325. };
  326. new GuiTextCtrl() {
  327. text = "Lights";
  328. maxLength = "1024";
  329. Margin = "0 0 0 0";
  330. Padding = "0 0 0 0";
  331. AnchorTop = "1";
  332. AnchorBottom = "0";
  333. AnchorLeft = "1";
  334. AnchorRight = "0";
  335. isContainer = "0";
  336. Profile = "ToolsGuiTextRightProfile";
  337. HorizSizing = "right";
  338. VertSizing = "bottom";
  339. position = "23 41";
  340. Extent = "52 16";
  341. MinExtent = "8 2";
  342. canSave = "1";
  343. Visible = "1";
  344. tooltipprofile = "ToolsGuiToolTipProfile";
  345. hovertime = "1000";
  346. canSaveDynamicFields = "0";
  347. };
  348. new GuiTextCtrl() {
  349. text = "";
  350. maxLength = "1024";
  351. Margin = "0 0 0 0";
  352. Padding = "0 0 0 0";
  353. AnchorTop = "1";
  354. AnchorBottom = "0";
  355. AnchorLeft = "1";
  356. AnchorRight = "0";
  357. isContainer = "0";
  358. Profile = "ToolsGuiTextProfile";
  359. HorizSizing = "right";
  360. VertSizing = "bottom";
  361. position = "91 41";
  362. Extent = "60 16";
  363. MinExtent = "8 2";
  364. canSave = "1";
  365. Visible = "1";
  366. tooltipprofile = "ToolsGuiToolTipProfile";
  367. hovertime = "1000";
  368. internalName = "lights";
  369. canSaveDynamicFields = "0";
  370. };
  371. new GuiTextCtrl() {
  372. text = "Animations";
  373. maxLength = "1024";
  374. Margin = "0 0 0 0";
  375. Padding = "0 0 0 0";
  376. AnchorTop = "1";
  377. AnchorBottom = "0";
  378. AnchorLeft = "1";
  379. AnchorRight = "0";
  380. isContainer = "0";
  381. Profile = "ToolsGuiTextRightProfile";
  382. HorizSizing = "right";
  383. VertSizing = "bottom";
  384. position = "127 41";
  385. Extent = "52 16";
  386. MinExtent = "8 2";
  387. canSave = "1";
  388. Visible = "1";
  389. tooltipprofile = "ToolsGuiToolTipProfile";
  390. hovertime = "1000";
  391. canSaveDynamicFields = "0";
  392. };
  393. new GuiTextCtrl() {
  394. text = "";
  395. maxLength = "1024";
  396. Margin = "0 0 0 0";
  397. Padding = "0 0 0 0";
  398. AnchorTop = "1";
  399. AnchorBottom = "0";
  400. AnchorLeft = "1";
  401. AnchorRight = "0";
  402. isContainer = "0";
  403. Profile = "ToolsGuiTextProfile";
  404. HorizSizing = "right";
  405. VertSizing = "bottom";
  406. position = "191 41";
  407. Extent = "60 16";
  408. MinExtent = "8 2";
  409. canSave = "1";
  410. Visible = "1";
  411. tooltipprofile = "ToolsGuiToolTipProfile";
  412. hovertime = "1000";
  413. internalName = "animations";
  414. canSaveDynamicFields = "0";
  415. };
  416. };
  417. new GuiBitmapBorderCtrl() {
  418. isContainer = "1";
  419. Profile = "ToolsGuiGroupBorderProfile";
  420. HorizSizing = "right";
  421. VertSizing = "bottom";
  422. position = "0 68";
  423. Extent = "254 173";
  424. MinExtent = "8 8";
  425. canSave = "1";
  426. Visible = "1";
  427. tooltipprofile = "ToolsGuiToolTipProfile";
  428. hovertime = "1000";
  429. canSaveDynamicFields = "0";
  430. new GuiTextCtrl() {
  431. text = "LOD";
  432. maxLength = "1024";
  433. Margin = "0 0 0 0";
  434. Padding = "0 0 0 0";
  435. AnchorTop = "1";
  436. AnchorBottom = "0";
  437. AnchorLeft = "1";
  438. AnchorRight = "0";
  439. isContainer = "0";
  440. Profile = "ToolsGuiTextRightProfile";
  441. HorizSizing = "right";
  442. VertSizing = "bottom";
  443. position = "59 6";
  444. Extent = "22 16";
  445. MinExtent = "8 2";
  446. canSave = "1";
  447. Visible = "1";
  448. tooltipprofile = "ToolsGuiToolTipProfile";
  449. hovertime = "1000";
  450. canSaveDynamicFields = "0";
  451. };
  452. new GuiPopUpMenuCtrl() {
  453. maxPopupHeight = "200";
  454. sbUsesNAColor = "0";
  455. reverseTextList = "0";
  456. bitmapBounds = "16 16";
  457. text = "DetectDTS";
  458. maxLength = "1024";
  459. Margin = "0 0 0 0";
  460. Padding = "0 0 0 0";
  461. AnchorTop = "1";
  462. AnchorBottom = "0";
  463. AnchorLeft = "1";
  464. AnchorRight = "0";
  465. isContainer = "0";
  466. Profile = "ToolsGuiPopUpMenuProfile";
  467. HorizSizing = "right";
  468. VertSizing = "bottom";
  469. position = "97 6";
  470. Extent = "92 18";
  471. MinExtent = "8 2";
  472. canSave = "1";
  473. Visible = "1";
  474. tooltipprofile = "ToolsGuiToolTipProfile";
  475. ToolTip = "Method used to determine LOD for meshes in the model";
  476. hovertime = "1000";
  477. internalName = "lodType";
  478. canSaveDynamicFields = "0";
  479. };
  480. new GuiTextEditCtrl() {
  481. historySize = "0";
  482. password = "0";
  483. tabComplete = "0";
  484. sinkAllKeyEvents = "0";
  485. passwordMask = "*";
  486. text = "";
  487. maxLength = "1024";
  488. Margin = "0 0 0 0";
  489. Padding = "0 0 0 0";
  490. AnchorTop = "1";
  491. AnchorBottom = "0";
  492. AnchorLeft = "1";
  493. AnchorRight = "0";
  494. isContainer = "0";
  495. Profile = "ToolsGuiTextEditProfile";
  496. HorizSizing = "right";
  497. VertSizing = "bottom";
  498. position = "196 6";
  499. Extent = "49 18";
  500. MinExtent = "8 2";
  501. canSave = "1";
  502. Visible = "1";
  503. tooltipprofile = "ToolsGuiToolTipProfile";
  504. ToolTip = "Detail size for all meshes in this model (when LOD type is SingleSize)";
  505. hovertime = "1000";
  506. internalName = "singleDetailSize";
  507. canSaveDynamicFields = "0";
  508. };
  509. new GuiTextCtrl() {
  510. text = "Materials Prefix";
  511. maxLength = "1024";
  512. Margin = "0 0 0 0";
  513. Padding = "0 0 0 0";
  514. AnchorTop = "1";
  515. AnchorBottom = "0";
  516. AnchorLeft = "1";
  517. AnchorRight = "0";
  518. isContainer = "0";
  519. Profile = "ToolsGuiTextRightProfile";
  520. HorizSizing = "right";
  521. VertSizing = "bottom";
  522. position = "11 32";
  523. Extent = "73 16";
  524. MinExtent = "8 2";
  525. canSave = "1";
  526. Visible = "1";
  527. tooltipprofile = "ToolsGuiToolTipProfile";
  528. hovertime = "1000";
  529. canSaveDynamicFields = "0";
  530. };
  531. new GuiTextEditCtrl() {
  532. historySize = "0";
  533. password = "0";
  534. tabComplete = "0";
  535. sinkAllKeyEvents = "0";
  536. passwordMask = "*";
  537. maxLength = "1024";
  538. Margin = "0 0 0 0";
  539. Padding = "0 0 0 0";
  540. AnchorTop = "1";
  541. AnchorBottom = "0";
  542. AnchorLeft = "1";
  543. AnchorRight = "0";
  544. isContainer = "0";
  545. Profile = "ToolsGuiTextEditProfile";
  546. HorizSizing = "right";
  547. VertSizing = "bottom";
  548. position = "97 32";
  549. Extent = "148 18";
  550. MinExtent = "8 2";
  551. canSave = "1";
  552. Visible = "1";
  553. AltCommand = "ColladaImportTreeView.refresh(\"materials\");";
  554. tooltipprofile = "ToolsGuiToolTipProfile";
  555. hovertime = "1000";
  556. internalName = "materialPrefix";
  557. canSaveDynamicFields = "0";
  558. };
  559. new GuiTextCtrl() {
  560. text = "Import Nodes";
  561. maxLength = "1024";
  562. Margin = "0 0 0 0";
  563. Padding = "0 0 0 0";
  564. AnchorTop = "1";
  565. AnchorBottom = "0";
  566. AnchorLeft = "1";
  567. AnchorRight = "0";
  568. isContainer = "0";
  569. Profile = "ToolsGuiTextRightProfile";
  570. HorizSizing = "right";
  571. VertSizing = "bottom";
  572. position = "13 58";
  573. Extent = "72 16";
  574. MinExtent = "8 2";
  575. canSave = "1";
  576. Visible = "1";
  577. tooltipprofile = "ToolsGuiToolTipProfile";
  578. hovertime = "1000";
  579. canSaveDynamicFields = "0";
  580. };
  581. new GuiTextEditCtrl() {
  582. historySize = "0";
  583. password = "0";
  584. tabComplete = "0";
  585. sinkAllKeyEvents = "0";
  586. passwordMask = "*";
  587. maxLength = "1024";
  588. Margin = "0 0 0 0";
  589. Padding = "0 0 0 0";
  590. AnchorTop = "1";
  591. AnchorBottom = "0";
  592. AnchorLeft = "1";
  593. AnchorRight = "0";
  594. isContainer = "0";
  595. Profile = "ToolsGuiTextEditProfile";
  596. HorizSizing = "right";
  597. VertSizing = "bottom";
  598. position = "97 58";
  599. Extent = "148 18";
  600. MinExtent = "8 2";
  601. canSave = "1";
  602. Visible = "1";
  603. AltCommand = "ColladaImportTreeView.refresh(\"nodes\");";
  604. tooltipprofile = "ToolsGuiToolTipProfile";
  605. hovertime = "1000";
  606. internalName = "alwaysImport";
  607. canSaveDynamicFields = "0";
  608. };
  609. new GuiTextCtrl() {
  610. text = "Ignore Nodes";
  611. maxLength = "1024";
  612. Margin = "0 0 0 0";
  613. Padding = "0 0 0 0";
  614. AnchorTop = "1";
  615. AnchorBottom = "0";
  616. AnchorLeft = "1";
  617. AnchorRight = "0";
  618. isContainer = "0";
  619. Profile = "ToolsGuiTextRightProfile";
  620. HorizSizing = "right";
  621. VertSizing = "bottom";
  622. position = "20 82";
  623. Extent = "65 16";
  624. MinExtent = "8 2";
  625. canSave = "1";
  626. Visible = "1";
  627. tooltipprofile = "ToolsGuiToolTipProfile";
  628. hovertime = "1000";
  629. canSaveDynamicFields = "0";
  630. };
  631. new GuiTextEditCtrl() {
  632. historySize = "0";
  633. password = "0";
  634. tabComplete = "0";
  635. sinkAllKeyEvents = "0";
  636. passwordMask = "*";
  637. maxLength = "1024";
  638. Margin = "0 0 0 0";
  639. Padding = "0 0 0 0";
  640. AnchorTop = "1";
  641. AnchorBottom = "0";
  642. AnchorLeft = "1";
  643. AnchorRight = "0";
  644. isContainer = "0";
  645. Profile = "ToolsGuiTextEditProfile";
  646. HorizSizing = "right";
  647. VertSizing = "bottom";
  648. position = "97 82";
  649. Extent = "148 18";
  650. MinExtent = "8 2";
  651. canSave = "1";
  652. Visible = "1";
  653. AltCommand = "ColladaImportTreeView.refresh(\"nodes\");";
  654. tooltipprofile = "ToolsGuiToolTipProfile";
  655. hovertime = "1000";
  656. internalName = "neverImport";
  657. canSaveDynamicFields = "0";
  658. };
  659. new GuiTextCtrl() {
  660. text = "Import Meshes";
  661. maxLength = "1024";
  662. Margin = "0 0 0 0";
  663. Padding = "0 0 0 0";
  664. AnchorTop = "1";
  665. AnchorBottom = "0";
  666. AnchorLeft = "1";
  667. AnchorRight = "0";
  668. isContainer = "0";
  669. Profile = "ToolsGuiTextRightProfile";
  670. HorizSizing = "right";
  671. VertSizing = "bottom";
  672. position = "13 106";
  673. Extent = "72 16";
  674. MinExtent = "8 2";
  675. canSave = "1";
  676. Visible = "1";
  677. tooltipprofile = "ToolsGuiToolTipProfile";
  678. hovertime = "1000";
  679. canSaveDynamicFields = "0";
  680. };
  681. new GuiTextEditCtrl() {
  682. historySize = "0";
  683. password = "0";
  684. tabComplete = "0";
  685. sinkAllKeyEvents = "0";
  686. passwordMask = "*";
  687. maxLength = "1024";
  688. Margin = "0 0 0 0";
  689. Padding = "0 0 0 0";
  690. AnchorTop = "1";
  691. AnchorBottom = "0";
  692. AnchorLeft = "1";
  693. AnchorRight = "0";
  694. isContainer = "0";
  695. Profile = "ToolsGuiTextEditProfile";
  696. HorizSizing = "right";
  697. VertSizing = "bottom";
  698. position = "97 106";
  699. Extent = "148 18";
  700. MinExtent = "8 2";
  701. canSave = "1";
  702. Visible = "1";
  703. AltCommand = "ColladaImportTreeView.refresh(\"nodes\");";
  704. tooltipprofile = "ToolsGuiToolTipProfile";
  705. hovertime = "1000";
  706. internalName = "alwaysImportMesh";
  707. canSaveDynamicFields = "0";
  708. };
  709. new GuiTextCtrl() {
  710. text = "Ignore Meshes";
  711. maxLength = "1024";
  712. Margin = "0 0 0 0";
  713. Padding = "0 0 0 0";
  714. AnchorTop = "1";
  715. AnchorBottom = "0";
  716. AnchorLeft = "1";
  717. AnchorRight = "0";
  718. isContainer = "0";
  719. Profile = "ToolsGuiTextRightProfile";
  720. HorizSizing = "right";
  721. VertSizing = "bottom";
  722. position = "13 130";
  723. Extent = "72 16";
  724. MinExtent = "8 2";
  725. canSave = "1";
  726. Visible = "1";
  727. tooltipprofile = "ToolsGuiToolTipProfile";
  728. hovertime = "1000";
  729. canSaveDynamicFields = "0";
  730. };
  731. new GuiTextEditCtrl() {
  732. historySize = "0";
  733. password = "0";
  734. tabComplete = "0";
  735. sinkAllKeyEvents = "0";
  736. passwordMask = "*";
  737. maxLength = "1024";
  738. Margin = "0 0 0 0";
  739. Padding = "0 0 0 0";
  740. AnchorTop = "1";
  741. AnchorBottom = "0";
  742. AnchorLeft = "1";
  743. AnchorRight = "0";
  744. isContainer = "0";
  745. Profile = "ToolsGuiTextEditProfile";
  746. HorizSizing = "right";
  747. VertSizing = "bottom";
  748. position = "97 130";
  749. Extent = "148 18";
  750. MinExtent = "8 2";
  751. canSave = "1";
  752. Visible = "1";
  753. AltCommand = "ColladaImportTreeView.refresh(\"nodes\");";
  754. tooltipprofile = "ToolsGuiToolTipProfile";
  755. hovertime = "1000";
  756. internalName = "neverImportMesh";
  757. canSaveDynamicFields = "0";
  758. };
  759. new GuiTextCtrl() {
  760. text = "Ignore Materials";
  761. maxLength = "1024";
  762. Margin = "0 0 0 0";
  763. Padding = "0 0 0 0";
  764. AnchorTop = "1";
  765. AnchorBottom = "0";
  766. AnchorLeft = "1";
  767. AnchorRight = "0";
  768. isContainer = "0";
  769. Profile = "ToolsGuiTextRightProfile";
  770. HorizSizing = "right";
  771. VertSizing = "bottom";
  772. position = "13 150";
  773. Extent = "72 16";
  774. MinExtent = "8 2";
  775. canSave = "1";
  776. Visible = "1";
  777. tooltipprofile = "ToolsGuiToolTipProfile";
  778. hovertime = "1000";
  779. canSaveDynamicFields = "0";
  780. };
  781. new GuiTextEditCtrl() {
  782. historySize = "0";
  783. password = "0";
  784. tabComplete = "0";
  785. sinkAllKeyEvents = "0";
  786. passwordMask = "*";
  787. maxLength = "1024";
  788. Margin = "0 0 0 0";
  789. Padding = "0 0 0 0";
  790. AnchorTop = "1";
  791. AnchorBottom = "0";
  792. AnchorLeft = "1";
  793. AnchorRight = "0";
  794. isContainer = "0";
  795. Profile = "ToolsGuiTextEditProfile";
  796. HorizSizing = "right";
  797. VertSizing = "bottom";
  798. position = "97 150";
  799. Extent = "148 18";
  800. MinExtent = "8 2";
  801. canSave = "1";
  802. Visible = "1";
  803. AltCommand = "ColladaImportTreeView.refresh(\"nodes\");";
  804. tooltipprofile = "ToolsGuiToolTipProfile";
  805. hovertime = "1000";
  806. internalName = "neverImportMat";
  807. canSaveDynamicFields = "0";
  808. };
  809. };
  810. new GuiBitmapBorderCtrl() {
  811. isContainer = "1";
  812. Profile = "ToolsGuiGroupBorderProfile";
  813. HorizSizing = "right";
  814. VertSizing = "bottom";
  815. position = "0 246";
  816. Extent = "254 105";
  817. MinExtent = "8 8";
  818. canSave = "1";
  819. Visible = "1";
  820. tooltipprofile = "ToolsGuiToolTipProfile";
  821. hovertime = "1000";
  822. canSaveDynamicFields = "0";
  823. new GuiCheckBoxCtrl() {
  824. useInactiveState = "0";
  825. text = " Override up_axis";
  826. groupNum = "-1";
  827. buttonType = "ToggleButton";
  828. useMouseEvents = "0";
  829. isContainer = "0";
  830. Profile = "ToolsGuiCheckBoxProfile";
  831. HorizSizing = "right";
  832. VertSizing = "bottom";
  833. position = "11 7";
  834. Extent = "102 13";
  835. MinExtent = "8 2";
  836. canSave = "1";
  837. Visible = "1";
  838. Command = "ColladaImportDlg.updateOverrideUpAxis($ThisControl.getValue());";
  839. tooltipprofile = "ToolsGuiToolTipProfile";
  840. ToolTip = "Overrides the <up_axis> specified in the DAE file";
  841. hovertime = "1000";
  842. internalName = "overrideUpAxis";
  843. canSaveDynamicFields = "0";
  844. };
  845. new GuiPopUpMenuCtrl() {
  846. maxPopupHeight = "200";
  847. sbUsesNAColor = "0";
  848. reverseTextList = "0";
  849. bitmapBounds = "16 16";
  850. maxLength = "1024";
  851. Margin = "0 0 0 0";
  852. Padding = "0 0 0 0";
  853. AnchorTop = "1";
  854. AnchorBottom = "0";
  855. AnchorLeft = "1";
  856. AnchorRight = "0";
  857. isContainer = "0";
  858. Profile = "ToolsGuiPopUpMenuProfile";
  859. HorizSizing = "right";
  860. VertSizing = "bottom";
  861. position = "151 6";
  862. Extent = "66 18";
  863. MinExtent = "8 2";
  864. canSave = "1";
  865. Visible = "1";
  866. tooltipprofile = "ToolsGuiToolTipProfile";
  867. hovertime = "1000";
  868. internalName = "upAxis";
  869. canSaveDynamicFields = "0";
  870. };
  871. new GuiCheckBoxCtrl() {
  872. useInactiveState = "0";
  873. text = " Override scale";
  874. groupNum = "-1";
  875. buttonType = "ToggleButton";
  876. useMouseEvents = "0";
  877. isContainer = "0";
  878. Profile = "ToolsGuiCheckBoxProfile";
  879. HorizSizing = "right";
  880. VertSizing = "bottom";
  881. position = "11 27";
  882. Extent = "92 13";
  883. MinExtent = "8 2";
  884. canSave = "1";
  885. Visible = "1";
  886. Command = "ColladaImportDlg.updateOverrideScale($ThisControl.getValue());";
  887. tooltipprofile = "ToolsGuiToolTipProfile";
  888. ToolTip = "Overrides the <unit> scale specified in the DAE file";
  889. hovertime = "1000";
  890. internalName = "overrideScale";
  891. canSaveDynamicFields = "0";
  892. };
  893. new GuiTextEditCtrl() {
  894. historySize = "0";
  895. password = "0";
  896. tabComplete = "0";
  897. sinkAllKeyEvents = "0";
  898. passwordMask = "*";
  899. text = "";
  900. maxLength = "1024";
  901. Margin = "0 0 0 0";
  902. Padding = "0 0 0 0";
  903. AnchorTop = "1";
  904. AnchorBottom = "0";
  905. AnchorLeft = "1";
  906. AnchorRight = "0";
  907. isContainer = "0";
  908. Profile = "ToolsGuiTextEditProfile";
  909. HorizSizing = "right";
  910. VertSizing = "bottom";
  911. position = "151 27";
  912. Extent = "66 18";
  913. MinExtent = "8 2";
  914. canSave = "1";
  915. Visible = "1";
  916. tooltipprofile = "ToolsGuiToolTipProfile";
  917. hovertime = "1000";
  918. internalName = "scale";
  919. canSaveDynamicFields = "0";
  920. };
  921. new GuiCheckBoxCtrl() {
  922. useInactiveState = "0";
  923. text = " Ignore bone scaling";
  924. groupNum = "-1";
  925. buttonType = "ToggleButton";
  926. useMouseEvents = "0";
  927. isContainer = "0";
  928. Profile = "ToolsGuiCheckBoxProfile";
  929. HorizSizing = "right";
  930. VertSizing = "bottom";
  931. position = "11 48";
  932. Extent = "114 13";
  933. MinExtent = "8 2";
  934. canSave = "1";
  935. Visible = "1";
  936. tooltipprofile = "ToolsGuiToolTipProfile";
  937. ToolTip = "Ignores <scale> elements within <node>s to fix issues with some models";
  938. hovertime = "1000";
  939. internalName = "ignoreNodeScale";
  940. canSaveDynamicFields = "0";
  941. };
  942. new GuiCheckBoxCtrl() {
  943. useInactiveState = "0";
  944. text = " Center model";
  945. groupNum = "-1";
  946. buttonType = "ToggleButton";
  947. useMouseEvents = "0";
  948. isContainer = "0";
  949. Profile = "ToolsGuiCheckBoxProfile";
  950. HorizSizing = "right";
  951. VertSizing = "bottom";
  952. position = "11 67";
  953. Extent = "82 13";
  954. MinExtent = "8 2";
  955. canSave = "1";
  956. Visible = "1";
  957. tooltipprofile = "ToolsGuiToolTipProfile";
  958. ToolTip = "Translates model so the origin is at the center";
  959. hovertime = "1000";
  960. internalName = "adjustCenter";
  961. canSaveDynamicFields = "0";
  962. };
  963. new GuiCheckBoxCtrl() {
  964. useInactiveState = "0";
  965. text = " Floor model";
  966. groupNum = "-1";
  967. buttonType = "ToggleButton";
  968. useMouseEvents = "0";
  969. isContainer = "0";
  970. Profile = "ToolsGuiCheckBoxProfile";
  971. HorizSizing = "right";
  972. VertSizing = "bottom";
  973. position = "151 67";
  974. Extent = "72 13";
  975. MinExtent = "8 2";
  976. canSave = "1";
  977. Visible = "1";
  978. tooltipprofile = "ToolsGuiToolTipProfile";
  979. ToolTip = "Translates model so the origin is at the bottom";
  980. hovertime = "1000";
  981. internalName = "adjustFloor";
  982. canSaveDynamicFields = "0";
  983. };
  984. new GuiCheckBoxCtrl() {
  985. useInactiveState = "0";
  986. text = " Force update materials.cs";
  987. groupNum = "-1";
  988. buttonType = "ToggleButton";
  989. useMouseEvents = "0";
  990. isContainer = "0";
  991. Profile = "ToolsGuiCheckBoxProfile";
  992. HorizSizing = "right";
  993. VertSizing = "bottom";
  994. position = "11 86";
  995. Extent = "148 13";
  996. MinExtent = "8 2";
  997. canSave = "1";
  998. Visible = "1";
  999. tooltipprofile = "ToolsGuiToolTipProfile";
  1000. ToolTip = "Forces update of materials.cs (even if Materials already exist)";
  1001. hovertime = "1000";
  1002. internalName = "forceUpdateMaterials";
  1003. canSaveDynamicFields = "0";
  1004. };
  1005. };
  1006. new GuiBitmapBorderCtrl() {
  1007. isContainer = "1";
  1008. Profile = "ToolsGuiGroupBorderProfile";
  1009. HorizSizing = "right";
  1010. VertSizing = "bottom";
  1011. position = "0 358";
  1012. Extent = "254 24";
  1013. MinExtent = "8 8";
  1014. canSave = "1";
  1015. Visible = "1";
  1016. tooltipprofile = "ToolsGuiToolTipProfile";
  1017. hovertime = "1000";
  1018. canSaveDynamicFields = "0";
  1019. new GuiCheckBoxCtrl() {
  1020. useInactiveState = "0";
  1021. text = " Add lights to scene";
  1022. groupNum = "-1";
  1023. buttonType = "ToggleButton";
  1024. useMouseEvents = "0";
  1025. isContainer = "0";
  1026. Profile = "ToolsGuiCheckBoxProfile";
  1027. HorizSizing = "right";
  1028. VertSizing = "bottom";
  1029. position = "11 5";
  1030. Extent = "148 13";
  1031. MinExtent = "8 2";
  1032. canSave = "1";
  1033. Visible = "1";
  1034. tooltipprofile = "ToolsGuiToolTipProfile";
  1035. ToolTip = "Loads the lights from the DAE file and adds them to the current scene.";
  1036. hovertime = "1000";
  1037. internalName = "loadLights";
  1038. canSaveDynamicFields = "0";
  1039. };
  1040. };
  1041. new GuiButtonCtrl() {
  1042. text = "Load from .cfg";
  1043. groupNum = "-1";
  1044. buttonType = "PushButton";
  1045. useMouseEvents = "0";
  1046. isContainer = "0";
  1047. Profile = "ToolsGuiButtonProfile";
  1048. HorizSizing = "right";
  1049. VertSizing = "bottom";
  1050. position = "11 388";
  1051. Extent = "86 22";
  1052. MinExtent = "8 2";
  1053. canSave = "1";
  1054. Visible = "1";
  1055. Command = "ColladaImportDlg.readDtsConfig();";
  1056. tooltipprofile = "ToolsGuiToolTipProfile";
  1057. hovertime = "1000";
  1058. canSaveDynamicFields = "0";
  1059. };
  1060. new GuiButtonCtrl() {
  1061. text = "Save to .cfg";
  1062. groupNum = "-1";
  1063. buttonType = "PushButton";
  1064. useMouseEvents = "0";
  1065. isContainer = "0";
  1066. Profile = "ToolsGuiButtonProfile";
  1067. HorizSizing = "right";
  1068. VertSizing = "bottom";
  1069. position = "11 415";
  1070. Extent = "86 22";
  1071. MinExtent = "8 2";
  1072. canSave = "1";
  1073. Visible = "1";
  1074. Command = "ColladaImportDlg.writeDtsConfig();";
  1075. tooltipprofile = "ToolsGuiToolTipProfile";
  1076. hovertime = "1000";
  1077. canSaveDynamicFields = "0";
  1078. };
  1079. new GuiButtonCtrl() {
  1080. text = "OK";
  1081. groupNum = "-1";
  1082. buttonType = "PushButton";
  1083. useMouseEvents = "0";
  1084. isContainer = "0";
  1085. Profile = "ToolsGuiButtonProfile";
  1086. HorizSizing = "right";
  1087. VertSizing = "bottom";
  1088. position = "159 388";
  1089. Extent = "86 22";
  1090. MinExtent = "8 2";
  1091. canSave = "1";
  1092. Visible = "1";
  1093. Command = "ColladaImportDlg.onOK();";
  1094. tooltipprofile = "ToolsGuiToolTipProfile";
  1095. ToolTip = "Load the COLLADA model";
  1096. hovertime = "1000";
  1097. canSaveDynamicFields = "0";
  1098. };
  1099. new GuiButtonCtrl() {
  1100. text = "Cancel";
  1101. groupNum = "-1";
  1102. buttonType = "PushButton";
  1103. useMouseEvents = "0";
  1104. isContainer = "0";
  1105. Profile = "ToolsGuiButtonProfile";
  1106. HorizSizing = "right";
  1107. VertSizing = "bottom";
  1108. position = "159 415";
  1109. Extent = "86 22";
  1110. MinExtent = "8 2";
  1111. canSave = "1";
  1112. Visible = "1";
  1113. Command = "ColladaImportDlg.onCancel();";
  1114. tooltipprofile = "ToolsGuiToolTipProfile";
  1115. ToolTip = "Exit without loading the COLLADA model";
  1116. hovertime = "1000";
  1117. canSaveDynamicFields = "0";
  1118. };
  1119. };
  1120. };
  1121. };
  1122. //--- OBJECT WRITE END ---
  1123. new GuiControl(ColladaImportProgress,EditorGuiGroup) {
  1124. isContainer = "1";
  1125. Profile = "ToolsGuiDefaultProfile";
  1126. HorizSizing = "width";
  1127. VertSizing = "height";
  1128. position = "0 0";
  1129. Extent = "1024 768";
  1130. MinExtent = "8 8";
  1131. canSave = "1";
  1132. Visible = "1";
  1133. tooltipprofile = "ToolsGuiToolTipProfile";
  1134. hovertime = "1000";
  1135. canSaveDynamicFields = "0";
  1136. new GuiWindowCtrl() {
  1137. internalName = "window";
  1138. resizeWidth = "0";
  1139. resizeHeight = "0";
  1140. canMove = "1";
  1141. canClose = "0";
  1142. canMinimize = "0";
  1143. canMaximize = "0";
  1144. minSize = "50 50";
  1145. EdgeSnap = "1";
  1146. text = "Importing cowboy.dae";
  1147. Margin = "0 0 0 0";
  1148. Padding = "0 0 0 0";
  1149. AnchorTop = "1";
  1150. AnchorBottom = "0";
  1151. AnchorLeft = "1";
  1152. AnchorRight = "0";
  1153. isContainer = "1";
  1154. Profile = "ToolsGuiWindowProfile";
  1155. HorizSizing = "center";
  1156. VertSizing = "center";
  1157. position = "362 338";
  1158. Extent = "300 92";
  1159. MinExtent = "48 92";
  1160. canSave = "1";
  1161. Visible = "1";
  1162. tooltipprofile = "ToolsGuiToolTipProfile";
  1163. hovertime = "1000";
  1164. canSaveDynamicFields = "0";
  1165. new GuiProgressBitmapCtrl() {
  1166. internalName = "progressBar";
  1167. maxLength = "1024";
  1168. Margin = "0 0 0 0";
  1169. Padding = "0 0 0 0";
  1170. AnchorTop = "1";
  1171. AnchorBottom = "0";
  1172. AnchorLeft = "1";
  1173. AnchorRight = "0";
  1174. isContainer = "1";
  1175. Profile = "ToolsGuiRLProgressBitmapProfile";
  1176. HorizSizing = "width";
  1177. VertSizing = "bottom";
  1178. position = "10 34";
  1179. Extent = "280 24";
  1180. MinExtent = "8 8";
  1181. canSave = "1";
  1182. Visible = "1";
  1183. tooltipprofile = "ToolsGuiToolTipProfile";
  1184. hovertime = "1000";
  1185. canSaveDynamicFields = "0";
  1186. };
  1187. new GuiTextCtrl() {
  1188. internalName = "progressText";
  1189. maxLength = "1024";
  1190. Margin = "0 0 0 0";
  1191. Padding = "0 0 0 0";
  1192. AnchorTop = "1";
  1193. AnchorBottom = "0";
  1194. AnchorLeft = "1";
  1195. AnchorRight = "0";
  1196. isContainer = "0";
  1197. Profile = "ToolsGuiTextProfile";
  1198. HorizSizing = "width";
  1199. VertSizing = "bottom";
  1200. position = "10 62";
  1201. Extent = "280 16";
  1202. MinExtent = "8 2";
  1203. canSave = "1";
  1204. Visible = "1";
  1205. tooltipprofile = "ToolsGuiToolTipProfile";
  1206. hovertime = "1000";
  1207. canSaveDynamicFields = "0";
  1208. };
  1209. };
  1210. };
  1211. function ColladaImportTreeView::onDefineIcons(%this)
  1212. {
  1213. // Set the tree view icon indices and texture paths
  1214. %this._imageNone = 0;
  1215. %this._imageNode = 1;
  1216. %this._imageMesh = 2;
  1217. %this._imageMaterial = 3;
  1218. %this._imageLight = 4;
  1219. %this._imageAnimation = 5;
  1220. %this._imageExNode = 6;
  1221. %this._imageExMaterial = 7;
  1222. %icons = ":" @ // no icon
  1223. "tools/gui/images/ColladaImport/iconNode:" @ // normal node
  1224. "tools/gui/images/ColladaImport/iconMesh:" @ // mesh
  1225. "tools/gui/images/ColladaImport/iconMaterial:" @ // new material
  1226. "tools/gui/images/ColladaImport/iconLight:" @ // light
  1227. "tools/gui/images/ColladaImport/iconAnimation:" @ // sequence
  1228. "tools/gui/images/ColladaImport/iconIgnoreNode:" @ // ignored node
  1229. "tools/gui/images/ColladaImport/iconExistingMaterial"; // existing material
  1230. %this.buildIconTable( %icons );
  1231. }
  1232. function ColladaImportDlg::showDialog(%this, %shapePath, %cmd)
  1233. {
  1234. %this.path = %shapePath;
  1235. %this.cmd = %cmd;
  1236. // Only allow loading lights if creating a new scene object
  1237. %canLoadLights = (strstr(%this.cmd, "EWCreatorWindow.create") != -1);
  1238. // Check for an existing TSShapeConstructor object. Need to exec the script
  1239. // manually as the DAE resource may not have been loaded yet
  1240. %csPath = filePath(%this.path) @ "/" @ fileBase(%this.path) @ ".cs";
  1241. if (isFile(%csPath))
  1242. exec(%csPath);
  1243. %this.constructor = ShapeEditor.findConstructor(%this.path);
  1244. // Only show the import dialog if required. Note that 'enumColladaScene' will
  1245. // fail if the COLLADA file is missing, or a cached.dts is available.
  1246. $collada::forceLoadDAE = EditorSettings.value("forceLoadDAE");
  1247. if ( (fileExt(%shapePath) $= ".dts") ||
  1248. !enumColladaForImport(%shapePath, ColladaImportTreeView) )
  1249. {
  1250. eval(%cmd);
  1251. $collada::forceLoadDAE = false;
  1252. // Load lights from the DAE if possible
  1253. if (%canLoadLights && (%this.constructor > 0) && (%this.constructor.loadLights == 1))
  1254. %this.loadLights();
  1255. return;
  1256. }
  1257. $collada::forceLoadDAE = false;
  1258. // Initialise GUI
  1259. ColladaImportTreeView.onDefineIcons();
  1260. %this-->window.text = "COLLADA Import:" SPC %this.path;
  1261. %this-->upAxis.clear();
  1262. %this-->upAxis.add("X_AXIS", 1);
  1263. %this-->upAxis.add("Y_AXIS", 2);
  1264. %this-->upAxis.add("Z_AXIS", 3);
  1265. %this-->lodType.clear();
  1266. %this-->lodType.add("DetectDTS", 1);
  1267. %this-->lodType.add("SingleSize", 2);
  1268. %this-->lodType.add("TrailingNumber", 3);
  1269. %this-->loadLights.setActive(%canLoadLights);
  1270. // Set model details
  1271. %this-->nodes.setText(ColladaImportTreeView._nodeCount);
  1272. %this-->meshes.setText(ColladaImportTreeView._meshCount);
  1273. %this-->polygons.setText(ColladaImportTreeView._polygonCount);
  1274. %this-->materials.setText(ColladaImportTreeView._materialCount);
  1275. %this-->lights.setText(ColladaImportTreeView._lightCount);
  1276. %this-->animations.setText(ColladaImportTreeView._animCount);
  1277. %this.updateOverrideUpAxis(false);
  1278. %this.updateOverrideScale(false);
  1279. if (%this.constructor > 0)
  1280. {
  1281. if (%this.constructor.upAxis !$= "DEFAULT")
  1282. {
  1283. %this-->upAxis.setText(%this.constructor.upAxis);
  1284. %this.updateOverrideUpAxis(true);
  1285. }
  1286. if (%this.constructor.unit > 0)
  1287. {
  1288. %this-->scale.setText(%this.constructor.unit);
  1289. %this.updateOverrideScale(true);
  1290. }
  1291. %this-->lodType.setText(%this.constructor.lodType);
  1292. %this-->singleDetailSize.setText(%this.constructor.singleDetailSize);
  1293. %this-->materialPrefix.setText(%this.constructor.matNamePrefix);
  1294. %this-->alwaysImport.setText(strreplace(%this.constructor.alwaysImport, "\t", ";"));
  1295. %this-->neverImport.setText(strreplace(%this.constructor.neverImport, "\t", ";"));
  1296. %this-->alwaysImportMesh.setText(strreplace(%this.constructor.alwaysImportMesh, "\t", ";"));
  1297. %this-->neverImportMesh.setText(strreplace(%this.constructor.neverImportMesh, "\t", ";"));
  1298. %this-->neverImportMat.setText(strreplace(%this.constructor.neverImportMat, "\t", ";"));
  1299. %this-->ignoreNodeScale.setStateOn(%this.constructor.ignoreNodeScale);
  1300. %this-->adjustCenter.setStateOn(%this.constructor.adjustCenter);
  1301. %this-->adjustFloor.setStateOn(%this.constructor.adjustFloor);
  1302. %this-->forceUpdateMaterials.setStateOn(%this.constructor.forceUpdateMaterials);
  1303. %this-->loadLights.setStateOn(%this.constructor.loadLights);
  1304. }
  1305. else
  1306. {
  1307. // Default settings
  1308. %this-->lodType.setText("TrailingNumber");
  1309. %this-->singleDetailSize.setText("2");
  1310. %this-->materialPrefix.setText("");
  1311. %this-->alwaysImport.setText("");
  1312. %this-->neverImport.setText($TSShapeConstructor::neverImport);
  1313. %this-->alwaysImportMesh.setText("");
  1314. %this-->neverImportMesh.setText($TSShapeConstructor::neverImportMesh);
  1315. %this-->neverImportMat.setText($TSShapeConstructor::neverImportMat);
  1316. %this-->ignoreNodeScale.setStateOn(0);
  1317. %this-->adjustCenter.setStateOn(0);
  1318. %this-->adjustFloor.setStateOn(0);
  1319. %this-->forceUpdateMaterials.setStateOn(0);
  1320. %this-->loadLights.setStateOn(0);
  1321. }
  1322. Canvas.pushDialog(%this);
  1323. ColladaImportTreeView.refresh("all");
  1324. }
  1325. function ColladaImportDlg::readDtsConfig(%this)
  1326. {
  1327. %filename = filePath( %this.path ) @ "/" @ fileBase( %this.path ) @ ".cfg";
  1328. %filename2 = filePath( %this.path ) @ "/" @ "dtsScene.cfg";
  1329. %fo = new FileObject();
  1330. if ( %fo.openForRead( %filename ) || %fo.openForRead( %filename2 ) )
  1331. {
  1332. %alwaysImport = "";
  1333. %neverImport = "";
  1334. %mode = "none";
  1335. while ( !%fo.isEOF() )
  1336. {
  1337. %line = trim( %fo.readLine() );
  1338. if ( %line $= "AlwaysExport:" ) // Start of the AlwaysExport list
  1339. %mode = "always";
  1340. else if ( %line $= "NeverExport:" ) // Start of the NeverExport list
  1341. %mode = "never";
  1342. else if ( startswith( %line, "+" ) || startswith( %line, "-" ) ) // Boolean parameters (not supported)
  1343. %mode = "none";
  1344. else if ( startswith( %line, "=" ) ) // Float and integer parameters (not supported)
  1345. %mode = "none";
  1346. else if ( !startswith( %line, "//" ) ) // Non-commented lines
  1347. {
  1348. switch$ (%mode)
  1349. {
  1350. case "always":
  1351. %alwaysImport = %alwaysImport TAB %line;
  1352. case "never":
  1353. %neverImport = %neverImport TAB %line;
  1354. }
  1355. }
  1356. }
  1357. %fo.close();
  1358. %alwaysImport = strreplace( trim( %alwaysImport ), "\t", ";" );
  1359. %neverImport = strreplace( trim( %neverImport ), "\t", ";" );
  1360. %this-->alwaysImport.setText( %alwaysImport );
  1361. %this-->neverImport.setText( %neverImport );
  1362. }
  1363. else
  1364. {
  1365. error( "Failed to open " @ %filename @ " or " @ %filename2 @ " for reading" );
  1366. }
  1367. %fo.delete();
  1368. }
  1369. function ColladaImportDlg::writeDtsConfig(%this)
  1370. {
  1371. %filename = filePath( %this.path ) @ "/" @ fileBase( %this.path ) @ ".cfg";
  1372. %fo = new FileObject();
  1373. if ( %fo.openForWrite( %filename ) )
  1374. {
  1375. // AlwaysImport
  1376. %fo.writeLine("AlwaysExport:");
  1377. %alwaysImport = trim( strreplace( %this-->alwaysImport.getText(), ";", "\t" ) );
  1378. %count = getFieldCount( %alwaysImport );
  1379. for (%i = 0; %i < %count; %i++)
  1380. %fo.writeLine( getField( %alwaysImport, %i ) );
  1381. %fo.writeLine("");
  1382. // NeverImport
  1383. %fo.writeLine("NeverExport:");
  1384. %neverImport = trim( strreplace( %this-->neverImport.getText(), ";", "\t" ) );
  1385. %count = getFieldCount( %neverImport );
  1386. for (%i = 0; %i < %count; %i++)
  1387. %fo.writeLine( getField( %neverImport, %i ) );
  1388. %fo.writeLine("");
  1389. %fo.close();
  1390. }
  1391. else
  1392. {
  1393. error( "Failed to open " @ %filename @ " for writing" );
  1394. }
  1395. %fo.delete();
  1396. }
  1397. function ColladaImportDlg::updateOverrideUpAxis(%this, %override)
  1398. {
  1399. %this-->overrideUpAxis.setStateOn(%override);
  1400. %this-->upAxis.setActive(%override);
  1401. if (!%override)
  1402. %this-->upAxis.setText(ColladaImportTreeView._upAxis);
  1403. }
  1404. function ColladaImportDlg::updateOverrideScale(%this, %override)
  1405. {
  1406. %this-->overrideScale.setStateOn(%override);
  1407. %this-->scale.setActive(%override);
  1408. if (!%override)
  1409. %this-->scale.setText(ColladaImportTreeView._unit);
  1410. }
  1411. function ColladaImportTreeView::refresh(%this, %what)
  1412. {
  1413. %shapeRoot = %this.getFirstRootItem();
  1414. %materialsRoot = %this.getNextSibling(%shapeRoot);
  1415. %animRoot = %this.getNextSibling(%materialsRoot);
  1416. // Refresh nodes
  1417. if ((%what $= "all") || (%what $= "nodes"))
  1418. {
  1419. // Indicate whether nodes will be ignored on import
  1420. %this._alwaysImport = strreplace(ColladaImportDlg-->alwaysImport.getText(), ";", "\t");
  1421. %this._neverImport = strreplace(ColladaImportDlg-->neverImport.getText(), ";", "\t");
  1422. %this._alwaysImportMesh = strreplace(ColladaImportDlg-->alwaysImportMesh.getText(), ";", "\t");
  1423. %this._neverImportMesh = strreplace(ColladaImportDlg-->neverImportMesh.getText(), ";", "\t");
  1424. %this._neverImportMat = strreplace(ColladaImportDlg-->neverImportMat.getText(), ";", "\t");
  1425. %this.refreshNode(%this.getChild(%shapeRoot));
  1426. }
  1427. // Refresh materials
  1428. if ((%what $= "all") || (%what $= "materials"))
  1429. {
  1430. %matPrefix = ColladaImportDlg-->materialPrefix.getText();
  1431. %id = %this.getChild(%materialsRoot);
  1432. while (%id > 0)
  1433. {
  1434. %baseName = %this.getItemValue(%id);
  1435. %name = %matPrefix @ %baseName;
  1436. // Indicate whether material name is already mapped
  1437. %this.editItem(%id, %name, %baseName);
  1438. %mapped = getMaterialMapping(%name);
  1439. if (%mapped $= "")
  1440. {
  1441. %this.setItemTooltip(%id, "A new material will be mapped to this name");
  1442. %this.setItemImages(%id, %this._imageMaterial, %this._imageMaterial);
  1443. }
  1444. else
  1445. {
  1446. %this.setItemTooltip(%id, %mapped SPC "is already mapped to this material name");
  1447. %this.setItemImages(%id, %this._imageExMaterial, %this._imageExMaterial);
  1448. }
  1449. %id = %this.getNextSibling(%id);
  1450. }
  1451. }
  1452. // Refresh animations
  1453. if ((%what $= "all") || (%what $= "animations"))
  1454. {
  1455. %id = %this.getChild(%animRoot);
  1456. while (%id > 0)
  1457. {
  1458. %this.setItemImages(%id, %this._imageAnim, %this._imageAnim);
  1459. %id = %this.getNextSibling(%id);
  1460. }
  1461. }
  1462. }
  1463. function ColladaImportTreeView::refreshNode(%this, %id)
  1464. {
  1465. while (%id > 0)
  1466. {
  1467. switch$ (%this.getItemValue(%id))
  1468. {
  1469. case "mesh":
  1470. // Check if this mesh will be ignored on import
  1471. if (strIsMatchMultipleExpr(%this._alwaysImportMesh, %this.getItemText(%id)) ||
  1472. !strIsMatchMultipleExpr(%this._neverImportMesh, %this.getItemText(%id)) )
  1473. {
  1474. %this.setItemTooltip(%id, "");
  1475. %this.setItemImages(%id, %this._imageMesh, %this._imageMesh);
  1476. }
  1477. else
  1478. {
  1479. %this.setItemTooltip(%id, "This mesh will be ignored on import");
  1480. %this.setItemImages(%id, %this._imageExNode, %this._imageExNode);
  1481. }
  1482. case "light":
  1483. %this.setItemImages(%id, %this._imageLight, %this._imageLight);
  1484. case "node":
  1485. // Check if this node will be ignored on import
  1486. if (strIsMatchMultipleExpr(%this._alwaysImport, %this.getItemText(%id)) ||
  1487. !strIsMatchMultipleExpr(%this._neverImport, %this.getItemText(%id)) )
  1488. {
  1489. %this.setItemTooltip(%id, "");
  1490. %this.setItemImages(%id, %this._imageNode, %this._imageNode);
  1491. }
  1492. else
  1493. {
  1494. %this.setItemTooltip(%id, "This node will be ignored on import");
  1495. %this.setItemImages(%id, %this._imageExNode, %this._imageExNode);
  1496. }
  1497. }
  1498. // recurse through children and siblings
  1499. %this.refreshNode(%this.getChild(%id));
  1500. %id = %this.getNextSibling(%id);
  1501. }
  1502. }
  1503. function ColladaImportDlg::onCancel(%this)
  1504. {
  1505. Canvas.popDialog(%this);
  1506. ColladaImportTreeView.clear();
  1507. }
  1508. function ColladaImportDlg::onOK(%this)
  1509. {
  1510. Canvas.popDialog(%this);
  1511. ColladaImportTreeView.clear();
  1512. // Need to create a TSShapeConstructor object if any settings are not
  1513. // at the default values
  1514. if ((%this-->overrideUpAxis.getValue() != 0) ||
  1515. (%this-->overrideScale.getValue() != 0) ||
  1516. (%this-->lodType.getText() !$= "DetectDTS") ||
  1517. (%this-->singleDetailSize.getText() !$= "2") ||
  1518. (%this-->materialPrefix.getText() !$= "") ||
  1519. (%this-->alwaysImport.getText() !$= "") ||
  1520. (%this-->neverImport.getText() !$= "") ||
  1521. (%this-->alwaysImportMesh.getText() !$= "") ||
  1522. (%this-->neverImportMesh.getText() !$= "") ||
  1523. (%this-->neverImportMat.getText() !$= "") ||
  1524. (%this-->ignoreNodeScale.getValue() != 0) ||
  1525. (%this-->adjustCenter.getValue() != 0) ||
  1526. (%this-->adjustFloor.getValue() != 0) ||
  1527. (%this-->forceUpdateMaterials.getValue() != 0) ||
  1528. (%this-->loadLights.getValue() != 0))
  1529. {
  1530. if (%this.constructor <= 0)
  1531. {
  1532. // Create a new TSShapeConstructor object
  1533. %this.constructor = ShapeEditor.createConstructor(%this.path);
  1534. }
  1535. }
  1536. if (%this.constructor > 0)
  1537. {
  1538. // Store values from GUI
  1539. if (%this-->overrideUpAxis.getValue())
  1540. %this.constructor.upAxis = %this-->upAxis.getText();
  1541. else
  1542. %this.constructor.upAxis = "DEFAULT";
  1543. if (%this-->overrideScale.getValue())
  1544. %this.constructor.unit = %this-->scale.getText();
  1545. else
  1546. %this.constructor.unit = -1;
  1547. %this.constructor.lodType = %this-->lodType.getText();
  1548. %this.constructor.singleDetailSize = %this-->singleDetailSize.getText();
  1549. %this.constructor.matNamePrefix = %this-->materialPrefix.getText();
  1550. %this.constructor.alwaysImport = strreplace(%this-->alwaysImport.getText(), ";", "\t");
  1551. %this.constructor.neverImport = strreplace(%this-->neverImport.getText(), ";", "\t");
  1552. %this.constructor.alwaysImportMesh = strreplace(%this-->alwaysImportMesh.getText(), ";", "\t");
  1553. %this.constructor.neverImportMesh = strreplace(%this-->neverImportMesh.getText(), ";", "\t");
  1554. %this.constructor.neverImportMat = strreplace(%this-->neverImportMat.getText(), ";", "\t");
  1555. %this.constructor.ignoreNodeScale = %this-->ignoreNodeScale.getValue();
  1556. %this.constructor.adjustCenter = %this-->adjustCenter.getValue();
  1557. %this.constructor.adjustFloor = %this-->adjustFloor.getValue();
  1558. %this.constructor.forceUpdateMaterials = %this-->forceUpdateMaterials.getValue();
  1559. %this.constructor.loadLights = %this-->loadLights.getValue();
  1560. // Save new settings to file
  1561. ShapeEditor.saveConstructor( %this.constructor );
  1562. }
  1563. // Load the shape (always from the DAE)
  1564. $collada::forceLoadDAE = true;
  1565. eval(%this.cmd);
  1566. $collada::forceLoadDAE = false;
  1567. // Optionally load the lights from the DAE as well (only if adding a new shape
  1568. // to the scene)
  1569. if (%this-->loadLights.getValue())
  1570. %this.loadLights();
  1571. }
  1572. function ColladaImportDlg::loadLights(%this)
  1573. {
  1574. // Get the ID of the last object added
  1575. %obj = getScene(0).getObject(getScene(0).getCount()-1);
  1576. // Create a new SimGroup to hold the model and lights
  1577. %group = new SimGroup();
  1578. loadColladaLights(%this.path, %group, %obj);
  1579. // Delete the SimGroup if no lights were found. Otherwise, add the model to
  1580. // the group as well.
  1581. if (%group.getCount() > 0)
  1582. {
  1583. %group.add(%obj);
  1584. %group.bringToFront(%obj);
  1585. getScene(0).add(%group);
  1586. if (EditorTree.isVisible())
  1587. {
  1588. EditorTree.removeItem(EditorTree.findItemByObjectId(%obj));
  1589. EditorTree.buildVisibleTree(true);
  1590. }
  1591. }
  1592. else
  1593. {
  1594. %group.delete();
  1595. }
  1596. }
  1597. function updateTSShapeLoadProgress(%progress, %msg)
  1598. {
  1599. // Check if the loading GUI is visible and use that instead of the
  1600. // separate import progress GUI if possible
  1601. if ( isObject(LoadingGui) && LoadingGui.isAwake() )
  1602. {
  1603. // Save/Restore load progress at the start/end of the import process
  1604. if ( %progress == 0 )
  1605. {
  1606. ColladaImportProgress.savedProgress = LoadingProgress.getValue();
  1607. ColladaImportProgress.savedText = LoadingProgressTxt.getValue();
  1608. ColladaImportProgress.msgPrefix = "Importing " @ %msg;
  1609. %msg = "Reading file into memory...";
  1610. }
  1611. else if ( %progress == 1.0 )
  1612. {
  1613. LoadingProgress.setValue( ColladaImportProgress.savedProgress );
  1614. LoadingProgressTxt.setValue( ColladaImportProgress.savedText );
  1615. }
  1616. %msg = ColladaImportProgress.msgPrefix @ ": " @ %msg;
  1617. %progressCtrl = LoadingProgress;
  1618. %textCtrl = LoadingProgressTxt;
  1619. }
  1620. else
  1621. {
  1622. // Show/Hide gui at the start/end of the import process
  1623. if ( %progress == 0 )
  1624. {
  1625. ColladaImportProgress-->window.text = "Importing" SPC %msg;
  1626. %msg = "Reading file into memory...";
  1627. Canvas.pushDialog(ColladaImportProgress);
  1628. }
  1629. else if ( %progress == 1.0 )
  1630. {
  1631. Canvas.popDialog(ColladaImportProgress);
  1632. }
  1633. %progressCtrl = ColladaImportProgress-->progressBar;
  1634. %textCtrl = ColladaImportProgress-->progressText;
  1635. }
  1636. // Update progress indicators
  1637. if (%progress == 0)
  1638. {
  1639. %progressCtrl.setValue(0.001);
  1640. %textCtrl.setText(%msg);
  1641. }
  1642. else if (%progress != 1.0)
  1643. {
  1644. %progressCtrl.setValue(%progress);
  1645. %textCtrl.setText(%msg);
  1646. }
  1647. Canvas.repaint(33);
  1648. }
  1649. // Convert all COLLADA models that match the given pattern (defaults to *) to DTS
  1650. function convertColladaModels(%pattern)
  1651. {
  1652. // Force loading the COLLADA file (to ensure cached DTS is updated)
  1653. $collada::forceLoadDAE = true;
  1654. %fullPath = findFirstFile("*.dae");
  1655. while (%fullPath !$= "")
  1656. {
  1657. // Check if this file is inside the given path
  1658. %fullPath = makeRelativePath(%fullPath, getMainDotCSDir());
  1659. if ((%pattern $= "") || strIsMatchMultipleExpr(%pattern, %fullPath))
  1660. {
  1661. // Load the model by creating a temporary TSStatic
  1662. echo("Converting " @ %fullPath @ " to DTS...");
  1663. %temp = new TSStatic() {
  1664. shapeName = %fullPath;
  1665. collisionType = "None";
  1666. };
  1667. %temp.delete();
  1668. }
  1669. %fullPath = findNextFile("*.dae");
  1670. }
  1671. $collada::forceLoadDAE = false;
  1672. }
  1673. function showImportDialog(%shapePath, %cmd)
  1674. {
  1675. %this.path = %shapePath;
  1676. %this.cmd = %cmd;
  1677. if ( fileExt(%shapePath) $= ".dts" || fileExt(%shapePath) $= ".dsq"
  1678. || fileExt(%shapePath) $= ".dae" || fileExt(%shapePath) $= ".kmz" )
  1679. {
  1680. // Regular Load
  1681. ColladaImportDlg.showDialog(%shapePath, %cmd);
  1682. } else if ( isSupportedFormat(stripChars(fileExt(%shapePath), ".")) )
  1683. {
  1684. // Assimp Load
  1685. if ( isObject(AssimpImportDlg) )
  1686. AssimpImportDlg.showDialog(%shapePath, %cmd);
  1687. }
  1688. }