From 7ddacc20f4d02c90c9f314bd51c1e42c85ed8d7a Mon Sep 17 00:00:00 2001 From: OTHGMars Date: Tue, 21 May 2019 01:19:35 -0400 Subject: [PATCH] Import Options gui Update Updated import options gui with tree view, additional shape statistics and settings load/save options. See /Engine/lib/assimp/t3d_usage.md for usage tips. --- Engine/lib/assimp/t3d_usage.md | 5 + Templates/BaseGame/game/tools/glb.sis | 29 + Templates/BaseGame/game/tools/gltf.sis | 29 + .../game/tools/gui/assimpImport.ed.cs | 540 +++++ .../game/tools/gui/assimpImport.ed.gui | 2051 +++++++++++------ .../gui/shapeEdSelectWindow.ed.gui | 4 +- .../shapeEditor/scripts/shapeEditor.ed.cs | 3 + Templates/Full/game/tools/glb.sis | 29 + Templates/Full/game/tools/gltf.sis | 29 + .../Full/game/tools/gui/assimpImport.ed.cs | 540 +++++ .../Full/game/tools/gui/assimpImport.ed.gui | 2051 +++++++++++------ .../gui/shapeEdSelectWindow.ed.gui | 4 +- .../shapeEditor/scripts/shapeEditor.ed.cs | 3 + 13 files changed, 3951 insertions(+), 1366 deletions(-) create mode 100644 Engine/lib/assimp/t3d_usage.md create mode 100644 Templates/BaseGame/game/tools/glb.sis create mode 100644 Templates/BaseGame/game/tools/gltf.sis create mode 100644 Templates/BaseGame/game/tools/gui/assimpImport.ed.cs create mode 100644 Templates/Full/game/tools/glb.sis create mode 100644 Templates/Full/game/tools/gltf.sis create mode 100644 Templates/Full/game/tools/gui/assimpImport.ed.cs diff --git a/Engine/lib/assimp/t3d_usage.md b/Engine/lib/assimp/t3d_usage.md new file mode 100644 index 000000000..666a58295 --- /dev/null +++ b/Engine/lib/assimp/t3d_usage.md @@ -0,0 +1,5 @@ +###Asset Import Library Usage Notes + +No single set of default values will be appropriate for all import formats and many do not provide any metadata to draw the information from, so Shape Import Settings (.sis) files have been added as a way to save and reuse import settings. You can create default settings for each shape file type that you will be importing by setting all of the values in the import options gui and selecting `Save Settings`. Save the file in the default settings location (game/tools, editable in EditorSettings) using the shape file extension as the file name i.e. fbx.sis, blend.sis, obj.sis. Default settings files have been provided for gltf files. + +Shapes can be re-imported via the Shape Editor by checking the `Source Art` box at the top of the inspector pane. Note: If the shape is currently loaded in the level, or is preloaded in any active datablock, the source art cannot be reloaded because the existing shape reference will not be released. \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/glb.sis b/Templates/BaseGame/game/tools/glb.sis new file mode 100644 index 000000000..b02937729 --- /dev/null +++ b/Templates/BaseGame/game/tools/glb.sis @@ -0,0 +1,29 @@ +SISV1 +lodType SingleSize +singleDetailSize 2 +materialPrefix +alwaysImport +neverImport +alwaysImportMesh +neverImportMesh +upAxis Y_AXIS +scale 1 +animTiming Milliseconds +animFPS 30 +overrideUpAxis 1 +overrideScale 0 +ignoreNodeScale 0 +adjustCenter 0 +adjustFloor 0 +forceUpdateMaterials 0 +convertLeftHanded 0 +calcTangentSpace 0 +removeRedundantMats 1 +genUVCoords 0 +transformUVCoords 0 +flipUVCoords 1 +findInstances 0 +limitBoneWeights 0 +joinIdenticalVerts 1 +reverseWindingOrder 1 +invertNormals 0 diff --git a/Templates/BaseGame/game/tools/gltf.sis b/Templates/BaseGame/game/tools/gltf.sis new file mode 100644 index 000000000..b02937729 --- /dev/null +++ b/Templates/BaseGame/game/tools/gltf.sis @@ -0,0 +1,29 @@ +SISV1 +lodType SingleSize +singleDetailSize 2 +materialPrefix +alwaysImport +neverImport +alwaysImportMesh +neverImportMesh +upAxis Y_AXIS +scale 1 +animTiming Milliseconds +animFPS 30 +overrideUpAxis 1 +overrideScale 0 +ignoreNodeScale 0 +adjustCenter 0 +adjustFloor 0 +forceUpdateMaterials 0 +convertLeftHanded 0 +calcTangentSpace 0 +removeRedundantMats 1 +genUVCoords 0 +transformUVCoords 0 +flipUVCoords 1 +findInstances 0 +limitBoneWeights 0 +joinIdenticalVerts 1 +reverseWindingOrder 1 +invertNormals 0 diff --git a/Templates/BaseGame/game/tools/gui/assimpImport.ed.cs b/Templates/BaseGame/game/tools/gui/assimpImport.ed.cs new file mode 100644 index 000000000..75c0f129e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/assimpImport.ed.cs @@ -0,0 +1,540 @@ +//------------------------------------------------------------------------------ +// Fields that will be saved to settings +$Assimp::textFields = "lodType" TAB "singleDetailSize" TAB "materialPrefix" TAB + "alwaysImport" TAB "neverImport" TAB "alwaysImportMesh" TAB "neverImportMesh" + TAB "upAxis" TAB "scale" TAB "animTiming" TAB "animFPS"; + +$Assimp::checkboxFields = "overrideUpAxis" TAB "overrideScale" TAB "ignoreNodeScale" + TAB "adjustCenter" TAB "adjustFloor" TAB "forceUpdateMaterials" TAB "convertLeftHanded" + TAB "calcTangentSpace" TAB "removeRedundantMats" TAB "genUVCoords" TAB + "transformUVCoords" TAB "flipUVCoords" TAB "findInstances" TAB "limitBoneWeights" + TAB "joinIdenticalVerts" TAB "reverseWindingOrder" TAB "invertNormals"; +//------------------------------------------------------------------------------ + +function ShapeImportTreeView::refresh(%this, %what) +{ + %shapeRoot = %this.getFirstRootItem(); + %materialsRoot = %this.getNextSibling(%shapeRoot); + %animRoot = %this.getNextSibling(%materialsRoot); + + // Refresh nodes + if ((%what $= "all") || (%what $= "nodes")) + { + // Indicate whether nodes will be ignored on import + %this._alwaysImport = strreplace(AssimpImportDlg-->alwaysImport.getText(), ";", "\t"); + %this._neverImport = strreplace(AssimpImportDlg-->neverImport.getText(), ";", "\t"); + %this._alwaysImportMesh = strreplace(AssimpImportDlg-->alwaysImportMesh.getText(), ";", "\t"); + %this._neverImportMesh = strreplace(AssimpImportDlg-->neverImportMesh.getText(), ";", "\t"); + %this.refreshNode(%this.getChild(%shapeRoot)); + } + + // Refresh materials + if ((%what $= "all") || (%what $= "materials")) + { + %matPrefix = AssimpImportDlg-->materialPrefix.getText(); + %id = %this.getChild(%materialsRoot); + while (%id > 0) + { + %baseName = %this.getItemValue(%id); + %name = %matPrefix @ %baseName; + + // Indicate whether material name is already mapped + %this.editItem(%id, %name, %baseName); + %mapped = getMaterialMapping(%name); + if (%mapped $= "") + { + %this.setItemTooltip(%id, "A new material will be mapped to this name"); + %this.setItemImages(%id, %this._imageMaterial, %this._imageMaterial); + } + else + { + %this.setItemTooltip(%id, %mapped SPC "is already mapped to this material name"); + %this.setItemImages(%id, %this._imageExMaterial, %this._imageExMaterial); + } + + %id = %this.getNextSibling(%id); + } + } + + // Refresh animations + if ((%what $= "all") || (%what $= "animations")) + { + %id = %this.getChild(%animRoot); + while (%id > 0) + { + %this.setItemImages(%id, %this._imageAnim, %this._imageAnim); + %id = %this.getNextSibling(%id); + } + } +} + +function ShapeImportTreeView::refreshNode(%this, %id) +{ + while (%id > 0) + { + switch$ (%this.getItemValue(%id)) + { + case "mesh": + // Check if this mesh will be ignored on import + if (strIsMatchMultipleExpr(%this._alwaysImportMesh, %this.getItemText(%id)) || + !strIsMatchMultipleExpr(%this._neverImportMesh, %this.getItemText(%id)) ) + { + %this.setItemTooltip(%id, ""); + %this.setItemImages(%id, %this._imageMesh, %this._imageMesh); + } + else + { + %this.setItemTooltip(%id, "This mesh will be ignored on import"); + %this.setItemImages(%id, %this._imageExNode, %this._imageExNode); + } + + case "light": + %this.setItemImages(%id, %this._imageLight, %this._imageLight); + + case "node": + // Check if this node will be ignored on import + if (strIsMatchMultipleExpr(%this._alwaysImport, %this.getItemText(%id)) || + !strIsMatchMultipleExpr(%this._neverImport, %this.getItemText(%id)) ) + { + %this.setItemTooltip(%id, ""); + %this.setItemImages(%id, %this._imageNode, %this._imageNode); + } + else + { + %this.setItemTooltip(%id, "This node will be ignored on import"); + %this.setItemImages(%id, %this._imageExNode, %this._imageExNode); + } + } + + // recurse through children and siblings + %this.refreshNode(%this.getChild(%id)); + %id = %this.getNextSibling(%id); + } +} + +function ShapeImportTreeView::onDefineIcons(%this) +{ + // Set the tree view icon indices and texture paths + %this._imageNone = 0; + %this._imageNode = 1; + %this._imageMesh = 2; + %this._imageMaterial = 3; + %this._imageLight = 4; + %this._imageAnimation = 5; + %this._imageExNode = 6; + %this._imageExMaterial = 7; + + %icons = ":" @ // no icon + "tools/gui/images/ColladaImport/iconNode:" @ // normal node + "tools/gui/images/ColladaImport/iconMesh:" @ // mesh + "tools/gui/images/ColladaImport/iconMaterial:" @ // new material + "tools/gui/images/ColladaImport/iconLight:" @ // light + "tools/gui/images/ColladaImport/iconAnimation:" @ // sequence + "tools/gui/images/ColladaImport/iconIgnoreNode:" @ // ignored node + "tools/gui/images/ColladaImport/iconExistingMaterial"; // existing material + + %this.buildIconTable( %icons ); +} + +function AssimpImportDlg::updateOverrideUpAxis(%this, %override) +{ + %this-->overrideUpAxis.setStateOn(%override); + %this-->upAxis.setActive(%override); + if (!%override) + %this-->upAxis.setText(ShapeImportTreeView._upAxis); +} + +function AssimpImportDlg::updateOverrideScale(%this, %override) +{ + %this-->overrideScale.setStateOn(%override); + %this-->scale.setActive(%override); + if (!%override) + %this-->scale.setText(ShapeImportTreeView._unit); +} + +function AssimpImportDlg::initFromConstructor(%this) +{ + if (%this.constructor.upAxis !$= "DEFAULT") + { + %this-->upAxis.setText(%this.constructor.upAxis); + %this.updateOverrideUpAxis(true); + } + else + %this.updateOverrideUpAxis(false); + + if (%this.constructor.unit > 0) + { + %this-->scale.setText(%this.constructor.unit); + %this.updateOverrideScale(true); + } + else + %this.updateOverrideScale(false); + + %this-->lodType.setText(%this.constructor.lodType); + %this-->singleDetailSize.setText(%this.constructor.singleDetailSize); + %this-->materialPrefix.setText(%this.constructor.matNamePrefix); + %this-->alwaysImport.setText(strreplace(%this.constructor.alwaysImport, "\t", ";")); + %this-->neverImport.setText(strreplace(%this.constructor.neverImport, "\t", ";")); + %this-->alwaysImportMesh.setText(strreplace(%this.constructor.alwaysImportMesh, "\t", ";")); + %this-->neverImportMesh.setText(strreplace(%this.constructor.neverImportMesh, "\t", ";")); + %this-->ignoreNodeScale.setStateOn(%this.constructor.ignoreNodeScale); + %this-->adjustCenter.setStateOn(%this.constructor.adjustCenter); + %this-->adjustFloor.setStateOn(%this.constructor.adjustFloor); + %this-->forceUpdateMaterials.setStateOn(%this.constructor.forceUpdateMaterials); + + %this-->animTiming.setText(%this.constructor.animTiming); + %this-->animFPS.setText(%this.constructor.animFPS); + + %this-->convertLeftHanded.setStateOn(%this.constructor.convertLeftHanded); + %this-->calcTangentSpace.setStateOn(%this.constructor.calcTangentSpace); + %this-->genUVCoords.setStateOn(%this.constructor.genUVCoords); + %this-->transformUVCoords.setStateOn(%this.constructor.transformUVCoords); + %this-->flipUVCoords.setStateOn(%this.constructor.flipUVCoords); + %this-->findInstances.setStateOn(%this.constructor.findInstances); + %this-->limitBoneWeights.setStateOn(%this.constructor.limitBoneWeights); + %this-->joinIdenticalVerts.setStateOn(%this.constructor.joinIdenticalVerts); + %this-->reverseWindingOrder.setStateOn(%this.constructor.reverseWindingOrder); + %this-->invertNormals.setStateOn(%this.constructor.invertNormals); + %this-->removeRedundantMats.setStateOn(%this.constructor.removeRedundantMats); +} + +function AssimpImportDlg::initFromDefaults(%this) +{ + %this.updateOverrideUpAxis(false); + %this.updateOverrideScale(false); + + %this-->lodType.setText("TrailingNumber"); + %this-->singleDetailSize.setText("2"); + %this-->materialPrefix.setText(""); + %this-->alwaysImport.setText(""); + %this-->neverImport.setText(""); + %this-->alwaysImportMesh.setText(""); + %this-->neverImportMesh.setText(""); + %this-->ignoreNodeScale.setStateOn(0); + %this-->adjustCenter.setStateOn(0); + %this-->adjustFloor.setStateOn(0); + %this-->forceUpdateMaterials.setStateOn(0); + + %this-->animTiming.setText("Seconds"); + %this-->animFPS.setText("30"); + + %this-->convertLeftHanded.setStateOn(0); + %this-->calcTangentSpace.setStateOn(0); + %this-->genUVCoords.setStateOn(0); + %this-->transformUVCoords.setStateOn(0); + %this-->flipUVCoords.setStateOn(1); + %this-->findInstances.setStateOn(0); + %this-->limitBoneWeights.setStateOn(0); + %this-->joinIdenticalVerts.setStateOn(1); + %this-->reverseWindingOrder.setStateOn(1); + %this-->invertNormals.setStateOn(0); + %this-->removeRedundantMats.setStateOn(1); +} + +function AssimpImportDlg::saveToConstructor(%this) +{ + // Store values from GUI + if (%this-->overrideUpAxis.getValue()) + %this.constructor.upAxis = %this-->upAxis.getText(); + else + %this.constructor.upAxis = "DEFAULT"; + + if (%this-->overrideScale.getValue()) + %this.constructor.unit = %this-->scale.getText(); + else + %this.constructor.unit = -1; + + %this.constructor.lodType = %this-->lodType.getText(); + %this.constructor.singleDetailSize = %this-->singleDetailSize.getText(); + %this.constructor.matNamePrefix = %this-->materialPrefix.getText(); + %this.constructor.alwaysImport = strreplace(%this-->alwaysImport.getText(), ";", "\t"); + %this.constructor.neverImport = strreplace(%this-->neverImport.getText(), ";", "\t"); + %this.constructor.alwaysImportMesh = strreplace(%this-->alwaysImportMesh.getText(), ";", "\t"); + %this.constructor.neverImportMesh = strreplace(%this-->neverImportMesh.getText(), ";", "\t"); + %this.constructor.ignoreNodeScale = %this-->ignoreNodeScale.getValue(); + %this.constructor.adjustCenter = %this-->adjustCenter.getValue(); + %this.constructor.adjustFloor = %this-->adjustFloor.getValue(); + %this.constructor.forceUpdateMaterials = %this-->forceUpdateMaterials.getValue(); + + %this.constructor.animTiming = %this-->animTiming.getText(); + %this.constructor.animFPS = %this-->animFPS.getText(); + + %this.constructor.convertLeftHanded = %this-->convertLeftHanded.getValue(); + %this.constructor.calcTangentSpace = %this-->calcTangentSpace.getValue(); + %this.constructor.genUVCoords = %this-->genUVCoords.getValue(); + %this.constructor.transformUVCoords = %this-->transformUVCoords.getValue(); + %this.constructor.flipUVCoords = %this-->flipUVCoords.getValue(); + %this.constructor.findInstances = %this-->findInstances.getValue(); + %this.constructor.limitBoneWeights = %this-->limitBoneWeights.getValue(); + %this.constructor.joinIdenticalVerts = %this-->joinIdenticalVerts.getValue(); + %this.constructor.reverseWindingOrder = %this-->reverseWindingOrder.getValue(); + %this.constructor.invertNormals = %this-->invertNormals.getValue(); + %this.constructor.removeRedundantMats = %this-->removeRedundantMats.getValue(); +} + +function AssimpImportDlg::showDialog(%this, %shapePath, %cmd) +{ + %this.settingVersion = 1.0; + %this.path = %shapePath; + %this.cmd = %cmd; + + // Check for an existing TSShapeConstructor object. Need to exec the script + // manually as the resource may not have been loaded yet + %csPath = filePath(%this.path) @ "/" @ fileBase(%this.path) @ ".cs"; + if (isFile(%csPath)) + exec(%csPath); + + %this.constructor = ShapeEditor.findConstructor(%this.path); + + // Only show the import dialog if required. Note that 'GetShapeInfo' will + // fail if the source file is missing, or a cached.dts is available. + $assimp::forceLoad = EditorSettings.value("forceLoadDAE"); + if (!GetShapeInfo(%shapePath, "ShapeImportTreeView")) + { + eval(%cmd); + $assimp::forceLoad = false; + return; + } + $assimp::forceLoad = false; + + // Initialise GUI + ShapeImportTreeView.onDefineIcons(); + + // Window Title + %this-->window.text = "Shape Import:" SPC %this.path; + + // Fill Popups + %this-->upAxis.clear(); + %this-->upAxis.add("X_AXIS", 1); + %this-->upAxis.add("Y_AXIS", 2); + %this-->upAxis.add("Z_AXIS", 3); + + %this-->lodType.clear(); + %this-->lodType.add("DetectDTS", 1); + %this-->lodType.add("SingleSize", 2); + %this-->lodType.add("TrailingNumber", 3); + + %this-->animTiming.clear(); + %this-->animTiming.add("Frames", 0); + %this-->animTiming.add("Seconds", 1); + %this-->animTiming.add("Milliseconds", 1000); + + // Set model details + %this-->nodes.setText(ShapeImportTreeView._nodeCount); + %this-->meshes.setText(ShapeImportTreeView._meshCount); + %this-->lights.setText(ShapeImportTreeView._lightCount); + %this-->materials.setText(ShapeImportTreeView._materialCount); + %this-->polygons.setText(ShapeImportTreeView._polygonCount); + %this-->animations.setText(ShapeImportTreeView._animCount); + %this-->textures.setText(ShapeImportTreeView._textureCount); + %this-->vertices.setText(ShapeImportTreeView._vertCount); + %metaText = (ShapeImportTreeView._metaTagCount == 0) ? "No Records" : ShapeImportTreeView._metaTagCount; + %this-->metadata.setText(%metaText); + + if (%this.constructor > 0) + %this.initFromConstructor(); + else + { + %this.initFromDefaults(); + + // If there's a default settings file for the file type, load it + %defaultSISPath = EditorSettings.value("defaultSettingsPath", "Tools"); + %settingsFile = %defaultSISPath @ "/" @ getSubStr(fileExt(%shapePath),1) @ ".sis"; + if (isFile(%settingsFile)) + %this.loadSettingsFrom(%settingsFile); + } + + Canvas.pushDialog(%this); + + ShapeImportTreeView.refresh("all"); +} + +function AssimpImportDlg::onLoadSettings(%this) +{ + %defaultSISPath = EditorSettings.value("defaultSettingsPath", "Tools"); + %dlg = new OpenFileDialog() + { + Filters = "Shape Import Settings (*.sis)|*.sis|"; + DefaultPath = %defaultSISPath; + DefaultFile = ""; + ChangePath = false; + MustExist = true; + }; + + %ret = %dlg.Execute(); + if ( %ret ) + %fileName = %dlg.FileName; + + %dlg.delete(); + if ( !%ret ) + return; + + %this.loadSettingsFrom(%fileName); +} + +function AssimpImportDlg::onSaveSettings(%this) +{ + %defaultSISPath = EditorSettings.value("defaultSettingsPath", "Tools"); + %dlg = new SaveFileDialog() + { + Filters = "Shape Import Settings (*.sis)|*.sis|"; + DefaultPath = %defaultSISPath; + DefaultFile = ""; + ChangePath = false; + MustExist = true; + }; + + %ret = %dlg.Execute(); + if ( %ret ) + { + %saveFile = %dlg.FileName; + if(fileExt( %saveFile ) !$= ".sis") + %saveFile = %saveFile @ ".sis"; + } + + %dlg.delete(); + + if (!%ret) + return; + + %this.saveSettingsTo(%saveFile); +} + +function AssimpImportDlg::onCancel(%this) +{ + Canvas.popDialog(%this); + ShapeImportTreeView.clear(); +} + +function AssimpImportDlg::onOK(%this) +{ + Canvas.popDialog(%this); + ShapeImportTreeView.clear(); + + if (%this.needsSave()) + { + if (!isObject(%this.constructor)) + { // Create a new TSShapeConstructor object + %this.constructor = ShapeEditor.createConstructor(%this.path); + } + } + + if (%this.constructor > 0) + { + %this.saveToConstructor(); + // Save new settings to file + ShapeEditor.saveConstructor(%this.constructor); + } + + // Load the shape (always from the DAE) + $assimp::forceLoad = true; + eval(%this.cmd); + $assimp::forceLoad = false; +} + +function AssimpImportDlg::needsSave(%this) +{ + if ((%this-->overrideUpAxis.getValue() != 0) || + (%this-->overrideScale.getValue() != 0) || + (%this-->lodType.getText() !$= "DetectDTS") || + (%this-->singleDetailSize.getText() !$= "2") || + (%this-->materialPrefix.getText() !$= "") || + (%this-->alwaysImport.getText() !$= "") || + (%this-->neverImport.getText() !$= "") || + (%this-->alwaysImportMesh.getText() !$= "") || + (%this-->neverImportMesh.getText() !$= "") || + (%this-->ignoreNodeScale.getValue() != 0) || + (%this-->adjustCenter.getValue() != 0) || + (%this-->adjustFloor.getValue() != 0) || + (%this-->forceUpdateMaterials.getValue() != 0)) + return true; + + if ((%this-->animTiming.getText() !$= "Seconds") || + (%this-->animFPS.getText() !$= "30") || + (%this-->convertLeftHanded.getValue() != 0) || + (%this-->calcTangentSpace.getValue() != 0) || + (%this-->genUVCoords.getValue() != 0) || + (%this-->transformUVCoords.getValue() != 0) || + (%this-->flipUVCoords.getValue() != 1) || + (%this-->findInstances.getValue() != 0) || + (%this-->limitBoneWeights.getValue() != 0) || + (%this-->joinIdenticalVerts.getValue() != 1) || + (%this-->reverseWindingOrder.getValue() != 1) || + (%this-->invertNormals.getValue() != 0) || + (%this-->removeRedundantMats.getValue() != 1)) + return true; + + return false; +} + +function AssimpImportDlg::loadSettingsFrom(%this, %filename) +{ + %fileObj = new FileObject(); + if (!%fileObj.OpenForRead(%fileName)) + { + error("Error opening file to write settings (" @ %fileName @ ")."); + %fileObj.delete(); + return; + } + + %line = %fileObj.ReadLine(); + if (getSubStr(%line, 0, 4) !$= "SISV") + return; // ? not sis file + + while( !%fileObj.isEOF() ) + { + %line = %fileObj.ReadLine(); + %key = getField(%line, 0); + %data = getFields(%line, 1); + %ctrl = %this.findObjectByInternalName(%key, true); + if (isObject(%ctrl)) + { + %name = %ctrl.getClassName(); + if (%ctrl.getClassName() $= "GuiCheckBoxCtrl") + %ctrl.setStateOn(%data); + else + %ctrl.setText(%data); + } + } + + %this.updateOverrideUpAxis(%this-->overrideUpAxis.getValue()); + %this.updateOverrideScale(%this-->overrideScale.getValue()); + + %fileObj.close(); + %fileObj.delete(); +} + +function AssimpImportDlg::saveSettingsTo(%this, %filename) +{ + %fileObj = new FileObject(); + if (!%fileObj.openForWrite(%fileName)) + { + error("Error opening file to write settings (" @ %fileName @ ")."); + %fileObj.delete(); + return; + } + %fileObj.writeLine("SISV" @ %this.settingVersion); + + foreach$ (%key in $Assimp::textFields) + { + %ctrl = %this.findObjectByInternalName(%key, true); + if (isObject(%ctrl)) + { + %data = %ctrl.getText(); + %fileObj.writeLine(%key TAB %data); + } + } + + foreach$ (%key in $Assimp::checkboxFields) + { + %ctrl = %this.findObjectByInternalName(%key, true); + if (isObject(%ctrl)) + { + %data = %ctrl.getValue(); + %fileObj.writeLine(%key TAB %data); + } + } + + %fileObj.close(); + %fileObj.delete(); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/gui/assimpImport.ed.gui b/Templates/BaseGame/game/tools/gui/assimpImport.ed.gui index 22794f3ad..798153932 100644 --- a/Templates/BaseGame/game/tools/gui/assimpImport.ed.gui +++ b/Templates/BaseGame/game/tools/gui/assimpImport.ed.gui @@ -35,7 +35,7 @@ HorizSizing = "center"; VertSizing = "center"; position = "254 136"; - Extent = "416 390"; + Extent = "702 424"; MinExtent = "8 8"; canSave = "1"; Visible = "1"; @@ -44,667 +44,1428 @@ hovertime = "1000"; internalName = "window"; canSaveDynamicFields = "0"; - - new GuiTextCtrl() { - text = "Up Axis"; - maxLength = "1024"; + + new GuiScrollCtrl() { + willFirstRespond = "1"; + hScrollBar = "dynamic"; + vScrollBar = "dynamic"; + lockHorizScroll = "0"; + lockVertScroll = "0"; + constantThumbHeight = "0"; + childMargin = "0 0"; + mouseWheelScrollSpeed = "-1"; Margin = "0 0 0 0"; Padding = "0 0 0 0"; AnchorTop = "1"; AnchorBottom = "0"; AnchorLeft = "1"; AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; + isContainer = "1"; + Profile = "ToolsGuiScrollProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "10 31"; - Extent = "40 16"; + position = "8 27"; + Extent = "238 389"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - new GuiPopUpMenuCtrl() { - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiPopUpMenuProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "56 30"; - Extent = "66 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - internalName = "upAxis"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Convert To Left Handed"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 50"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::ConvertToLeftHanded"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Converts the model to left-handed"; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Triangulate"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 70"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Active = "0"; - variable = "$Assimp::Triangulate"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Triangulate polygons with more than 3 edges."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; + canSaveDynamicFields = "1"; + + new GuiTreeViewCtrl(ShapeImportTreeView) { + tabSize = "16"; + textOffset = "2"; + fullRowSelect = "0"; + itemHeight = "21"; + destroyTreeOnSleep = "0"; + MouseDragging = "0"; + MultipleSelections = "0"; + DeleteObjectAllowed = "0"; + DragToItemAllowed = "0"; + ClearAllOnSingleSelection = "1"; + showRoot = "1"; + internalNamesOnly = "0"; + objectNamesOnly = "0"; + useInspectorTooltips = "0"; + tooltipOnWidthOnly = "0"; + compareToObjectID = "1"; + canRenameObjects = "1"; + renameInternal = "0"; + isContainer = "1"; + Profile = "ToolsGuiTreeViewProfile"; + HorizSizing = "width"; + VertSizing = "height"; + position = "1 1"; + Extent = "74 63"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; }; - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Calculate Tangent Space"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; + new GuiBitmapBorderCtrl() { + isContainer = "1"; + Profile = "ToolsGuiGroupBorderProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "10 90"; - Extent = "200 13"; - MinExtent = "8 2"; + position = "254 27"; + Extent = "442 60"; + MinExtent = "8 8"; canSave = "1"; Visible = "1"; - variable = "$Assimp::CalcTangentSpace"; tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Calculate tangents and bitangents, if possible."; hovertime = "1000"; - internalName = "overrideScale"; canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Nodes:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "17 2"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "85 2"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "nodes"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Meshes:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "17 21"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "85 21"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "meshes"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Lights:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "17 40"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "85 40"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "lights"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Materials:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "159 2"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "227 2"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "materials"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Polygons:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "159 21"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "227 21"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "polygons"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Animations:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "159 40"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "227 40"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "animations"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Textures:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "301 2"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "369 2"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "textures"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Vertices:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "301 21"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "369 21"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "vertices"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Meta Data:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "301 40"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "369 40"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "metadata"; + canSaveDynamicFields = "0"; + }; + }; + + new GuiBitmapBorderCtrl() { + isContainer = "1"; + Profile = "ToolsGuiGroupBorderProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "254 92"; + Extent = "254 153"; + MinExtent = "8 8"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "LOD"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "59 6"; + Extent = "22 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl() { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "DetectDTS"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiPopUpMenuProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "97 6"; + Extent = "92 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Method used to determine LOD for meshes in the model"; + hovertime = "1000"; + internalName = "lodType"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "196 6"; + Extent = "49 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Detail size for all meshes in this model (when LOD type is SingleSize)"; + hovertime = "1000"; + internalName = "singleDetailSize"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Materials Prefix"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "11 32"; + Extent = "73 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "97 32"; + Extent = "148 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + AltCommand = "ColladaImportTreeView.refresh(\"materials\");"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "materialPrefix"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Import Nodes"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "13 58"; + Extent = "72 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "97 58"; + Extent = "148 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + AltCommand = "ColladaImportTreeView.refresh(\"nodes\");"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "alwaysImport"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Ignore Nodes"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "20 82"; + Extent = "65 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "97 82"; + Extent = "148 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + AltCommand = "ColladaImportTreeView.refresh(\"nodes\");"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "neverImport"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Import Meshes"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "13 106"; + Extent = "72 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "97 106"; + Extent = "148 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + AltCommand = "ColladaImportTreeView.refresh(\"nodes\");"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "alwaysImportMesh"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Ignore Meshes"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "13 130"; + Extent = "72 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "97 130"; + Extent = "148 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + AltCommand = "ColladaImportTreeView.refresh(\"nodes\");"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "neverImportMesh"; + canSaveDynamicFields = "0"; + }; + }; + new GuiBitmapBorderCtrl() { + isContainer = "1"; + Profile = "ToolsGuiGroupBorderProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "254 250"; + Extent = "254 136"; + MinExtent = "8 8"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Override up_axis"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 10"; + Extent = "102 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "AssimpImportDlg.updateOverrideUpAxis($ThisControl.getValue());"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Overrides the specified in the shape file"; + hovertime = "1000"; + internalName = "overrideUpAxis"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl() { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiPopUpMenuProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "151 8"; + Extent = "66 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "upAxis"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Override scale"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 30"; + Extent = "92 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "AssimpImportDlg.updateOverrideScale($ThisControl.getValue());"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Overrides the scale specified in the DAE file"; + hovertime = "1000"; + internalName = "overrideScale"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "151 28"; + Extent = "66 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "scale"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Ignore bone scaling"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 50"; + Extent = "114 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Ignores elements within s to fix issues with some models"; + hovertime = "1000"; + internalName = "ignoreNodeScale"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Center model"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 70"; + Extent = "82 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Translates model so the origin is at the center"; + hovertime = "1000"; + internalName = "adjustCenter"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Floor model"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "151 70"; + Extent = "72 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Translates model so the origin is at the bottom"; + hovertime = "1000"; + internalName = "adjustFloor"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Force update materials.cs"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 90"; + Extent = "148 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Forces update of materials.cs (even if Materials already exist)"; + hovertime = "1000"; + internalName = "forceUpdateMaterials"; + canSaveDynamicFields = "0"; + }; + + new GuiTextCtrl() { + text = "Animation Timing:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "7 111"; + Extent = "85 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl() { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiPopUpMenuProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "96 110"; + Extent = "86 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Select the timing units used in the animation data."; + hovertime = "1000"; + internalName = "animTiming"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "FPS:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "194 111"; + Extent = "20 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + text = "2"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "218 110"; + Extent = "26 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Frames per second for all animations when Animation Timing type is Frames (5 - 60)"; + hovertime = "1000"; + internalName = "animFPS"; + canSaveDynamicFields = "0"; + }; }; - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Validate Data Structure"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; + new GuiBitmapBorderCtrl() { + isContainer = "1"; + Profile = "ToolsGuiGroupBorderProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "10 110"; - Extent = "200 13"; - MinExtent = "8 2"; + position = "514 92"; + Extent = "182 294"; + MinExtent = "8 8"; canSave = "1"; Visible = "1"; - variable = "$Assimp::ValidateDataStructure"; tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Perform a full validation of the loader's output."; hovertime = "1000"; - internalName = "overrideScale"; canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Improve Cache Locality"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 130"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::ImproveCacheLocality"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Improve the cache locality of the output vertices."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Convert To Left Handed"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 10"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Converts the model to left-handed"; + hovertime = "1000"; + internalName = "convertLeftHanded"; + canSaveDynamicFields = "0"; + }; - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Remove Redundant Materials"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 150"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::RemoveRedundantMaterials"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Removes redundant materials."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Find Degenerates"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 170"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::FindDegenerates"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Remove degenerated polygons from the import."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Find Invalid Data"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 190"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::FindInvalidData"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Detect invalid model data, such as invalid normal vectors."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Generate UV Coordinates"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 210"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::GenUVCoords"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Convert spherical, cylindrical, box and planar mapping to proper UVs."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Transform UV Coordinates"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 230"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::TransformUVCoords"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Preprocess UV transformations (scaling, translation ...)"; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Flip UV Coordinates"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 250"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::FlipUVs"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.\nAssimp uses TL(0,0):BR(1,1). T3D uses TL(0,1):BR(1,0). This will be needed for most textured models."; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Find Instances"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 270"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::FindInstances"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "search for instanced meshes and remove them by references to one master."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Limit Bone Weights"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 290"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::LimitBoneWeights"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Limit bone weights to 4 per vertex."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Calculate Tangent Space"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 30"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Calculate tangents and bitangents, if possible."; + hovertime = "1000"; + internalName = "calcTangentSpace"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Remove Redundant Materials"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 50"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Removes redundant materials."; + hovertime = "1000"; + internalName = "removeRedundantMats"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Generate UV Coordinates"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 70"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Convert spherical, cylindrical, box and planar mapping to proper UVs."; + hovertime = "1000"; + internalName = "genUVCoords"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Transform UV Coordinates"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 90"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Preprocess UV transformations (scaling, translation ...)"; + hovertime = "1000"; + internalName = "transformUVCoords"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Flip UV Coordinates"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 110"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.\nAssimp uses TL(0,0):BR(1,1). T3D uses TL(0,1):BR(1,0). This will be needed for most textured models."; + hovertime = "1000"; + internalName = "flipUVCoords"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Find Instances"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 130"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "search for instanced meshes and remove them by references to one master."; + hovertime = "1000"; + internalName = "findInstances"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Limit Bone Weights"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 150"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Limit bone weights to 4 per vertex."; + hovertime = "1000"; + internalName = "limitBoneWeights"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Join Identical Vertices"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 170"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Identifies and joins identical vertex data sets within all imported meshes."; + hovertime = "1000"; + internalName = "joinIdenticalVerts"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Flip Winding Order"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 190"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + internalName = "reverseWindingOrder"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "This step adjusts the output face winding order to be clockwise. The default face winding order is counter clockwise."; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Invert Normals"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 210"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Reverse the normal vector direction for all normals."; + hovertime = "1000"; + internalName = "invertNormals"; + canSaveDynamicFields = "0"; + }; }; - new GuiTextCtrl() { - text = "Animation Timing:"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 311"; - Extent = "85 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - new GuiPopUpMenuCtrl() { - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiPopUpMenuProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "100 310"; - Extent = "86 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Select the timing units used in the animation data."; - hovertime = "1000"; - internalName = "animTiming"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "FPS:"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "200 311"; - Extent = "20 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - new GuiTextEditCtrl() { - historySize = "0"; - password = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - passwordMask = "*"; - text = "2"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "225 310"; - Extent = "26 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Frames per second for all animations when Animation Timing type is Frames (5 - 60)"; - hovertime = "1000"; - internalName = "animFPS"; - canSaveDynamicFields = "0"; - }; - - new GuiTextCtrl() { - text = "LOD"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "210 31"; - Extent = "22 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - new GuiPopUpMenuCtrl() { - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiPopUpMenuProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "238 30"; - Extent = "92 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Method used to determine LOD for meshes in the model"; - hovertime = "1000"; - internalName = "lodType"; - canSaveDynamicFields = "0"; - }; - new GuiTextEditCtrl() { - historySize = "0"; - password = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - passwordMask = "*"; - text = "2"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "338 30"; - Extent = "49 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Detail size for all meshes in this model (when LOD type is SingleSize)"; - hovertime = "1000"; - internalName = "singleDetailSize"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Center Model"; + new GuiButtonCtrl() { + text = "Load Settings"; groupNum = "-1"; - buttonType = "ToggleButton"; + buttonType = "PushButton"; useMouseEvents = "0"; isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "210 50"; - Extent = "200 13"; + position = "269 394"; + Extent = "86 22"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; - variable = "$Assimp::adjustCenter"; + Command = "AssimpImportDlg.onLoadSettings();"; tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Translates model so the origin is at the center"; hovertime = "1000"; canSaveDynamicFields = "0"; }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Floor Model"; + new GuiButtonCtrl() { + text = "Save Settings"; groupNum = "-1"; - buttonType = "ToggleButton"; + buttonType = "PushButton"; useMouseEvents = "0"; isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "210 70"; - Extent = "200 13"; + position = "377 394"; + Extent = "86 22"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; - variable = "$Assimp::adjustFloor"; + Command = "AssimpImportDlg.onSaveSettings();"; tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Translates model so the origin is at the bottom"; hovertime = "1000"; canSaveDynamicFields = "0"; }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Join Identical Vertices"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "210 90"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::JoinIdenticalVertices"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Identifies and joins identical vertex data sets within all imported meshes."; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Flip Winding Order"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "210 110"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::FlipWindingOrder"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "This step adjusts the output face winding order to be clockwise. The default face winding order is counter clockwise."; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Invert Normals"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "210 130"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::FlipNormals"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Reverse the normal vector direction for all normals."; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Force update materials.cs"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "210 150"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::ForceUpdateMats"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Forces update of materials.cs (even if Materials already exist)"; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { text = "OK"; groupNum = "-1"; @@ -714,7 +1475,8 @@ Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "120 348"; + //position = "320 440"; + position = "485 394"; Extent = "86 22"; MinExtent = "8 2"; canSave = "1"; @@ -734,91 +1496,18 @@ Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "220 348"; + position = "593 394"; Extent = "86 22"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; Command = "AssimpImportDlg.onCancel();"; tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Exit without loading the COLLADA model"; + ToolTip = "Exit without loading the model"; hovertime = "1000"; canSaveDynamicFields = "0"; }; }; }; //--- OBJECT WRITE END --- - -function AssimpImportDlg::showDialog(%this, %shapePath, %cmd) -{ - %this.path = %shapePath; - %this.cmd = %cmd; - - if ($Assimp::OverrideUpAxis $= "") - { // First load, so set best-case defaults - $Assimp::OverrideUpAxis = 1; // y-axis is up in most test shapes - $Assimp::lodType = 0; // DetectDTS - $Assimp::singleDetailSize = "2"; - - // $Assimp::FlipUVs will be needed for virtually all textured models - $Assimp::FlipUVs = true; - $Assimp::FlipWindingOrder = true; // Makes winding order clock wise - $Assimp::FindDegenerates = true; - $Assimp::FindInvalidData = true; - $Assimp::JoinIdenticalVertices = true; - $Assimp::FlipNormals = false; - - $Assimp::AnimTiming = 1; // Seconds - $Assimp::AnimFPS = 30; // Framerate when timing is frames. - } - - %this-->upAxis.clear(); - %this-->upAxis.add("X_AXIS", 0); - %this-->upAxis.add("Y_AXIS", 1); - %this-->upAxis.add("Z_AXIS", 2); - %this-->upAxis.setSelected($Assimp::OverrideUpAxis); - - %this-->lodType.clear(); - %this-->lodType.add("DetectDTS", 0); - %this-->lodType.add("SingleSize", 1); - %this-->lodType.add("TrailingNumber", 2); - %this-->lodType.setSelected($Assimp::lodType); - %this-->singleDetailSize.text = $Assimp::singleDetailSize; - - %this-->animTiming.clear(); - %this-->animTiming.add("Frames", 0); - %this-->animTiming.add("Seconds", 1); - %this-->animTiming.add("Milliseconds", 1000); - %this-->animTiming.setSelected($Assimp::AnimTiming); - %this-->animFPS.text = $Assimp::AnimFPS; - - //Triangulate is a default(currently mandatory) behavior - $Assimp::Triangulate = true; - - Canvas.pushDialog(%this); -} - -function AssimpImportDlg::onCancel(%this) -{ - Canvas.popDialog(%this); - ColladaImportTreeView.clear(); -} - -function AssimpImportDlg::onOK(%this) -{ - Canvas.popDialog(%this); - ColladaImportTreeView.clear(); - - $Assimp::OverrideUpAxis = %this-->upAxis.getSelected(); - - $Assimp::lodType = %this-->lodType.getSelected(); - $Assimp::singleDetailSize = %this-->singleDetailSize.getText(); - - $Assimp::AnimTiming = %this-->animTiming.getSelected(); - $Assimp::AnimFPS = %this-->animFPS.getText(); - - // Load the shape (always from the DAE) - $assimp::forceLoad = true; - eval(%this.cmd); - $assimp::forceLoad = true; -} \ No newline at end of file +exec("./assimpImport.ed.cs"); diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui index b73fe709e..eb7a3225a 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui @@ -489,14 +489,14 @@ Profile = "ToolsGuiCheckBoxProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "135 27"; + Position = "133 27"; Extent = "72 13"; Variable = "EWorldEditor.forceLoadDAE"; Command = "EWorldEditor.forceLoadDAE = $ThisControl.getValue(); EditorSettings.setValue(\"forceLoadDAE\", EWorldEditor.forceLoadDAE);"; tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Forces loading of DAE files (ignores cached.dts if present)"; hovertime = "1000"; - text = " Force DAE"; + text = " Source Art"; }; }; diff --git a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.cs b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.cs index ea70f7363..fc9615375 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.cs +++ b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.cs @@ -227,6 +227,9 @@ function ShapeEditor::saveChanges( %this ) function ShapeEditor::findConstructor( %this, %path ) { + if (!isObject(TSShapeConstructorGroup)) + return -1; + %count = TSShapeConstructorGroup.getCount(); for ( %i = 0; %i < %count; %i++ ) { diff --git a/Templates/Full/game/tools/glb.sis b/Templates/Full/game/tools/glb.sis new file mode 100644 index 000000000..b02937729 --- /dev/null +++ b/Templates/Full/game/tools/glb.sis @@ -0,0 +1,29 @@ +SISV1 +lodType SingleSize +singleDetailSize 2 +materialPrefix +alwaysImport +neverImport +alwaysImportMesh +neverImportMesh +upAxis Y_AXIS +scale 1 +animTiming Milliseconds +animFPS 30 +overrideUpAxis 1 +overrideScale 0 +ignoreNodeScale 0 +adjustCenter 0 +adjustFloor 0 +forceUpdateMaterials 0 +convertLeftHanded 0 +calcTangentSpace 0 +removeRedundantMats 1 +genUVCoords 0 +transformUVCoords 0 +flipUVCoords 1 +findInstances 0 +limitBoneWeights 0 +joinIdenticalVerts 1 +reverseWindingOrder 1 +invertNormals 0 diff --git a/Templates/Full/game/tools/gltf.sis b/Templates/Full/game/tools/gltf.sis new file mode 100644 index 000000000..b02937729 --- /dev/null +++ b/Templates/Full/game/tools/gltf.sis @@ -0,0 +1,29 @@ +SISV1 +lodType SingleSize +singleDetailSize 2 +materialPrefix +alwaysImport +neverImport +alwaysImportMesh +neverImportMesh +upAxis Y_AXIS +scale 1 +animTiming Milliseconds +animFPS 30 +overrideUpAxis 1 +overrideScale 0 +ignoreNodeScale 0 +adjustCenter 0 +adjustFloor 0 +forceUpdateMaterials 0 +convertLeftHanded 0 +calcTangentSpace 0 +removeRedundantMats 1 +genUVCoords 0 +transformUVCoords 0 +flipUVCoords 1 +findInstances 0 +limitBoneWeights 0 +joinIdenticalVerts 1 +reverseWindingOrder 1 +invertNormals 0 diff --git a/Templates/Full/game/tools/gui/assimpImport.ed.cs b/Templates/Full/game/tools/gui/assimpImport.ed.cs new file mode 100644 index 000000000..75c0f129e --- /dev/null +++ b/Templates/Full/game/tools/gui/assimpImport.ed.cs @@ -0,0 +1,540 @@ +//------------------------------------------------------------------------------ +// Fields that will be saved to settings +$Assimp::textFields = "lodType" TAB "singleDetailSize" TAB "materialPrefix" TAB + "alwaysImport" TAB "neverImport" TAB "alwaysImportMesh" TAB "neverImportMesh" + TAB "upAxis" TAB "scale" TAB "animTiming" TAB "animFPS"; + +$Assimp::checkboxFields = "overrideUpAxis" TAB "overrideScale" TAB "ignoreNodeScale" + TAB "adjustCenter" TAB "adjustFloor" TAB "forceUpdateMaterials" TAB "convertLeftHanded" + TAB "calcTangentSpace" TAB "removeRedundantMats" TAB "genUVCoords" TAB + "transformUVCoords" TAB "flipUVCoords" TAB "findInstances" TAB "limitBoneWeights" + TAB "joinIdenticalVerts" TAB "reverseWindingOrder" TAB "invertNormals"; +//------------------------------------------------------------------------------ + +function ShapeImportTreeView::refresh(%this, %what) +{ + %shapeRoot = %this.getFirstRootItem(); + %materialsRoot = %this.getNextSibling(%shapeRoot); + %animRoot = %this.getNextSibling(%materialsRoot); + + // Refresh nodes + if ((%what $= "all") || (%what $= "nodes")) + { + // Indicate whether nodes will be ignored on import + %this._alwaysImport = strreplace(AssimpImportDlg-->alwaysImport.getText(), ";", "\t"); + %this._neverImport = strreplace(AssimpImportDlg-->neverImport.getText(), ";", "\t"); + %this._alwaysImportMesh = strreplace(AssimpImportDlg-->alwaysImportMesh.getText(), ";", "\t"); + %this._neverImportMesh = strreplace(AssimpImportDlg-->neverImportMesh.getText(), ";", "\t"); + %this.refreshNode(%this.getChild(%shapeRoot)); + } + + // Refresh materials + if ((%what $= "all") || (%what $= "materials")) + { + %matPrefix = AssimpImportDlg-->materialPrefix.getText(); + %id = %this.getChild(%materialsRoot); + while (%id > 0) + { + %baseName = %this.getItemValue(%id); + %name = %matPrefix @ %baseName; + + // Indicate whether material name is already mapped + %this.editItem(%id, %name, %baseName); + %mapped = getMaterialMapping(%name); + if (%mapped $= "") + { + %this.setItemTooltip(%id, "A new material will be mapped to this name"); + %this.setItemImages(%id, %this._imageMaterial, %this._imageMaterial); + } + else + { + %this.setItemTooltip(%id, %mapped SPC "is already mapped to this material name"); + %this.setItemImages(%id, %this._imageExMaterial, %this._imageExMaterial); + } + + %id = %this.getNextSibling(%id); + } + } + + // Refresh animations + if ((%what $= "all") || (%what $= "animations")) + { + %id = %this.getChild(%animRoot); + while (%id > 0) + { + %this.setItemImages(%id, %this._imageAnim, %this._imageAnim); + %id = %this.getNextSibling(%id); + } + } +} + +function ShapeImportTreeView::refreshNode(%this, %id) +{ + while (%id > 0) + { + switch$ (%this.getItemValue(%id)) + { + case "mesh": + // Check if this mesh will be ignored on import + if (strIsMatchMultipleExpr(%this._alwaysImportMesh, %this.getItemText(%id)) || + !strIsMatchMultipleExpr(%this._neverImportMesh, %this.getItemText(%id)) ) + { + %this.setItemTooltip(%id, ""); + %this.setItemImages(%id, %this._imageMesh, %this._imageMesh); + } + else + { + %this.setItemTooltip(%id, "This mesh will be ignored on import"); + %this.setItemImages(%id, %this._imageExNode, %this._imageExNode); + } + + case "light": + %this.setItemImages(%id, %this._imageLight, %this._imageLight); + + case "node": + // Check if this node will be ignored on import + if (strIsMatchMultipleExpr(%this._alwaysImport, %this.getItemText(%id)) || + !strIsMatchMultipleExpr(%this._neverImport, %this.getItemText(%id)) ) + { + %this.setItemTooltip(%id, ""); + %this.setItemImages(%id, %this._imageNode, %this._imageNode); + } + else + { + %this.setItemTooltip(%id, "This node will be ignored on import"); + %this.setItemImages(%id, %this._imageExNode, %this._imageExNode); + } + } + + // recurse through children and siblings + %this.refreshNode(%this.getChild(%id)); + %id = %this.getNextSibling(%id); + } +} + +function ShapeImportTreeView::onDefineIcons(%this) +{ + // Set the tree view icon indices and texture paths + %this._imageNone = 0; + %this._imageNode = 1; + %this._imageMesh = 2; + %this._imageMaterial = 3; + %this._imageLight = 4; + %this._imageAnimation = 5; + %this._imageExNode = 6; + %this._imageExMaterial = 7; + + %icons = ":" @ // no icon + "tools/gui/images/ColladaImport/iconNode:" @ // normal node + "tools/gui/images/ColladaImport/iconMesh:" @ // mesh + "tools/gui/images/ColladaImport/iconMaterial:" @ // new material + "tools/gui/images/ColladaImport/iconLight:" @ // light + "tools/gui/images/ColladaImport/iconAnimation:" @ // sequence + "tools/gui/images/ColladaImport/iconIgnoreNode:" @ // ignored node + "tools/gui/images/ColladaImport/iconExistingMaterial"; // existing material + + %this.buildIconTable( %icons ); +} + +function AssimpImportDlg::updateOverrideUpAxis(%this, %override) +{ + %this-->overrideUpAxis.setStateOn(%override); + %this-->upAxis.setActive(%override); + if (!%override) + %this-->upAxis.setText(ShapeImportTreeView._upAxis); +} + +function AssimpImportDlg::updateOverrideScale(%this, %override) +{ + %this-->overrideScale.setStateOn(%override); + %this-->scale.setActive(%override); + if (!%override) + %this-->scale.setText(ShapeImportTreeView._unit); +} + +function AssimpImportDlg::initFromConstructor(%this) +{ + if (%this.constructor.upAxis !$= "DEFAULT") + { + %this-->upAxis.setText(%this.constructor.upAxis); + %this.updateOverrideUpAxis(true); + } + else + %this.updateOverrideUpAxis(false); + + if (%this.constructor.unit > 0) + { + %this-->scale.setText(%this.constructor.unit); + %this.updateOverrideScale(true); + } + else + %this.updateOverrideScale(false); + + %this-->lodType.setText(%this.constructor.lodType); + %this-->singleDetailSize.setText(%this.constructor.singleDetailSize); + %this-->materialPrefix.setText(%this.constructor.matNamePrefix); + %this-->alwaysImport.setText(strreplace(%this.constructor.alwaysImport, "\t", ";")); + %this-->neverImport.setText(strreplace(%this.constructor.neverImport, "\t", ";")); + %this-->alwaysImportMesh.setText(strreplace(%this.constructor.alwaysImportMesh, "\t", ";")); + %this-->neverImportMesh.setText(strreplace(%this.constructor.neverImportMesh, "\t", ";")); + %this-->ignoreNodeScale.setStateOn(%this.constructor.ignoreNodeScale); + %this-->adjustCenter.setStateOn(%this.constructor.adjustCenter); + %this-->adjustFloor.setStateOn(%this.constructor.adjustFloor); + %this-->forceUpdateMaterials.setStateOn(%this.constructor.forceUpdateMaterials); + + %this-->animTiming.setText(%this.constructor.animTiming); + %this-->animFPS.setText(%this.constructor.animFPS); + + %this-->convertLeftHanded.setStateOn(%this.constructor.convertLeftHanded); + %this-->calcTangentSpace.setStateOn(%this.constructor.calcTangentSpace); + %this-->genUVCoords.setStateOn(%this.constructor.genUVCoords); + %this-->transformUVCoords.setStateOn(%this.constructor.transformUVCoords); + %this-->flipUVCoords.setStateOn(%this.constructor.flipUVCoords); + %this-->findInstances.setStateOn(%this.constructor.findInstances); + %this-->limitBoneWeights.setStateOn(%this.constructor.limitBoneWeights); + %this-->joinIdenticalVerts.setStateOn(%this.constructor.joinIdenticalVerts); + %this-->reverseWindingOrder.setStateOn(%this.constructor.reverseWindingOrder); + %this-->invertNormals.setStateOn(%this.constructor.invertNormals); + %this-->removeRedundantMats.setStateOn(%this.constructor.removeRedundantMats); +} + +function AssimpImportDlg::initFromDefaults(%this) +{ + %this.updateOverrideUpAxis(false); + %this.updateOverrideScale(false); + + %this-->lodType.setText("TrailingNumber"); + %this-->singleDetailSize.setText("2"); + %this-->materialPrefix.setText(""); + %this-->alwaysImport.setText(""); + %this-->neverImport.setText(""); + %this-->alwaysImportMesh.setText(""); + %this-->neverImportMesh.setText(""); + %this-->ignoreNodeScale.setStateOn(0); + %this-->adjustCenter.setStateOn(0); + %this-->adjustFloor.setStateOn(0); + %this-->forceUpdateMaterials.setStateOn(0); + + %this-->animTiming.setText("Seconds"); + %this-->animFPS.setText("30"); + + %this-->convertLeftHanded.setStateOn(0); + %this-->calcTangentSpace.setStateOn(0); + %this-->genUVCoords.setStateOn(0); + %this-->transformUVCoords.setStateOn(0); + %this-->flipUVCoords.setStateOn(1); + %this-->findInstances.setStateOn(0); + %this-->limitBoneWeights.setStateOn(0); + %this-->joinIdenticalVerts.setStateOn(1); + %this-->reverseWindingOrder.setStateOn(1); + %this-->invertNormals.setStateOn(0); + %this-->removeRedundantMats.setStateOn(1); +} + +function AssimpImportDlg::saveToConstructor(%this) +{ + // Store values from GUI + if (%this-->overrideUpAxis.getValue()) + %this.constructor.upAxis = %this-->upAxis.getText(); + else + %this.constructor.upAxis = "DEFAULT"; + + if (%this-->overrideScale.getValue()) + %this.constructor.unit = %this-->scale.getText(); + else + %this.constructor.unit = -1; + + %this.constructor.lodType = %this-->lodType.getText(); + %this.constructor.singleDetailSize = %this-->singleDetailSize.getText(); + %this.constructor.matNamePrefix = %this-->materialPrefix.getText(); + %this.constructor.alwaysImport = strreplace(%this-->alwaysImport.getText(), ";", "\t"); + %this.constructor.neverImport = strreplace(%this-->neverImport.getText(), ";", "\t"); + %this.constructor.alwaysImportMesh = strreplace(%this-->alwaysImportMesh.getText(), ";", "\t"); + %this.constructor.neverImportMesh = strreplace(%this-->neverImportMesh.getText(), ";", "\t"); + %this.constructor.ignoreNodeScale = %this-->ignoreNodeScale.getValue(); + %this.constructor.adjustCenter = %this-->adjustCenter.getValue(); + %this.constructor.adjustFloor = %this-->adjustFloor.getValue(); + %this.constructor.forceUpdateMaterials = %this-->forceUpdateMaterials.getValue(); + + %this.constructor.animTiming = %this-->animTiming.getText(); + %this.constructor.animFPS = %this-->animFPS.getText(); + + %this.constructor.convertLeftHanded = %this-->convertLeftHanded.getValue(); + %this.constructor.calcTangentSpace = %this-->calcTangentSpace.getValue(); + %this.constructor.genUVCoords = %this-->genUVCoords.getValue(); + %this.constructor.transformUVCoords = %this-->transformUVCoords.getValue(); + %this.constructor.flipUVCoords = %this-->flipUVCoords.getValue(); + %this.constructor.findInstances = %this-->findInstances.getValue(); + %this.constructor.limitBoneWeights = %this-->limitBoneWeights.getValue(); + %this.constructor.joinIdenticalVerts = %this-->joinIdenticalVerts.getValue(); + %this.constructor.reverseWindingOrder = %this-->reverseWindingOrder.getValue(); + %this.constructor.invertNormals = %this-->invertNormals.getValue(); + %this.constructor.removeRedundantMats = %this-->removeRedundantMats.getValue(); +} + +function AssimpImportDlg::showDialog(%this, %shapePath, %cmd) +{ + %this.settingVersion = 1.0; + %this.path = %shapePath; + %this.cmd = %cmd; + + // Check for an existing TSShapeConstructor object. Need to exec the script + // manually as the resource may not have been loaded yet + %csPath = filePath(%this.path) @ "/" @ fileBase(%this.path) @ ".cs"; + if (isFile(%csPath)) + exec(%csPath); + + %this.constructor = ShapeEditor.findConstructor(%this.path); + + // Only show the import dialog if required. Note that 'GetShapeInfo' will + // fail if the source file is missing, or a cached.dts is available. + $assimp::forceLoad = EditorSettings.value("forceLoadDAE"); + if (!GetShapeInfo(%shapePath, "ShapeImportTreeView")) + { + eval(%cmd); + $assimp::forceLoad = false; + return; + } + $assimp::forceLoad = false; + + // Initialise GUI + ShapeImportTreeView.onDefineIcons(); + + // Window Title + %this-->window.text = "Shape Import:" SPC %this.path; + + // Fill Popups + %this-->upAxis.clear(); + %this-->upAxis.add("X_AXIS", 1); + %this-->upAxis.add("Y_AXIS", 2); + %this-->upAxis.add("Z_AXIS", 3); + + %this-->lodType.clear(); + %this-->lodType.add("DetectDTS", 1); + %this-->lodType.add("SingleSize", 2); + %this-->lodType.add("TrailingNumber", 3); + + %this-->animTiming.clear(); + %this-->animTiming.add("Frames", 0); + %this-->animTiming.add("Seconds", 1); + %this-->animTiming.add("Milliseconds", 1000); + + // Set model details + %this-->nodes.setText(ShapeImportTreeView._nodeCount); + %this-->meshes.setText(ShapeImportTreeView._meshCount); + %this-->lights.setText(ShapeImportTreeView._lightCount); + %this-->materials.setText(ShapeImportTreeView._materialCount); + %this-->polygons.setText(ShapeImportTreeView._polygonCount); + %this-->animations.setText(ShapeImportTreeView._animCount); + %this-->textures.setText(ShapeImportTreeView._textureCount); + %this-->vertices.setText(ShapeImportTreeView._vertCount); + %metaText = (ShapeImportTreeView._metaTagCount == 0) ? "No Records" : ShapeImportTreeView._metaTagCount; + %this-->metadata.setText(%metaText); + + if (%this.constructor > 0) + %this.initFromConstructor(); + else + { + %this.initFromDefaults(); + + // If there's a default settings file for the file type, load it + %defaultSISPath = EditorSettings.value("defaultSettingsPath", "Tools"); + %settingsFile = %defaultSISPath @ "/" @ getSubStr(fileExt(%shapePath),1) @ ".sis"; + if (isFile(%settingsFile)) + %this.loadSettingsFrom(%settingsFile); + } + + Canvas.pushDialog(%this); + + ShapeImportTreeView.refresh("all"); +} + +function AssimpImportDlg::onLoadSettings(%this) +{ + %defaultSISPath = EditorSettings.value("defaultSettingsPath", "Tools"); + %dlg = new OpenFileDialog() + { + Filters = "Shape Import Settings (*.sis)|*.sis|"; + DefaultPath = %defaultSISPath; + DefaultFile = ""; + ChangePath = false; + MustExist = true; + }; + + %ret = %dlg.Execute(); + if ( %ret ) + %fileName = %dlg.FileName; + + %dlg.delete(); + if ( !%ret ) + return; + + %this.loadSettingsFrom(%fileName); +} + +function AssimpImportDlg::onSaveSettings(%this) +{ + %defaultSISPath = EditorSettings.value("defaultSettingsPath", "Tools"); + %dlg = new SaveFileDialog() + { + Filters = "Shape Import Settings (*.sis)|*.sis|"; + DefaultPath = %defaultSISPath; + DefaultFile = ""; + ChangePath = false; + MustExist = true; + }; + + %ret = %dlg.Execute(); + if ( %ret ) + { + %saveFile = %dlg.FileName; + if(fileExt( %saveFile ) !$= ".sis") + %saveFile = %saveFile @ ".sis"; + } + + %dlg.delete(); + + if (!%ret) + return; + + %this.saveSettingsTo(%saveFile); +} + +function AssimpImportDlg::onCancel(%this) +{ + Canvas.popDialog(%this); + ShapeImportTreeView.clear(); +} + +function AssimpImportDlg::onOK(%this) +{ + Canvas.popDialog(%this); + ShapeImportTreeView.clear(); + + if (%this.needsSave()) + { + if (!isObject(%this.constructor)) + { // Create a new TSShapeConstructor object + %this.constructor = ShapeEditor.createConstructor(%this.path); + } + } + + if (%this.constructor > 0) + { + %this.saveToConstructor(); + // Save new settings to file + ShapeEditor.saveConstructor(%this.constructor); + } + + // Load the shape (always from the DAE) + $assimp::forceLoad = true; + eval(%this.cmd); + $assimp::forceLoad = false; +} + +function AssimpImportDlg::needsSave(%this) +{ + if ((%this-->overrideUpAxis.getValue() != 0) || + (%this-->overrideScale.getValue() != 0) || + (%this-->lodType.getText() !$= "DetectDTS") || + (%this-->singleDetailSize.getText() !$= "2") || + (%this-->materialPrefix.getText() !$= "") || + (%this-->alwaysImport.getText() !$= "") || + (%this-->neverImport.getText() !$= "") || + (%this-->alwaysImportMesh.getText() !$= "") || + (%this-->neverImportMesh.getText() !$= "") || + (%this-->ignoreNodeScale.getValue() != 0) || + (%this-->adjustCenter.getValue() != 0) || + (%this-->adjustFloor.getValue() != 0) || + (%this-->forceUpdateMaterials.getValue() != 0)) + return true; + + if ((%this-->animTiming.getText() !$= "Seconds") || + (%this-->animFPS.getText() !$= "30") || + (%this-->convertLeftHanded.getValue() != 0) || + (%this-->calcTangentSpace.getValue() != 0) || + (%this-->genUVCoords.getValue() != 0) || + (%this-->transformUVCoords.getValue() != 0) || + (%this-->flipUVCoords.getValue() != 1) || + (%this-->findInstances.getValue() != 0) || + (%this-->limitBoneWeights.getValue() != 0) || + (%this-->joinIdenticalVerts.getValue() != 1) || + (%this-->reverseWindingOrder.getValue() != 1) || + (%this-->invertNormals.getValue() != 0) || + (%this-->removeRedundantMats.getValue() != 1)) + return true; + + return false; +} + +function AssimpImportDlg::loadSettingsFrom(%this, %filename) +{ + %fileObj = new FileObject(); + if (!%fileObj.OpenForRead(%fileName)) + { + error("Error opening file to write settings (" @ %fileName @ ")."); + %fileObj.delete(); + return; + } + + %line = %fileObj.ReadLine(); + if (getSubStr(%line, 0, 4) !$= "SISV") + return; // ? not sis file + + while( !%fileObj.isEOF() ) + { + %line = %fileObj.ReadLine(); + %key = getField(%line, 0); + %data = getFields(%line, 1); + %ctrl = %this.findObjectByInternalName(%key, true); + if (isObject(%ctrl)) + { + %name = %ctrl.getClassName(); + if (%ctrl.getClassName() $= "GuiCheckBoxCtrl") + %ctrl.setStateOn(%data); + else + %ctrl.setText(%data); + } + } + + %this.updateOverrideUpAxis(%this-->overrideUpAxis.getValue()); + %this.updateOverrideScale(%this-->overrideScale.getValue()); + + %fileObj.close(); + %fileObj.delete(); +} + +function AssimpImportDlg::saveSettingsTo(%this, %filename) +{ + %fileObj = new FileObject(); + if (!%fileObj.openForWrite(%fileName)) + { + error("Error opening file to write settings (" @ %fileName @ ")."); + %fileObj.delete(); + return; + } + %fileObj.writeLine("SISV" @ %this.settingVersion); + + foreach$ (%key in $Assimp::textFields) + { + %ctrl = %this.findObjectByInternalName(%key, true); + if (isObject(%ctrl)) + { + %data = %ctrl.getText(); + %fileObj.writeLine(%key TAB %data); + } + } + + foreach$ (%key in $Assimp::checkboxFields) + { + %ctrl = %this.findObjectByInternalName(%key, true); + if (isObject(%ctrl)) + { + %data = %ctrl.getValue(); + %fileObj.writeLine(%key TAB %data); + } + } + + %fileObj.close(); + %fileObj.delete(); +} \ No newline at end of file diff --git a/Templates/Full/game/tools/gui/assimpImport.ed.gui b/Templates/Full/game/tools/gui/assimpImport.ed.gui index 22794f3ad..798153932 100644 --- a/Templates/Full/game/tools/gui/assimpImport.ed.gui +++ b/Templates/Full/game/tools/gui/assimpImport.ed.gui @@ -35,7 +35,7 @@ HorizSizing = "center"; VertSizing = "center"; position = "254 136"; - Extent = "416 390"; + Extent = "702 424"; MinExtent = "8 8"; canSave = "1"; Visible = "1"; @@ -44,667 +44,1428 @@ hovertime = "1000"; internalName = "window"; canSaveDynamicFields = "0"; - - new GuiTextCtrl() { - text = "Up Axis"; - maxLength = "1024"; + + new GuiScrollCtrl() { + willFirstRespond = "1"; + hScrollBar = "dynamic"; + vScrollBar = "dynamic"; + lockHorizScroll = "0"; + lockVertScroll = "0"; + constantThumbHeight = "0"; + childMargin = "0 0"; + mouseWheelScrollSpeed = "-1"; Margin = "0 0 0 0"; Padding = "0 0 0 0"; AnchorTop = "1"; AnchorBottom = "0"; AnchorLeft = "1"; AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; + isContainer = "1"; + Profile = "ToolsGuiScrollProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "10 31"; - Extent = "40 16"; + position = "8 27"; + Extent = "238 389"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - new GuiPopUpMenuCtrl() { - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiPopUpMenuProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "56 30"; - Extent = "66 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - internalName = "upAxis"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Convert To Left Handed"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 50"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::ConvertToLeftHanded"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Converts the model to left-handed"; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Triangulate"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 70"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Active = "0"; - variable = "$Assimp::Triangulate"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Triangulate polygons with more than 3 edges."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; + canSaveDynamicFields = "1"; + + new GuiTreeViewCtrl(ShapeImportTreeView) { + tabSize = "16"; + textOffset = "2"; + fullRowSelect = "0"; + itemHeight = "21"; + destroyTreeOnSleep = "0"; + MouseDragging = "0"; + MultipleSelections = "0"; + DeleteObjectAllowed = "0"; + DragToItemAllowed = "0"; + ClearAllOnSingleSelection = "1"; + showRoot = "1"; + internalNamesOnly = "0"; + objectNamesOnly = "0"; + useInspectorTooltips = "0"; + tooltipOnWidthOnly = "0"; + compareToObjectID = "1"; + canRenameObjects = "1"; + renameInternal = "0"; + isContainer = "1"; + Profile = "ToolsGuiTreeViewProfile"; + HorizSizing = "width"; + VertSizing = "height"; + position = "1 1"; + Extent = "74 63"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; }; - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Calculate Tangent Space"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; + new GuiBitmapBorderCtrl() { + isContainer = "1"; + Profile = "ToolsGuiGroupBorderProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "10 90"; - Extent = "200 13"; - MinExtent = "8 2"; + position = "254 27"; + Extent = "442 60"; + MinExtent = "8 8"; canSave = "1"; Visible = "1"; - variable = "$Assimp::CalcTangentSpace"; tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Calculate tangents and bitangents, if possible."; hovertime = "1000"; - internalName = "overrideScale"; canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "Nodes:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "17 2"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "85 2"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "nodes"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Meshes:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "17 21"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "85 21"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "meshes"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Lights:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "17 40"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "85 40"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "lights"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Materials:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "159 2"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "227 2"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "materials"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Polygons:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "159 21"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "227 21"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "polygons"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Animations:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "159 40"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "227 40"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "animations"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Textures:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "301 2"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "369 2"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "textures"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Vertices:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "301 21"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "369 21"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "vertices"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Meta Data:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "301 40"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "369 40"; + Extent = "60 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "metadata"; + canSaveDynamicFields = "0"; + }; + }; + + new GuiBitmapBorderCtrl() { + isContainer = "1"; + Profile = "ToolsGuiGroupBorderProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "254 92"; + Extent = "254 153"; + MinExtent = "8 8"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + + new GuiTextCtrl() { + text = "LOD"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "59 6"; + Extent = "22 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl() { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + text = "DetectDTS"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiPopUpMenuProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "97 6"; + Extent = "92 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Method used to determine LOD for meshes in the model"; + hovertime = "1000"; + internalName = "lodType"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "196 6"; + Extent = "49 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Detail size for all meshes in this model (when LOD type is SingleSize)"; + hovertime = "1000"; + internalName = "singleDetailSize"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Materials Prefix"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "11 32"; + Extent = "73 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "97 32"; + Extent = "148 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + AltCommand = "ColladaImportTreeView.refresh(\"materials\");"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "materialPrefix"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Import Nodes"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "13 58"; + Extent = "72 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "97 58"; + Extent = "148 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + AltCommand = "ColladaImportTreeView.refresh(\"nodes\");"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "alwaysImport"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Ignore Nodes"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "20 82"; + Extent = "65 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "97 82"; + Extent = "148 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + AltCommand = "ColladaImportTreeView.refresh(\"nodes\");"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "neverImport"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Import Meshes"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "13 106"; + Extent = "72 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "97 106"; + Extent = "148 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + AltCommand = "ColladaImportTreeView.refresh(\"nodes\");"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "alwaysImportMesh"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Ignore Meshes"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "13 130"; + Extent = "72 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "97 130"; + Extent = "148 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + AltCommand = "ColladaImportTreeView.refresh(\"nodes\");"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "neverImportMesh"; + canSaveDynamicFields = "0"; + }; + }; + new GuiBitmapBorderCtrl() { + isContainer = "1"; + Profile = "ToolsGuiGroupBorderProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "254 250"; + Extent = "254 136"; + MinExtent = "8 8"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Override up_axis"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 10"; + Extent = "102 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "AssimpImportDlg.updateOverrideUpAxis($ThisControl.getValue());"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Overrides the specified in the shape file"; + hovertime = "1000"; + internalName = "overrideUpAxis"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl() { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiPopUpMenuProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "151 8"; + Extent = "66 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "upAxis"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Override scale"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 30"; + Extent = "92 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "AssimpImportDlg.updateOverrideScale($ThisControl.getValue());"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Overrides the scale specified in the DAE file"; + hovertime = "1000"; + internalName = "overrideScale"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + text = ""; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "151 28"; + Extent = "66 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + internalName = "scale"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Ignore bone scaling"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 50"; + Extent = "114 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Ignores elements within s to fix issues with some models"; + hovertime = "1000"; + internalName = "ignoreNodeScale"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Center model"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 70"; + Extent = "82 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Translates model so the origin is at the center"; + hovertime = "1000"; + internalName = "adjustCenter"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Floor model"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "151 70"; + Extent = "72 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Translates model so the origin is at the bottom"; + hovertime = "1000"; + internalName = "adjustFloor"; + canSaveDynamicFields = "0"; + }; + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Force update materials.cs"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 90"; + Extent = "148 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Forces update of materials.cs (even if Materials already exist)"; + hovertime = "1000"; + internalName = "forceUpdateMaterials"; + canSaveDynamicFields = "0"; + }; + + new GuiTextCtrl() { + text = "Animation Timing:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "7 111"; + Extent = "85 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl() { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiPopUpMenuProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "96 110"; + Extent = "86 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Select the timing units used in the animation data."; + hovertime = "1000"; + internalName = "animTiming"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "FPS:"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "194 111"; + Extent = "20 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + passwordMask = "*"; + text = "2"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "218 110"; + Extent = "26 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Frames per second for all animations when Animation Timing type is Frames (5 - 60)"; + hovertime = "1000"; + internalName = "animFPS"; + canSaveDynamicFields = "0"; + }; }; - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Validate Data Structure"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; + new GuiBitmapBorderCtrl() { + isContainer = "1"; + Profile = "ToolsGuiGroupBorderProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "10 110"; - Extent = "200 13"; - MinExtent = "8 2"; + position = "514 92"; + Extent = "182 294"; + MinExtent = "8 8"; canSave = "1"; Visible = "1"; - variable = "$Assimp::ValidateDataStructure"; tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Perform a full validation of the loader's output."; hovertime = "1000"; - internalName = "overrideScale"; canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Improve Cache Locality"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 130"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::ImproveCacheLocality"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Improve the cache locality of the output vertices."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Convert To Left Handed"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 10"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Converts the model to left-handed"; + hovertime = "1000"; + internalName = "convertLeftHanded"; + canSaveDynamicFields = "0"; + }; - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Remove Redundant Materials"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 150"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::RemoveRedundantMaterials"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Removes redundant materials."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Find Degenerates"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 170"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::FindDegenerates"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Remove degenerated polygons from the import."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Find Invalid Data"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 190"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::FindInvalidData"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Detect invalid model data, such as invalid normal vectors."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Generate UV Coordinates"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 210"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::GenUVCoords"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Convert spherical, cylindrical, box and planar mapping to proper UVs."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Transform UV Coordinates"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 230"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::TransformUVCoords"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Preprocess UV transformations (scaling, translation ...)"; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Flip UV Coordinates"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 250"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::FlipUVs"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.\nAssimp uses TL(0,0):BR(1,1). T3D uses TL(0,1):BR(1,0). This will be needed for most textured models."; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Find Instances"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 270"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::FindInstances"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "search for instanced meshes and remove them by references to one master."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Limit Bone Weights"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 290"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::LimitBoneWeights"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Limit bone weights to 4 per vertex."; - hovertime = "1000"; - internalName = "overrideScale"; - canSaveDynamicFields = "0"; + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Calculate Tangent Space"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 30"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Calculate tangents and bitangents, if possible."; + hovertime = "1000"; + internalName = "calcTangentSpace"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Remove Redundant Materials"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 50"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Removes redundant materials."; + hovertime = "1000"; + internalName = "removeRedundantMats"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Generate UV Coordinates"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 70"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Convert spherical, cylindrical, box and planar mapping to proper UVs."; + hovertime = "1000"; + internalName = "genUVCoords"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Transform UV Coordinates"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 90"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Preprocess UV transformations (scaling, translation ...)"; + hovertime = "1000"; + internalName = "transformUVCoords"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Flip UV Coordinates"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 110"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.\nAssimp uses TL(0,0):BR(1,1). T3D uses TL(0,1):BR(1,0). This will be needed for most textured models."; + hovertime = "1000"; + internalName = "flipUVCoords"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Find Instances"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 130"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "search for instanced meshes and remove them by references to one master."; + hovertime = "1000"; + internalName = "findInstances"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Limit Bone Weights"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 150"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Limit bone weights to 4 per vertex."; + hovertime = "1000"; + internalName = "limitBoneWeights"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Join Identical Vertices"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 170"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Identifies and joins identical vertex data sets within all imported meshes."; + hovertime = "1000"; + internalName = "joinIdenticalVerts"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Flip Winding Order"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 190"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + internalName = "reverseWindingOrder"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "This step adjusts the output face winding order to be clockwise. The default face winding order is counter clockwise."; + hovertime = "1000"; + canSaveDynamicFields = "0"; + }; + + new GuiCheckBoxCtrl() { + useInactiveState = "0"; + text = " Invert Normals"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + isContainer = "0"; + Profile = "ToolsGuiCheckBoxProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "10 210"; + Extent = "170 13"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Reverse the normal vector direction for all normals."; + hovertime = "1000"; + internalName = "invertNormals"; + canSaveDynamicFields = "0"; + }; }; - new GuiTextCtrl() { - text = "Animation Timing:"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 311"; - Extent = "85 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - new GuiPopUpMenuCtrl() { - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiPopUpMenuProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "100 310"; - Extent = "86 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Select the timing units used in the animation data."; - hovertime = "1000"; - internalName = "animTiming"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "FPS:"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "200 311"; - Extent = "20 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - new GuiTextEditCtrl() { - historySize = "0"; - password = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - passwordMask = "*"; - text = "2"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "225 310"; - Extent = "26 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Frames per second for all animations when Animation Timing type is Frames (5 - 60)"; - hovertime = "1000"; - internalName = "animFPS"; - canSaveDynamicFields = "0"; - }; - - new GuiTextCtrl() { - text = "LOD"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "210 31"; - Extent = "22 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - new GuiPopUpMenuCtrl() { - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiPopUpMenuProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "238 30"; - Extent = "92 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Method used to determine LOD for meshes in the model"; - hovertime = "1000"; - internalName = "lodType"; - canSaveDynamicFields = "0"; - }; - new GuiTextEditCtrl() { - historySize = "0"; - password = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - passwordMask = "*"; - text = "2"; - maxLength = "1024"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "338 30"; - Extent = "49 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Detail size for all meshes in this model (when LOD type is SingleSize)"; - hovertime = "1000"; - internalName = "singleDetailSize"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Center Model"; + new GuiButtonCtrl() { + text = "Load Settings"; groupNum = "-1"; - buttonType = "ToggleButton"; + buttonType = "PushButton"; useMouseEvents = "0"; isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "210 50"; - Extent = "200 13"; + position = "269 394"; + Extent = "86 22"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; - variable = "$Assimp::adjustCenter"; + Command = "AssimpImportDlg.onLoadSettings();"; tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Translates model so the origin is at the center"; hovertime = "1000"; canSaveDynamicFields = "0"; }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Floor Model"; + new GuiButtonCtrl() { + text = "Save Settings"; groupNum = "-1"; - buttonType = "ToggleButton"; + buttonType = "PushButton"; useMouseEvents = "0"; isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; + Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "210 70"; - Extent = "200 13"; + position = "377 394"; + Extent = "86 22"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; - variable = "$Assimp::adjustFloor"; + Command = "AssimpImportDlg.onSaveSettings();"; tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Translates model so the origin is at the bottom"; hovertime = "1000"; canSaveDynamicFields = "0"; }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Join Identical Vertices"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "210 90"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::JoinIdenticalVertices"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Identifies and joins identical vertex data sets within all imported meshes."; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Flip Winding Order"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "210 110"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::FlipWindingOrder"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "This step adjusts the output face winding order to be clockwise. The default face winding order is counter clockwise."; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Invert Normals"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "210 130"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::FlipNormals"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Reverse the normal vector direction for all normals."; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - - new GuiCheckBoxCtrl() { - useInactiveState = "0"; - text = " Force update materials.cs"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "210 150"; - Extent = "200 13"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - variable = "$Assimp::ForceUpdateMats"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Forces update of materials.cs (even if Materials already exist)"; - hovertime = "1000"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { text = "OK"; groupNum = "-1"; @@ -714,7 +1475,8 @@ Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "120 348"; + //position = "320 440"; + position = "485 394"; Extent = "86 22"; MinExtent = "8 2"; canSave = "1"; @@ -734,91 +1496,18 @@ Profile = "ToolsGuiButtonProfile"; HorizSizing = "right"; VertSizing = "bottom"; - position = "220 348"; + position = "593 394"; Extent = "86 22"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; Command = "AssimpImportDlg.onCancel();"; tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Exit without loading the COLLADA model"; + ToolTip = "Exit without loading the model"; hovertime = "1000"; canSaveDynamicFields = "0"; }; }; }; //--- OBJECT WRITE END --- - -function AssimpImportDlg::showDialog(%this, %shapePath, %cmd) -{ - %this.path = %shapePath; - %this.cmd = %cmd; - - if ($Assimp::OverrideUpAxis $= "") - { // First load, so set best-case defaults - $Assimp::OverrideUpAxis = 1; // y-axis is up in most test shapes - $Assimp::lodType = 0; // DetectDTS - $Assimp::singleDetailSize = "2"; - - // $Assimp::FlipUVs will be needed for virtually all textured models - $Assimp::FlipUVs = true; - $Assimp::FlipWindingOrder = true; // Makes winding order clock wise - $Assimp::FindDegenerates = true; - $Assimp::FindInvalidData = true; - $Assimp::JoinIdenticalVertices = true; - $Assimp::FlipNormals = false; - - $Assimp::AnimTiming = 1; // Seconds - $Assimp::AnimFPS = 30; // Framerate when timing is frames. - } - - %this-->upAxis.clear(); - %this-->upAxis.add("X_AXIS", 0); - %this-->upAxis.add("Y_AXIS", 1); - %this-->upAxis.add("Z_AXIS", 2); - %this-->upAxis.setSelected($Assimp::OverrideUpAxis); - - %this-->lodType.clear(); - %this-->lodType.add("DetectDTS", 0); - %this-->lodType.add("SingleSize", 1); - %this-->lodType.add("TrailingNumber", 2); - %this-->lodType.setSelected($Assimp::lodType); - %this-->singleDetailSize.text = $Assimp::singleDetailSize; - - %this-->animTiming.clear(); - %this-->animTiming.add("Frames", 0); - %this-->animTiming.add("Seconds", 1); - %this-->animTiming.add("Milliseconds", 1000); - %this-->animTiming.setSelected($Assimp::AnimTiming); - %this-->animFPS.text = $Assimp::AnimFPS; - - //Triangulate is a default(currently mandatory) behavior - $Assimp::Triangulate = true; - - Canvas.pushDialog(%this); -} - -function AssimpImportDlg::onCancel(%this) -{ - Canvas.popDialog(%this); - ColladaImportTreeView.clear(); -} - -function AssimpImportDlg::onOK(%this) -{ - Canvas.popDialog(%this); - ColladaImportTreeView.clear(); - - $Assimp::OverrideUpAxis = %this-->upAxis.getSelected(); - - $Assimp::lodType = %this-->lodType.getSelected(); - $Assimp::singleDetailSize = %this-->singleDetailSize.getText(); - - $Assimp::AnimTiming = %this-->animTiming.getSelected(); - $Assimp::AnimFPS = %this-->animFPS.getText(); - - // Load the shape (always from the DAE) - $assimp::forceLoad = true; - eval(%this.cmd); - $assimp::forceLoad = true; -} \ No newline at end of file +exec("./assimpImport.ed.cs"); diff --git a/Templates/Full/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui b/Templates/Full/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui index b73fe709e..eb7a3225a 100644 --- a/Templates/Full/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui +++ b/Templates/Full/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui @@ -489,14 +489,14 @@ Profile = "ToolsGuiCheckBoxProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "135 27"; + Position = "133 27"; Extent = "72 13"; Variable = "EWorldEditor.forceLoadDAE"; Command = "EWorldEditor.forceLoadDAE = $ThisControl.getValue(); EditorSettings.setValue(\"forceLoadDAE\", EWorldEditor.forceLoadDAE);"; tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Forces loading of DAE files (ignores cached.dts if present)"; hovertime = "1000"; - text = " Force DAE"; + text = " Source Art"; }; }; diff --git a/Templates/Full/game/tools/shapeEditor/scripts/shapeEditor.ed.cs b/Templates/Full/game/tools/shapeEditor/scripts/shapeEditor.ed.cs index 1e5f896cb..dbdda94b9 100644 --- a/Templates/Full/game/tools/shapeEditor/scripts/shapeEditor.ed.cs +++ b/Templates/Full/game/tools/shapeEditor/scripts/shapeEditor.ed.cs @@ -227,6 +227,9 @@ function ShapeEditor::saveChanges( %this ) function ShapeEditor::findConstructor( %this, %path ) { + if (!isObject(TSShapeConstructorGroup)) + return -1; + %count = TSShapeConstructorGroup.getCount(); for ( %i = 0; %i < %count; %i++ ) {