diff --git a/Engine/source/ts/tsShapeConstruct.cpp b/Engine/source/ts/tsShapeConstruct.cpp index 9acba6cbe..8b38d44e5 100644 --- a/Engine/source/ts/tsShapeConstruct.cpp +++ b/Engine/source/ts/tsShapeConstruct.cpp @@ -2155,13 +2155,15 @@ DefineTSShapeConstructorMethod(addSequence, bool, StringTableEntry assetType = AssetDatabase.getAssetType(assetId); if (assetType == StringTable->insert("ShapeAsset")) { - AssetPtr asset = assetId; + ShapeAsset* asset = AssetDatabase.acquireAsset(assetId); srcPath = asset->getShapeFile(); + AssetDatabase.releaseAsset(assetId); } else if (assetType == StringTable->insert("ShapeAnimationAsset")) { - AssetPtr asset = assetId; + ShapeAnimationAsset* asset = AssetDatabase.acquireAsset(assetId); srcPath = asset->getAnimationPath(); + AssetDatabase.releaseAsset(assetId); } } diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shapeAnimation.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shapeAnimation.tscript index 5f8d967e1..fbfa4e2db 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shapeAnimation.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shapeAnimation.tscript @@ -9,7 +9,7 @@ function ShapeAnimationAsset::onEdit(%this) function ShapeAnimationAsset::buildBrowserElement(%this, %previewData) { - %previewData.assetName = %this.animationName; + %previewData.assetName = %this.assetName; %previewData.assetPath = %this.scriptFile; %previewData.previewImage = "ToolsModule:animationIcon_image"; diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAddSequenceGui.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAddSequenceGui.gui new file mode 100644 index 000000000..72a681244 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAddSequenceGui.gui @@ -0,0 +1,136 @@ +//--- OBJECT WRITE BEGIN --- +$guiContent = new GuiControl(shapeEdAddSequenceGui) { + extent = "1920 1200"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + isContainer = "1"; + canSaveDynamicFields = "1"; + enabled = "1"; + + new GuiWindowCtrl(shapeEdAddSequenceWindow) { + Text = "Add New Sequence"; + resizeWidth = "0"; + resizeHeight = "0"; + canMinimize = "0"; + canMaximize = "0"; + closeCommand = "Canvas.popDialog(shapeEdAddSequenceGui);"; + position = "767 500"; + extent = "386 126"; + minExtent = "48 92"; + horizSizing = "center"; + vertSizing = "center"; + profile = "ToolsGuiWindowProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + + new GuiContainer() { + position = "0 16"; + extent = "386 82"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + + new GuiTextCtrl() { + Text = "Sequence Name"; + position = "16 14"; + extent = "101 16"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiTextEditCtrl() { + maxLength = "256"; + position = "127 13"; + extent = "228 20"; + horizSizing = "width"; + profile = "ToolsGuiTextEditProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Name of the new sequence"; + isContainer = "0"; + internalName = "seqName"; + }; + new GuiTextCtrl() { + Text = "Source"; + position = "6 34"; + extent = "48 18"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; + ToolTip = "Animation source data"; + }; + new GuiTextEditCtrl() { + position = "67 35"; + extent = "182 20"; + horizSizing = "width"; + profile = "ToolsGuiTextEditProfile"; + active = "0"; + tooltipProfile = "GuiToolTipProfile"; + ToolTip = "Animation source data"; + internalName = "sourceSeq"; + }; + new GuiTextCtrl() { + Text = "in"; + position = "71 54"; + extent = "11 16"; + horizSizing = "left"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiPopUpMenuCtrl() { + position = "252 35"; + extent = "104 18"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuProfile"; + tooltipProfile = "GuiToolTipProfile"; + ToolTip = "Animation Source Sequence"; + internalName = "fromSeqName"; + }; + new GuiTextEditCtrl() { + Text = "0"; + position = "87 53"; + extent = "32 20"; + horizSizing = "left"; + profile = "ToolsGuiTextEditProfile"; + altCommand = "ShapeEdSequences.onEditSeqInOut(\"in\", $ThisControl.getText());"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "startFrame"; + }; + new GuiTextCtrl() { + Text = "out"; + position = "126 54"; + extent = "18 16"; + horizSizing = "left"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiTextEditCtrl() { + Text = "0"; + position = "146 53"; + extent = "32 20"; + horizSizing = "left"; + profile = "ToolsGuiTextEditProfile"; + altCommand = "ShapeEdSequences.onEditSeqInOut(\"out\", $ThisControl.getText());"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "endFrame"; + }; + }; + new GuiButtonCtrl() { + Text = "OK"; + position = "224 96"; + extent = "79 22"; + horizSizing = "left"; + vertSizing = "top"; + profile = "ToolsGuiButtonProfile"; + command = "onShapeEditorDoAddNewSequence();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + }; + new GuiButtonCtrl() { + Text = "Cancel"; + position = "309 96"; + extent = "64 22"; + horizSizing = "left"; + vertSizing = "top"; + profile = "ToolsGuiButtonProfile"; + command = "Canvas.popDialog(shapeEdAddSequenceGui);"; + tooltipProfile = "ToolsGuiToolTipProfile"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAddSequenceGui.tscript b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAddSequenceGui.tscript new file mode 100644 index 000000000..1431cd3bc --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAddSequenceGui.tscript @@ -0,0 +1,58 @@ +function shapeEdAddSequenceGui::show(%seqSourceData) +{ + shapeEdAddSequenceWindow-->seqName.setText(ShapeEdSequences.newSeqName); + shapeEdAddSequenceWindow-->sourceSeq.setText(%seqSourceData); + + shapeEdAddSequenceWindow-->startFrame.setText("0"); + shapeEdAddSequenceWindow-->endFrame.setText("-1"); + + Canvas.pushDialog(shapeEdAddSequenceGui); +} + +function shapeEdAddSequenceWindow::onWake(%this) +{ + %sourceSeq = %this-->sourceSeq.getText(); + + if(AssetDatabase.isDeclaredAsset(%sourceSeq)) + { + %sourceShapeConstructor = findShapeConstructorByAssetId( %sourceSeq ); + } + else if(isFile(%sourceSeq)) + { + %sourceShapeConstructor = findShapeConstructorByFilename( %sourceSeq ); + } + else + { + toolsMessageBoxOK("Error!", "Source animation data appears to not be valid. Please close the window and select a different source."); + return; + } + + if(!isObject(%sourceShapeConstructor)) + { + toolsMessageBoxOK("Error!", "Unable to find shape constructor for source animation data. Please close the window and select a different source, or make sure the constructor is valid."); + return; + } + + for(%i=0; %i < %sourceShapeConstructor.getSequenceCount(); %i++) + { + %name = %sourceShapeConstructor.getSequenceName( %i ); + + // Ignore __backup__ sequences (only used by editor) + if ( !startswith( %name, "__backup__" ) ) + %this-->fromSeqName.add( %name ); + } + + %this-->fromSeqName.setSelected(0); +} + +function onShapeEditorDoAddNewSequence() +{ + %seqName = shapeEdAddSequenceWindow-->seqName.getText(); + %seqSource = shapeEdAddSequenceWindow-->sourceSeq.getText() TAB shapeEdAddSequenceWindow-->fromSeqName.getText(); + %startFrame = shapeEdAddSequenceWindow-->startFrame.getText(); + %endFrame = shapeEdAddSequenceWindow-->endFrame.getText(); + + ShapeEditor.doAddSequence(%seqName, %seqSource, %startFrame, %endFrame); + + Canvas.popDialog(shapeEdAddSequenceGui); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui index 956861dc4..696e591b6 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui @@ -1,12 +1,4 @@ -// Let's check if the ShapeEdAdvancedWindow can be stacked in the side panel -if (getWord($pref::Video::mode, 1) > 899 && isObject(ShapeEdSelectWindow) && isObject(ShapeEdPropWindow)) -{ - $ShapeEdAdvancedWindowPos = getWord($pref::Video::mode, 0) - 360 SPC getWord(ShapeEdSelectWindow.extent, 1) + getWord(ShapeEdPropWindow.extent, 1) + getWord(EditorGuiToolbar.extent, 1) + 12 - 7; -} -else -{ - $ShapeEdAdvancedWindowPos = getWord($pref::Video::mode, 0) - 720 SPC getWord(EditorGuiToolbar.extent, 1) + 6 - 7; -} +$ShapeEdAdvancedWindowPos = getWord($pref::Video::mode, 0) - 720 SPC getWord(EditorGuiToolbar.extent, 1) + 6 - 7; //--- OBJECT WRITE BEGIN --- $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { @@ -105,8 +97,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { ticks = "1"; snap = "1"; value = "0"; - position = "57 22"; - extent = "1178 14"; + position = "68 22"; + extent = "251 14"; horizSizing = "width"; profile = "ToolsGuiSliderBoxProfile"; variable = "ShapeEdShapeView.currentDL"; @@ -116,9 +108,9 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiBitmapCtrl() { BitmapAsset = "ToolsModule:inactive_overlay_image"; - position = "57 19"; - extent = "290 20"; - profile = "GuiDefaultProfile"; + position = "68 19"; + extent = "279 20"; + profile = "ToolsGuiDefaultProfile"; tooltipProfile = "GuiToolTipProfile"; tooltip = "Levels needs to be selected to enable the detail level slider"; hovertime = "500"; @@ -138,14 +130,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Polys"; - position = "37 40"; + position = "45 40"; extent = "26 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { text = "0"; - position = "77 40"; + position = "86 40"; extent = "40 16"; profile = "ToolsGuiTextProfile"; variable = "ShapeEdShapeView.detailPolys"; @@ -154,14 +146,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Size"; - position = "127 40"; + position = "159 40"; extent = "24 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextEditCtrl() { - position = "160 39"; - extent = "35 20"; + position = "192 40"; + extent = "35 16"; profile = "ToolsGuiTextEditProfile"; variable = "ShapeEdShapeView.detailSize"; altCommand = "ShapeEdAdvancedWindow.onEditDetailSize();"; @@ -171,14 +163,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Pixels"; - position = "35 60"; + position = "43 60"; extent = "28 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { text = "0"; - position = "77 60"; + position = "85 60"; extent = "40 16"; profile = "ToolsGuiTextProfile"; variable = "ShapeEdShapeView.pixelSize"; @@ -187,14 +179,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Distance"; - position = "109 60"; - extent = "42 16"; + position = "130 60"; + extent = "53 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { text = "5"; - position = "160 60"; + position = "192 60"; extent = "38 16"; profile = "ToolsGuiTextProfile"; variable = "ShapeEdShapeView.orbitDist"; @@ -204,13 +196,13 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { new GuiTextCtrl() { text = "Materials"; position = "20 80"; - extent = "43 16"; + extent = "52 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { text = "0"; - position = "77 80"; + position = "85 80"; extent = "40 16"; profile = "ToolsGuiTextProfile"; variable = "ShapeEdShapeView.numMaterials"; @@ -219,14 +211,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Bones"; - position = "120 80"; - extent = "31 16"; + position = "144 80"; + extent = "39 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { text = "0"; - position = "160 80"; + position = "192 80"; extent = "38 16"; profile = "ToolsGuiTextProfile"; variable = "ShapeEdShapeView.numBones"; @@ -235,14 +227,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Primitives"; - position = "19 100"; - extent = "44 16"; + position = "15 100"; + extent = "56 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { text = "0"; - position = "77 100"; + position = "85 100"; extent = "40 16"; profile = "ToolsGuiTextProfile"; variable = "ShapeEdShapeView.numDrawCalls"; @@ -251,14 +243,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Weights"; - position = "109 100"; - extent = "42 16"; + position = "134 100"; + extent = "49 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextCtrl() { text = "0"; - position = "160 100"; + position = "192 100"; extent = "38 16"; profile = "ToolsGuiTextProfile"; variable = "ShapeEdShapeView.numWeights"; @@ -267,31 +259,31 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Col Meshes"; - position = "7 120"; - extent = "56 16"; + position = "4 120"; + extent = "67 16"; profile = "ToolsGuiTextProfile"; tooltipProfile = "GuiToolTipProfile"; }; new GuiTextCtrl() { text = "0"; - position = "74 120"; + position = "82 120"; extent = "40 16"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; variable = "ShapeEdShapeView.colMeshes"; tooltipProfile = "GuiToolTipProfile"; }; new GuiTextCtrl() { text = "Col Polys"; - position = "108 120"; - extent = "43 16"; + position = "128 120"; + extent = "55 16"; profile = "ToolsGuiTextProfile"; tooltipProfile = "GuiToolTipProfile"; }; new GuiTextCtrl() { text = "0"; - position = "160 120"; + position = "192 120"; extent = "38 16"; - profile = "GuiTextProfile"; + profile = "ToolsGuiTextProfile"; variable = "ShapeEdShapeView.colPolys"; tooltipProfile = "GuiToolTipProfile"; }; @@ -314,7 +306,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { new GuiCheckBoxCtrl() { text = "Use Imposters"; position = "72 2"; - extent = "83 13"; + extent = "104 13"; profile = "ToolsGuiCheckBoxProfile"; command = "ShapeEdDetails.onToggleImposter( $ThisControl.getValue() );"; tooltipProfile = "ToolsGuiToolTipProfile"; @@ -324,13 +316,13 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { new GuiTextCtrl() { text = "Detail Level"; position = "6 23"; - extent = "57 16"; + extent = "64 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; isContainer = "0"; }; new GuiTextEditCtrl() { - position = "68 22"; + position = "80 22"; extent = "36 20"; profile = "ToolsGuiTextEditProfile"; altCommand = "ShapeEdDetails.onEditImposter();"; @@ -340,13 +332,13 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Dimension"; - position = "6 43"; - extent = "57 16"; + position = "13 43"; + extent = "59 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextEditCtrl() { - position = "72 43"; + position = "80 43"; extent = "36 20"; profile = "ToolsGuiTextEditProfile"; altCommand = "ShapeEdDetails.onEditImposter();"; @@ -356,13 +348,13 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "X Steps"; - position = "6 65"; + position = "13 65"; extent = "57 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; }; new GuiTextEditCtrl() { - position = "68 64"; + position = "81 64"; extent = "36 20"; profile = "ToolsGuiTextEditProfile"; altCommand = "ShapeEdDetails.onEditImposter();"; @@ -372,8 +364,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiCheckBoxCtrl() { text = "Include Poles"; - position = "113 24"; - extent = "83 18"; + position = "129 24"; + extent = "97 18"; profile = "ToolsGuiCheckBoxProfile"; command = "ShapeEdDetails.onEditImposter();"; tooltipProfile = "ToolsGuiToolTipProfile"; @@ -382,15 +374,15 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Y Steps"; - position = "116 44"; - extent = "41 16"; + position = "130 44"; + extent = "45 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; tooltip = "Number of steps in the vertical axis"; isContainer = "0"; }; new GuiTextEditCtrl() { - position = "161 43"; + position = "185 43"; extent = "36 20"; profile = "ToolsGuiTextEditProfile"; altCommand = "ShapeEdDetails.onEditImposter();"; @@ -399,14 +391,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Y Angle"; - position = "116 65"; - extent = "41 16"; + position = "130 65"; + extent = "44 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; tooltip = "Polar Angle - Y axis"; }; new GuiTextEditCtrl() { - position = "161 64"; + position = "185 64"; extent = "36 20"; profile = "ToolsGuiTextEditProfile"; altCommand = "ShapeEdDetails.onEditImposter();"; @@ -416,8 +408,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { new GuiBitmapCtrl() { BitmapAsset = "ToolsModule:inactive_overlay_image"; position = "4 18"; - extent = "193 68"; - profile = "GuiDefaultProfile"; + extent = "246 68"; + profile = "ToolsGuiDefaultProfile"; tooltipProfile = "GuiToolTipProfile"; tooltip = "Imposters must be enabled, and an imposter detail level selected to edit these properties"; hovertime = "500"; @@ -491,15 +483,15 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { position = "1 1"; extent = "1242 11"; minExtent = "8 11"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiDefaultProfile"; command = "ShapeEdMountWindow.update_onMountSelectionChanged();"; tooltipProfile = "ToolsGuiToolTipProfile"; internalName = "mountList"; }; }; new GuiContainer() { - position = "0 579"; - extent = "1244 85"; + position = "0 159"; + extent = "324 85"; horizSizing = "width"; vertSizing = "top"; profile = "inspectorStyleRolloutDarkProfile"; @@ -514,7 +506,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiBitmapButtonCtrl() { BitmapAsset = "ToolsModule:delete_n_image"; - position = "1224 1"; + position = "286 1"; extent = "16 16"; horizSizing = "left"; profile = "ToolsGuiDefaultProfile"; @@ -524,7 +516,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiBitmapButtonCtrl() { BitmapAsset = "ToolsModule:new_n_image"; - position = "1210 1"; + position = "305 1"; extent = "16 16"; horizSizing = "left"; profile = "ToolsGuiDefaultProfile"; @@ -535,14 +527,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { new GuiTextCtrl() { text = "Shape"; position = "5 21"; - extent = "33 16"; + extent = "38 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "GuiToolTipProfile"; }; new GuiPopUpMenuCtrl(ShapeEdMountShapeMenu) { text = "Browse..."; - position = "42 20"; - extent = "1198 18"; + position = "54 20"; + extent = "266 18"; horizSizing = "width"; profile = "ToolsGuiPopUpMenuProfile"; tooltipProfile = "GuiToolTipProfile"; @@ -551,13 +543,13 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { new GuiTextCtrl() { text = "Node"; position = "5 42"; - extent = "33 16"; + extent = "31 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "GuiToolTipProfile"; }; new GuiPopUpMenuCtrl() { - position = "42 41"; - extent = "1104 18"; + position = "53 41"; + extent = "163 18"; horizSizing = "width"; profile = "ToolsGuiPopUpMenuProfile"; command = "ShapeEdMountWindow.updateSelectedMount();"; @@ -567,15 +559,15 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Type"; - position = "1152 42"; - extent = "24 16"; + position = "229 42"; + extent = "29 16"; horizSizing = "left"; profile = "ToolsGuiTextProfile"; tooltipProfile = "GuiToolTipProfile"; }; new GuiPopUpMenuCtrl() { text = "Image"; - position = "1180 41"; + position = "260 41"; extent = "60 18"; horizSizing = "left"; profile = "ToolsGuiPopUpMenuProfile"; @@ -587,7 +579,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { new GuiPopUpMenuCtrl() { text = ""; position = "5 62"; - extent = "1141 18"; + extent = "112 18"; horizSizing = "width"; profile = "ToolsGuiPopUpMenuProfile"; command = "ShapeEdMountWindow.setMountThreadSequence();"; @@ -598,8 +590,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { new GuiSliderCtrl(ShapeEdMountSeqSlider) { ticks = "0"; value = "0"; - position = "109 64"; - extent = "1110 14"; + position = "120 64"; + extent = "179 14"; horizSizing = "width"; vertSizing = "top"; profile = "ToolsGuiSliderBoxProfile"; @@ -610,7 +602,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { BitmapAsset = "ToolsModule:playfwd_btn_n_image"; groupNum = "0"; buttonType = "ToggleButton"; - position = "1222 62"; + position = "302 62"; extent = "18 18"; horizSizing = "left"; vertSizing = "top"; @@ -626,7 +618,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { new GuiTabPageCtrl() { text = "Threads"; position = "0 19"; - extent = "1262 663"; + extent = "342 243"; minExtent = "0 -500"; horizSizing = "width"; vertSizing = "height"; @@ -637,14 +629,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { new GuiContainer(ShapeEdThreadWindow) { docking = "Client"; - extent = "1262 663"; + extent = "342 243"; minExtent = "8 8"; horizSizing = "width"; profile = "ToolsGuiDefaultProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; new GuiContainer() { - extent = "1263 580"; + extent = "343 160"; horizSizing = "width"; vertSizing = "height"; profile = "inspectorStyleRolloutDarkProfile"; @@ -663,7 +655,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { lockHorizScroll = "1"; anchorTop = "0"; position = "0 17"; - extent = "47 563"; + extent = "47 143"; minExtent = "8 8"; vertSizing = "height"; profile = "GuiScrollProfile"; @@ -674,14 +666,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { position = "1 1"; extent = "45 11"; minExtent = "8 11"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiDefaultProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; }; }; new GuiTextCtrl() { text = "Sequence"; position = "52 1"; - extent = "53 16"; + extent = "63 16"; profile = "ToolsGuiTextProfile"; tooltipProfile = "GuiToolTipProfile"; }; @@ -691,7 +683,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { lockHorizScroll = "1"; anchorTop = "0"; position = "46 17"; - extent = "1262 563"; + extent = "342 143"; minExtent = "8 8"; horizSizing = "width"; vertSizing = "height"; @@ -703,7 +695,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { position = "1 1"; extent = "1260 11"; minExtent = "8 11"; - profile = "GuiDefaultProfile"; + profile = "ToolsGuiDefaultProfile"; command = "ShapeEdSequenceList.setSelectedById( $ThisControl.getSelectedId() );"; tooltipProfile = "ToolsGuiToolTipProfile"; internalName = "seqList"; @@ -711,7 +703,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiBitmapButtonCtrl() { BitmapAsset = "ToolsModule:delete_n_image"; - position = "1244 1"; + position = "324 1"; extent = "16 16"; horizSizing = "left"; profile = "ToolsGuiDefaultProfile"; @@ -721,7 +713,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiBitmapButtonCtrl() { BitmapAsset = "ToolsModule:new_n_image"; - position = "1231 1"; + position = "311 1"; extent = "16 16"; horizSizing = "left"; profile = "ToolsGuiDefaultProfile"; @@ -734,8 +726,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { range = "0 0"; ticks = "0"; value = "0"; - position = "29 585"; - extent = "1193 14"; + position = "29 163"; + extent = "273 14"; horizSizing = "width"; vertSizing = "top"; profile = "ToolsGuiSliderBoxProfile"; @@ -746,7 +738,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { BitmapAsset = "ToolsModule:playbkwd_btn_n_image"; groupNum = "0"; buttonType = "RadioButton"; - position = "6 583"; + position = "6 163"; extent = "18 18"; vertSizing = "top"; profile = "ToolsGuiButtonProfile"; @@ -759,7 +751,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { BitmapAsset = "ToolsModule:pause_btn_n_image"; groupNum = "0"; buttonType = "RadioButton"; - position = "1226 583"; + position = "306 163"; extent = "18 18"; horizSizing = "left"; vertSizing = "top"; @@ -773,7 +765,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { BitmapAsset = "ToolsModule:playfwd_btn_n_image"; groupNum = "0"; buttonType = "RadioButton"; - position = "1244 583"; + position = "324 163"; extent = "18 18"; horizSizing = "left"; vertSizing = "top"; @@ -785,8 +777,9 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiCheckBoxCtrl() { text = " Transition lasts"; - position = "3 606"; - extent = "88 13"; + position = "3 186"; + extent = "109 13"; + horizSizing = "right"; vertSizing = "top"; profile = "ToolsGuiCheckBoxProfile"; tooltipProfile = "ToolsGuiToolTipProfile"; @@ -795,8 +788,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextEditCtrl() { text = "0.5"; - position = "98 603"; - extent = "1109 20"; + position = "116 183"; + extent = "161 20"; horizSizing = "width"; vertSizing = "top"; profile = "ToolsGuiTextEditProfile"; @@ -806,8 +799,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "seconds"; - position = "1213 604"; - extent = "44 16"; + position = "284 184"; + extent = "57 16"; horizSizing = "left"; vertSizing = "top"; profile = "ToolsGuiTextProfile"; @@ -815,16 +808,17 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Transition to"; - position = "4 625"; - extent = "62 16"; + position = "4 205"; + extent = "74 16"; + horizSizing = "right"; vertSizing = "top"; profile = "ToolsGuiTextProfile"; tooltipProfile = "GuiToolTipProfile"; }; new GuiPopUpMenuCtrl() { text = "synched position"; - position = "68 624"; - extent = "1193 18"; + position = "87 204"; + extent = "254 18"; horizSizing = "width"; vertSizing = "top"; profile = "ToolsGuiPopUpMenuProfile"; @@ -834,16 +828,16 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "Target anim"; - position = "4 646"; - extent = "58 16"; + position = "4 226"; + extent = "76 16"; vertSizing = "top"; profile = "ToolsGuiTextProfile"; tooltipProfile = "GuiToolTipProfile"; }; new GuiPopUpMenuCtrl() { text = "plays during transition"; - position = "68 645"; - extent = "1193 18"; + position = "88 225"; + extent = "253 18"; horizSizing = "width"; vertSizing = "top"; profile = "ToolsGuiPopUpMenuProfile"; @@ -938,7 +932,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "4"; - position = "320 71"; + position = "317 71"; extent = "25 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "GuiToolTipProfile"; @@ -966,7 +960,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "10"; - position = "320 92"; + position = "317 92"; extent = "25 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "GuiToolTipProfile"; @@ -994,7 +988,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "30"; - position = "320 113"; + position = "317 113"; extent = "25 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "GuiToolTipProfile"; @@ -1022,7 +1016,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "32"; - position = "320 134"; + position = "317 134"; extent = "25 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "GuiToolTipProfile"; @@ -1050,7 +1044,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "30"; - position = "320 155"; + position = "317 155"; extent = "25 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "GuiToolTipProfile"; @@ -1078,7 +1072,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "30"; - position = "320 176"; + position = "317 176"; extent = "25 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "GuiToolTipProfile"; @@ -1106,7 +1100,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow,EditorGuiGroup) { }; new GuiTextCtrl() { text = "30"; - position = "320 197"; + position = "317 197"; extent = "25 16"; profile = "ToolsGuiTextRightProfile"; tooltipProfile = "GuiToolTipProfile"; diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui index 12e648cae..c986f15d9 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui @@ -5,8 +5,8 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) { Profile = "ToolsGuiToolbarWindowProfile"; HorizSizing = "width"; VertSizing = "top"; - Position = "1" SPC getWord($pref::Video::mode, 1) - 160; - Extent = "817 53"; + Position = "1" SPC getWord($pref::Video::mode, 1) - EditorGuiStatusBar.extent.y - 53; + Extent = getWord($pref::Video::mode, 1) - ShapeEdPropWindow.Extent.x SPC 53; MinExtent = "475 53"; canSave = "1"; Visible = "1"; diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui index cdd11a566..3aefdef70 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui @@ -7,7 +7,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { VertSizing = "windowRelative"; Position = getWord($pref::Video::mode, 0) - 360 SPC getWord(EditorGuiToolbar.extent, 1) + getWord(ShapeEdSelectWindow.extent, 1) - 2; - Extent = "360 350"; + Extent = "360" SPC getWord($pref::Video::mode, 1) - ShapeEdSelectWindow.Extent.y - EditorGuiToolbar.extent.y - EditorGuiStatusBar.extent.y - 30; MinExtent = "300 350"; canSave = "1"; Visible = "0"; @@ -38,7 +38,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; position = "4 42"; - Extent = "202 437"; + Extent = "347 437"; MinExtent = "8 8"; canSave = "1"; Visible = "1"; @@ -64,7 +64,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 19"; - Extent = "202 418"; + Extent = "347 418"; MinExtent = "0 -500"; canSave = "1"; Visible = "0"; @@ -79,22 +79,13 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { text = "Seq"; maxLength = "1024"; - new GuiContainer() { - isContainer = "1"; - Profile = "GuiInspectorProfile"; - HorizSizing = "width"; - VertSizing = "height"; - Position = "0 0"; - Extent = "202 418"; - MinExtent = "0 8"; - }; new GuiBitmapBorderCtrl() { isContainer = "1"; Profile = "ToolsGuiTabBorderProfile"; HorizSizing = "width"; VertSizing = "height"; Position = "0 0"; - Extent = "202 418"; + Extent = "347 418"; MinExtent = "0 8"; }; @@ -106,7 +97,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 0"; - Extent = "202 211"; + Extent = "347 211"; MinExtent = "8 8"; canSave = "1"; Visible = "1"; @@ -120,7 +111,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 0"; - Extent = "202 211"; + Extent = "347 211"; MinExtent = "8 25"; canSave = "1"; Visible = "1"; @@ -147,7 +138,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "bottom"; Position = "1 1"; - Extent = "200 19"; + Extent = "345 19"; MinExtent = "8 2"; }; new GuiTextListCtrl(ShapeEdSequenceList) { @@ -157,7 +148,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "right"; VertSizing = "bottom"; Position = "0 0"; - Extent = "202 20"; + Extent = "347 20"; MinExtent = "8 11"; canSave = "1"; Visible = "1"; @@ -181,7 +172,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "top"; Position = "0 210"; - Extent = "202 209"; + Extent = "347 209"; MinExtent = "8 11"; canSave = "1"; Visible = "1"; @@ -193,7 +184,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "bottom"; position = "0 0"; - Extent = "202 103"; + Extent = "346 103"; isContainer = true; new GuiTextCtrl() { // Header @@ -209,7 +200,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "right"; VertSizing = "bottom"; position = "16 22"; - Extent = "30 16"; + Extent = "37 16"; text = "Name"; }; new GuiTextEditCtrl() { @@ -220,7 +211,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "bottom"; Position = "55 21"; - Extent = "152 18"; + Extent = "287 18"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; @@ -255,15 +246,22 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiPopUpMenuProfile"; HorizSizing = "width"; VertSizing = "bottom"; - Position = "55 41"; - Extent = "91 18"; + Position = "55 43"; + Extent = "148 18"; + }; + new GuiPopUpMenuCtrl(ShapeEdSeqNameFromMenu) { + Profile = "ToolsGuiPopUpMenuProfile"; + HorizSizing = "left"; + VertSizing = "bottom"; + Position = "205 43"; + Extent = "138 18"; }; // Start Frame new GuiTextCtrl() { Profile = "ToolsGuiTextRightProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "32 62"; + Position = "164 62"; Extent = "11 16"; text = "in"; }; @@ -272,7 +270,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextEditProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "46 61"; + Position = "178 61"; Extent = "32 18"; text = ""; AltCommand = "ShapeEdSequences.onEditSeqInOut(\"in\", $ThisControl.getText());"; @@ -282,7 +280,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextRightProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "85 62"; + Position = "217 62"; Extent = "18 16"; text = "out"; }; @@ -291,7 +289,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextEditProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "105 61"; + Position = "237 61"; Extent = "32 18"; text = ""; AltCommand = "ShapeEdSequences.onEditSeqInOut(\"out\", $ThisControl.getText());"; @@ -302,7 +300,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiCheckBoxProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "143 43"; + Position = "105 63"; Extent = "45 13"; Command = "ShapeEdSequences.onToggleCyclic();"; tooltipprofile = "ToolsGuiToolTipProfile"; @@ -315,7 +313,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextRightProfile"; HorizSizing = "left"; VertSizing = "bottom"; - position = "136 62"; + position = "275 62"; Extent = "41 16"; text = "Priority"; }; @@ -326,8 +324,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextEditProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "179 61"; - Extent = "19 18"; + Position = "320 61"; + Extent = "23 18"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; @@ -368,7 +366,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "bottom"; Position = "60 81"; - Extent = "75 18"; + Extent = "210 18"; tooltip = "Blend reference sequence"; Command = "ShapeEdSequences.onEditBlend();"; }; @@ -378,8 +376,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextRightProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "135 81"; - Extent = "30 18"; + Position = "275 81"; + Extent = "35 18"; text = "Frame"; }; new GuiTextEditCtrl() { @@ -387,7 +385,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextEditProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "175 81"; + Position = "318 81"; Extent = "25 18"; text = ""; tooltip = "Blend reference frame"; @@ -399,7 +397,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "bottom"; position = "0 102"; - Extent = "202 106"; + Extent = "342 106"; isContainer = true; // Triggers @@ -418,7 +416,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiButtonProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "170 2"; + Position = "308 2"; Extent = "15 15"; MinExtent = "8 2"; canSave = "1"; @@ -439,7 +437,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiButtonProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "185 2"; + Position = "325 2"; Extent = "15 15"; MinExtent = "8 2"; canSave = "1"; @@ -461,7 +459,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 17"; - Extent = "202 66"; + Extent = "342 66"; MinExtent = "8 8"; canSave = "1"; Visible = "1"; @@ -475,7 +473,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 0"; - Extent = "202 66"; + Extent = "342 66"; MinExtent = "8 8"; canSave = "1"; Visible = "1"; @@ -501,7 +499,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "bottom"; position = "1 1"; - Extent = "200 19"; + Extent = "340 19"; }; new GuiTextListCtrl(ShapeEdTriggerList) { canSaveDynamicFields = "0"; @@ -509,7 +507,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "right"; VertSizing = "bottom"; Position = "1 1"; - Extent = "177 16"; + Extent = "340 16"; MinExtent = "8 11"; canSave = "1"; Visible = "1"; @@ -537,7 +535,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextEditProfile"; HorizSizing = "right"; VertSizing = "bottom"; - Position = "36 85"; + Position = "48 85"; Extent = "32 18"; text = ""; AltCommand = "ShapeEdTriggerList.onEditSelection();"; @@ -546,8 +544,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; - Position = "75 85"; - Extent = "35 18"; + Position = "87 85"; + Extent = "46 18"; text = "Trigger"; }; new GuiTextEditCtrl() { @@ -555,8 +553,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextEditProfile"; HorizSizing = "right"; VertSizing = "bottom"; - Position = "110 85"; - Extent = "32 18"; + Position = "137 85"; + Extent = "43 18"; text = ""; AltCommand = "ShapeEdTriggerList.onEditSelection();"; }; @@ -565,8 +563,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiCheckBoxProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "150 87"; - Extent = "47 13"; + Position = "290 87"; + Extent = "53 13"; text = "On/off"; Command = "ShapeEdTriggerList.onEditSelection();"; }; @@ -583,7 +581,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 19"; - Extent = "202 418"; + Extent = "342 418"; MinExtent = "0 -500"; canSave = "1"; Visible = "0"; @@ -604,14 +602,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 0"; - Extent = "202 418"; + Extent = "342 418"; MinExtent = "0 8"; }; // Node Filter new GuiTextEditCtrl(NodeTreeFilter) { position = "2 4"; - extent = "175 18"; + extent = "315 18"; profile = "ToolsGuiTextEditProfile"; horizSizing = "width"; vertSizing = "bottom"; @@ -627,7 +625,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiButtonProfile"; HorizSizing = "left"; VertSizing = "bottom"; - position = "180 5"; + position = "320 5"; Extent = "17 17"; MinExtent = "8 2"; canSave = "1"; @@ -647,7 +645,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 32"; - Extent = "202 256"; + Extent = "342 256"; MinExtent = "8 0"; canSave = "1"; Visible = "1"; @@ -699,7 +697,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "top"; position = "0 287"; - Extent = "202 131"; + Extent = "342 131"; isContainer = true; new GuiTextCtrl() { @@ -717,8 +715,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiDefaultProfile"; HorizSizing = "right"; VertSizing = "top"; - Position = "6 18"; - Extent = "50 108"; + Position = "0 18"; + Extent = "56 108"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; @@ -738,7 +736,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { VertSizing = "bottom"; profile = "ToolsGuiTextRightProfile"; position = "10 26"; - Extent = "40 16"; + Extent = "45 16"; text = "Parent"; }; new GuiTextCtrl() { @@ -746,23 +744,23 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { VertSizing = "bottom"; profile = "ToolsGuiTextRightProfile"; position = "-5 49"; - Extent = "54 16"; + Extent = "61 16"; text = "Transform"; }; new GuiTextCtrl() { HorizSizing = "right"; VertSizing = "bottom"; profile = "ToolsGuiTextRightProfile"; - position = "11 73"; - Extent = "39 16"; + position = "11 71"; + Extent = "45 16"; text = "Position"; }; new GuiTextCtrl() { HorizSizing = "right"; VertSizing = "bottom"; profile = "ToolsGuiTextRightProfile"; - position = "8 93"; - Extent = "42 16"; + position = "8 91"; + Extent = "47 16"; text = "Rotation"; }; }; @@ -775,7 +773,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "top"; Position = "49 16"; - Extent = "155 109"; + Extent = "295 109"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; @@ -790,7 +788,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "bottom"; Position = "12 5"; - Extent = "137 18"; + Extent = "277 18"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; @@ -816,7 +814,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "bottom"; Position = "12 25"; - Extent = "137 18"; + Extent = "277 18"; tooltip = "Selected node's parent"; }; new GuiIconButtonCtrl() { @@ -848,9 +846,9 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { canSaveDynamicFields = "0"; isContainer = "0"; Profile = "ToolsGuiIconButtonProfile"; - HorizSizing = "left"; + HorizSizing = "right"; VertSizing = "bottom"; - Position = "84 45"; + Position = "80 45"; Extent = "65 25"; MinExtent = "8 8"; canSave = "1"; @@ -874,8 +872,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextEditProfile"; HorizSizing = "width"; VertSizing = "bottom"; - Position = "12 72"; - Extent = "137 18"; + Position = "12 70"; + Extent = "277 18"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; @@ -903,8 +901,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextEditProfile"; HorizSizing = "width"; VertSizing = "bottom"; - Position = "12 92"; - Extent = "137 18"; + Position = "12 90"; + Extent = "277 18"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; @@ -942,7 +940,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { AnchorLeft = "1"; AnchorRight = "0"; position = "0 19"; - extent = "202 418"; + extent = "342 418"; MinExtent = "0 -500"; HorizSizing = "width"; VertSizing = "height"; @@ -954,7 +952,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { new GuiContainer() { position = "0 0"; - extent = "202 418"; + extent = "342 418"; minExtent = "0 8"; horizSizing = "width"; vertSizing = "height"; @@ -963,7 +961,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { }; new GuiBitmapBorderCtrl() { position = "0 0"; - extent = "202 418"; + extent = "342 418"; minExtent = "0 8"; HorizSizing = "width"; VertSizing = "height"; @@ -974,7 +972,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { // Detail/object tree new GuiControl() { Position = "0 0"; - extent = "202 276"; + extent = "342 276"; MinExtent = "8 8"; HorizSizing = "width"; VertSizing = "height"; @@ -1002,7 +1000,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { AnchorLeft = "1"; AnchorRight = "0"; Position = "0 0"; - extent = "202 276"; + extent = "342 276"; MinExtent = "8 25"; HorizSizing = "width"; VertSizing = "height"; @@ -1044,7 +1042,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { // Detail/Object properties new GuiControl() { position = "0 275"; - extent = "202 143"; + extent = "342 143"; MinExtent = "8 8"; HorizSizing = "width"; vertSizing = "top"; @@ -1058,7 +1056,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { new GuiContainer() { position = "0 0"; - extent = "202 143"; + extent = "342 143"; HorizSizing = "width"; VertSizing = "bottom"; Profile = "inspectorStyleRolloutDarkProfile"; @@ -1068,13 +1066,13 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiTextProfile"; text = "Detail/Object Properties"; position = "4 1"; - extent = "112 16"; + extent = "138 16"; HorizSizing = "right"; VertSizing = "bottom"; }; new GuiTextEditCtrl() { - position = "5 23"; - extent = "130 18"; + position = "4 23"; + extent = "208 18"; MinExtent = "8 2"; HorizSizing = "right"; VertSizing = "bottom"; @@ -1089,7 +1087,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { canSaveDynamicFields = "0"; }; new GuiTextEditCtrl() { - position = "157 23"; + position = "219 23"; extent = "40 18"; MinExtent = "8 2"; HorizSizing = "right"; @@ -1107,13 +1105,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { new GuiTextCtrl() { text = "Billboarding"; position = "5 44"; - extent = "57 16"; + extent = "74 16"; HorizSizing = "right"; VertSizing = "bottom"; + Profile = "ToolsGuiTextProfile"; }; new GuiPopUpMenuCtrl() { position = "88 45"; - extent = "109 18"; + extent = "172 18"; HorizSizing = "right"; vertSizing = "bottom"; Profile = "ToolsGuiPopUpMenuProfile"; @@ -1124,13 +1123,14 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { new GuiTextCtrl() { text = "Object Node"; position = "5 66"; - extent = "60 16"; + extent = "80 16"; HorizSizing = "right"; VertSizing = "bottom"; + Profile = "ToolsGuiTextProfile"; }; new GuiPopUpMenuCtrl() { position = "88 67"; - extent = "109 18"; + extent = "172 18"; HorizSizing = "right"; vertSizing = "bottom"; Profile = "ToolsGuiPopUpMenuProfile"; @@ -1141,7 +1141,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { new GuiBitmapCtrl(){ bitmapAsset = "ToolsModule:inactive_overlay_image"; position = "4 45"; - extent = "193 42"; + extent = "257 42"; tooltip = "A mesh must be selected to edit these properties"; hovertime = "500"; isContainer = "1"; @@ -1153,7 +1153,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { buttonType = "PushButton"; useMouseEvents = "0"; position = "4 91"; - extent = "102 22"; + extent = "118 22"; MinExtent = "8 2"; HorizSizing = "right"; vertSizing = "bottom"; @@ -1168,8 +1168,8 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { canSaveDynamicFields = "0"; }; new GuiPopUpMenuCtrl() { - position = "111 92"; - extent = "85 18"; + position = "130 92"; + extent = "130 18"; horizSizing = "right"; vertSizing = "bottom"; Profile = "ToolsGuiPopUpMenuProfile"; @@ -1181,7 +1181,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - position = "40 117"; + position = "68 117"; extent = "122 22"; MinExtent = "8 2"; HorizSizing = "right"; @@ -1209,7 +1209,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 19"; - Extent = "202 418"; + Extent = "342 418"; MinExtent = "0 -500"; canSave = "1"; Visible = "0"; @@ -1230,7 +1230,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 0"; - Extent = "202 418"; + Extent = "342 418"; MinExtent = "0 8"; }; new GuiBitmapBorderCtrl() { @@ -1239,7 +1239,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 0"; - Extent = "202 418"; + Extent = "342 418"; MinExtent = "0 8"; }; @@ -1251,7 +1251,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 0"; - Extent = "202 345"; + Extent = "342 345"; MinExtent = "8 8"; canSave = "1"; Visible = "1"; @@ -1265,7 +1265,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "height"; Position = "0 0"; - Extent = "202 345"; + Extent = "342 345"; MinExtent = "8 25"; canSave = "1"; Visible = "1"; @@ -1292,7 +1292,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "bottom"; Position = "1 1"; - Extent = "200 19"; + Extent = "340 19"; MinExtent = "8 2"; }; new GuiTextListCtrl(ShapeEdMaterialList) { @@ -1302,7 +1302,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "right"; VertSizing = "bottom"; Position = "0 0"; - Extent = "202 20"; + Extent = "342 20"; MinExtent = "8 11"; canSave = "1"; Visible = "1"; @@ -1324,7 +1324,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "width"; VertSizing = "top"; Position = "0 344"; - Extent = "202 74"; + Extent = "342 74"; isContainer = true; new GuiTextCtrl() { // Header @@ -1364,7 +1364,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { HorizSizing = "right"; VertSizing = "bottom"; Position = "7 52"; - Extent = "150 13"; + Extent = "180 13"; Command = "ShapeEdMaterials.updateSelectedMaterial($ThisControl.getValue());"; tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Highlight the primitives that use the selected Material"; @@ -1383,7 +1383,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiButtonProfile"; HorizSizing = "left"; VertSizing = "bottom"; - Position = "300 25"; + Position = "280 25"; Extent = "17 17"; MinExtent = "8 2"; canSave = "1"; @@ -1404,6 +1404,27 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Profile = "ToolsGuiButtonProfile"; HorizSizing = "left"; VertSizing = "bottom"; + Position = "300 25"; + Extent = "17 17"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = ""; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Add new sequence"; + hovertime = "1000"; + groupNum = "0"; + buttonType = "PushButton"; + useMouseEvents = "0"; + bitmapAsset = "ToolsModule:new_n_image"; + }; + new GuiBitmapButtonCtrl() { + internalName = "newFromExistingBtn"; + canSaveDynamicFields = "0"; + isContainer = "0"; + Profile = "ToolsGuiButtonProfile"; + HorizSizing = "left"; + VertSizing = "bottom"; Position = "320 25"; Extent = "17 17"; MinExtent = "8 2"; @@ -1411,7 +1432,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) { Visible = "1"; Command = ""; tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = ""; + ToolTip = "Add new from existing sequence"; hovertime = "1000"; groupNum = "0"; buttonType = "PushButton"; diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui index 4597b8010..1c607163a 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui @@ -23,7 +23,7 @@ $guiContent = new GuiControl() { VertSizing = "windowRelative"; Position = getWord($pref::Video::mode, 0) - 360 SPC getWord(EditorGuiToolbar.extent, 1) + 6; - Extent = "360 165"; + Extent = "360 400"; MinExtent = "300 165"; canSave = "1"; Visible = "0"; @@ -334,17 +334,18 @@ $guiContent = new GuiControl() { }; new GuiTextCtrl(){ Position = "5 5"; - Extent = "60 16"; + Extent = "80 16"; text = "Shape Type"; + Profile = "ToolsGuiTextProfile"; }; new GuiPopUpMenuCtrl(ShapeEdHintMenu) { canSaveDynamicFields = "0"; isContainer = "0"; Profile = "ToolsGuiPopUpMenuProfile"; - HorizSizing = "width"; + HorizSizing = "right"; VertSizing = "bottom"; - position = "66 4"; - Extent = "132 18"; + position = "85 4"; + Extent = "255 18"; MinExtent = "8 2"; canSave = "1"; Visible = "1"; @@ -369,16 +370,16 @@ $guiContent = new GuiControl() { // Force load DAEs new GuiCheckBoxCtrl() { Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "left"; + HorizSizing = "right"; VertSizing = "bottom"; - Position = "133 27"; - Extent = "72 13"; + Position = "198 27"; + Extent = "145 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 = " Source Art"; + text = " Force Use Source Art"; visible = false; }; diff --git a/Templates/BaseGame/game/tools/shapeEditor/main.tscript b/Templates/BaseGame/game/tools/shapeEditor/main.tscript index 8877863e0..7349ad104 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/main.tscript +++ b/Templates/BaseGame/game/tools/shapeEditor/main.tscript @@ -37,6 +37,9 @@ function initializeShapeEditor() exec("./gui/shapeEdPropWindow.ed.gui"); exec("./gui/shapeEdAdvancedWindow.ed.gui"); exec("./gui/shapeEdAnimWindow.ed.gui"); + + exec("./gui/shapeEdAddSequenceGui.gui"); + exec("./gui/shapeEdAddSequenceGui.tscript"); exec("./scripts/shapeEditor.ed." @ $TorqueScriptFileExtension); exec("./scripts/shapeEditorHints.ed." @ $TorqueScriptFileExtension); @@ -120,9 +123,8 @@ function ShapeEditorPlugin::onWorldEditorStartup(%this) // Add ourselves to the Editor Settings window exec( "./gui/ShapeEditorSettingsTab.gui" ); //ESettingsWindow.addTabPage( EShapeEditorSettingsPage ); - + GuiWindowCtrl::attach(ShapeEdPropWindow, ShapeEdSelectWindow); - ShapeEdAnimWindow.resize( -1, 526, 593, 53 ); // Initialise gui ShapeEdSeqNodeTabBook.selectPage(0); @@ -188,7 +190,7 @@ function ShapeEditorPlugin::open(%this, %shapeAsset) ShapeEdAdvancedWindow.setVisible(ShapeEditorToolbar-->showAdvanced.getValue()); MainSceneTabPanel.bringToFront(ShapeEdPreviewGui); - ToolsPaletteArray->WorldEditorMove.performClick(); + ToolsPaletteArray.getObject(0).performClick(); %this.map.push(); // Switch to the ShapeEditor UndoManager @@ -241,6 +243,10 @@ function EditorGui::SetShapePalletBar() function ShapeEditorPlugin::onActivated(%this) { %this.open(""); + + %this.storedHDRAdaptRateVal = $PostFX::HDRPostFX::enableAutoExposure; + + $PostFX::HDRPostFX::enableAutoExposure = false; // Try to start with the shape selected in the world editor %count = EWorldEditor.getSelectionSize(); @@ -315,6 +321,8 @@ function ShapeEditorPlugin::onDeactivated(%this) // Restore menu bar %this.replaceMenuCmd( "Camera", 8, %this.oldCamFitCmd ); %this.replaceMenuCmd( "Camera", 9, %this.oldCamFitOrbitCmd ); + + $PostFX::HDRPostFX::enableAutoExposure = %this.storedHDRAdaptRateVal; Parent::onDeactivated(%this); } @@ -323,7 +331,7 @@ function ShapeEditorPlugin::onExitMission( %this ) { // unselect the current shape ShapeEdShapeView.setModel( "" ); - if (ShapeEditor.shape != 0 && ShapeEditor.shape != -1) + if (isObject(ShapeEditor.shape)) ShapeEditor.shape.delete(); ShapeEditor.shape = 0; ShapeEdUndoManager.clearAll(); diff --git a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript index 5e982cdba..e3ebc29d3 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript @@ -146,6 +146,18 @@ function ShapeEditor::getSequenceSource( %this, %seqName ) %source = setField( %source, 1, "" ); if ( %src0 $= "" ) %source = setField( %source, 0, %seqName ); + + %aq = new AssetQuery(); + %foundAssets = AssetDatabase.findAssetLooseFile(%aq, %src0); + if(%foundAssets != 0) + { + //if we have an assetId associated to the file, we're gunna just pass that + //through for the edit actions + %assetId = %aq.getAsset(0); + + %source = setField( %source, 0, %assetId ); + } + %aq.delete(); return %source; } @@ -216,10 +228,25 @@ function ShapeEditor::saveChanges( %this ) { if ( isObject( ShapeEditor.shape ) ) { + %threadSequence = ShapeEdShapeView.getThreadSequence(); + + %assetPath = AssetDatabase.getAssetFilePath(ShapeEditorPlugin.selectedAssetId); + %assetWriteSuccessful = TAMLWrite(ShapeEditorPlugin.selectedAssetDef, %assetPath); + AssetDatabase.refreshAsset(ShapeEditorPlugin.selectedAssetId); + ShapeEditor.saveConstructor( ShapeEditor.shape ); ShapeEditor.shape.writeChangeSet(); ShapeEditor.shape.notifyShapeChanged(); // Force game objects to reload shape ShapeEditor.setDirty( false ); + + //Re-set up our sequence playback thread + ShapeEdThreadList.clear(); + + ShapeEdShapeView.addThread(); + ShapeEdThreadList.addRow( %this.threadID++, ShapeEdThreadList.rowCount() ); + ShapeEdThreadList.setSelectedRow( ShapeEdThreadList.rowCount()-1 ); + + ShapeEdShapeView.setThreadSequence(%threadSequence); } } @@ -398,19 +425,6 @@ function ShapeEdPropWindow::update_onShapeSelectionChanged( %this ) } ShapeEdThreadWindow.onAddThread(); // add thread 0 - //Now, fetch any animation assets if we're utilizing a shape asset - if(ShapeEditorPlugin.selectedAssetDef !$= "") - { - %animationAssetCount = ShapeEditorPlugin.selectedAssetDef.getAnimationCount(); - - for(%animIdx = 0; %animIdx < %animationAssetCount; %animIdx++) - { - %animAsset = ShapeEditorPlugin.selectedAssetDef.getAnimation(%animIdx); - - //ShapeEdSequenceList.addItem( %animAsset.assetName ); - } - } - // --- DETAILS TAB --- // Add detail levels and meshes to tree ShapeEdDetailTree.clearSelection(); @@ -593,6 +607,9 @@ function ShapeEdSeqNodeTabBook::onTabSelected( %this, %name, %index ) ShapeEdPropWindow-->newBtn.ToolTip = "Add new sequence"; ShapeEdPropWindow-->newBtn.Command = "ShapeEdSequences.onAddSequence();"; ShapeEdPropWindow-->newBtn.setActive( true ); + ShapeEdPropWindow-->newFromExistingBtn.ToolTip = "Add new from existing sequence"; + ShapeEdPropWindow-->newFromExistingBtn.Command = "ShapeEdSequences.onAddSeqFromExisting();"; + ShapeEdPropWindow-->newFromExistingBtn.setActive( true ); ShapeEdPropWindow-->deleteBtn.ToolTip = "Delete selected sequence (cannot be undone)"; ShapeEdPropWindow-->deleteBtn.Command = "ShapeEdSequences.onDeleteSequence();"; ShapeEdPropWindow-->deleteBtn.setActive( true ); @@ -601,6 +618,9 @@ function ShapeEdSeqNodeTabBook::onTabSelected( %this, %name, %index ) ShapeEdPropWindow-->newBtn.ToolTip = "Add new node"; ShapeEdPropWindow-->newBtn.Command = "ShapeEdNodes.onAddNode();"; ShapeEdPropWindow-->newBtn.setActive( true ); + ShapeEdPropWindow-->newFromExistingBtn.ToolTip = ""; + ShapeEdPropWindow-->newFromExistingBtn.Command = ""; + ShapeEdPropWindow-->newFromExistingBtn.setActive( false ); ShapeEdPropWindow-->deleteBtn.ToolTip = "Delete selected node (cannot be undone)"; ShapeEdPropWindow-->deleteBtn.Command = "ShapeEdNodes.onDeleteNode();"; ShapeEdPropWindow-->deleteBtn.setActive( true ); @@ -609,6 +629,9 @@ function ShapeEdSeqNodeTabBook::onTabSelected( %this, %name, %index ) ShapeEdPropWindow-->newBtn.ToolTip = ""; ShapeEdPropWindow-->newBtn.Command = ""; ShapeEdPropWindow-->newBtn.setActive( false ); + ShapeEdPropWindow-->newFromExistingBtn.ToolTip = ""; + ShapeEdPropWindow-->newFromExistingBtn.Command = ""; + ShapeEdPropWindow-->newFromExistingBtn.setActive( false ); ShapeEdPropWindow-->deleteBtn.ToolTip = "Delete the selected mesh or detail level (cannot be undone)"; ShapeEdPropWindow-->deleteBtn.Command = "ShapeEdDetails.onDeleteMesh();"; ShapeEdPropWindow-->deleteBtn.setActive( true ); @@ -617,6 +640,9 @@ function ShapeEdSeqNodeTabBook::onTabSelected( %this, %name, %index ) ShapeEdPropWindow-->newBtn.ToolTip = ""; ShapeEdPropWindow-->newBtn.Command = ""; ShapeEdPropWindow-->newBtn.setActive( false ); + ShapeEdPropWindow-->newFromExistingBtn.ToolTip = ""; + ShapeEdPropWindow-->newFromExistingBtn.Command = ""; + ShapeEdPropWindow-->newFromExistingBtn.setActive( false ); ShapeEdPropWindow-->deleteBtn.ToolTip = ""; ShapeEdPropWindow-->deleteBtn.Command = ""; ShapeEdPropWindow-->deleteBtn.setActive( false ); @@ -1277,8 +1303,45 @@ function ShapeEdPropWindow::syncPlaybackDetails( %this ) %backupData = ShapeEditor.getSequenceSource( getField( %seqFrom, 0 ) ); %seqFrom = rtrim( getFields( %backupData, 0, 1 ) ); } + + ShapeEdSeqNameFromMenu.clear(); + + echo("ShapeEdPropWindow::syncPlaybackDetails() - %seqFrom: " @ %seqFrom); + + %seqFromSource = rtrim(getField(%seqFrom, 0)); + if(AssetDatabase.isDeclaredAsset(%seqFromSource) || isFile(%seqFromSource)) + { + ShapeEdSeqFromMenu.setText( %seqFromSource ); + + ShapeEdSeqNameFromMenu.active = true; + ShapeEdSeqNameFromMenu.setText(rtrim(getField(%seqFrom, 1))); + + if(AssetDatabase.isDeclaredAsset(%seqFromSource)) + { + %sourceShapeConstructor = findShapeConstructorByAssetId( %seqFromSource ); + } + else if(isFile(%seqFromSource)) + { + %sourceShapeConstructor = findShapeConstructorByFilename( %seqFromSource ); + } + + for(%i=0; %i < %sourceShapeConstructor.getSequenceCount(); %i++) + { + %name = %sourceShapeConstructor.getSequenceName( %i ); + + // Ignore __backup__ sequences (only used by editor) + if ( !startswith( %name, "__backup__" ) ) + ShapeEdSeqNameFromMenu.add( %name ); + } + } + else + { + ShapeEdSeqFromMenu.setText( %seqFrom ); + + ShapeEdSeqNameFromMenu.active = false; + ShapeEdSeqNameFromMenu.setText(""); + } - ShapeEdSeqFromMenu.setText( %seqFrom ); ShapeEdSeqFromMenu.tooltip = ShapeEdSeqFromMenu.getText(); // use tooltip to show long names ShapeEdSequences-->startFrame.setText( %seqStart ); ShapeEdSequences-->endFrame.setText( %seqEnd ); @@ -1301,6 +1364,8 @@ function ShapeEdPropWindow::syncPlaybackDetails( %this ) ShapeEdSeqFromMenu.setText( "" ); ShapeEdSeqFromMenu.tooltip = ""; + ShapeEdSeqNameFromMenu.clear(); + ShapeEdSeqNameFromMenu.active = false; ShapeEdSequences-->startFrame.setText( 0 ); ShapeEdSequences-->endFrame.setText( 0 ); @@ -1361,17 +1426,45 @@ function ShapeEdSequences::onEditSequenceSource( %this, %from ) if ( getFields( %oldSource, 0, 3 ) !$= ( %from TAB "" TAB %start TAB %end ) ) { - %aq = new AssetQuery(); - %foundAssets = AssetDatabase.findAssetLooseFile(%aq, %from); - if(%foundAssets != 0) + if(!AssetDatabase.isDeclaredAsset(%from)) { - //if we have an assetId associated to the file, we're gunna just pass that - //through for the edit actions - %from = %aq.getAsset(0); + %aq = new AssetQuery(); + %foundAssets = AssetDatabase.findAssetLooseFile(%aq, %from); + if(%foundAssets != 0) + { + //if we have an assetId associated to the file, we're gunna just pass that + //through for the edit actions + %from = %aq.getAsset(0); + } + %aq.delete(); } - %aq.delete(); ShapeEditor.doEditSeqSource( %seqName, %from, %start, %end ); + } } +} + +function ShapeEdSequences::onEditSequenceSourceName( %this, %seq ) +{ + // ignore for shapes without sequences + if (ShapeEditor.shape.getSequenceCount() == 0) + return; + + %start = %this-->startFrame.getText(); + %end = %this-->endFrame.getText(); + + if ( ( %start !$= "" ) && ( %end !$= "" ) ) + { + %seqName = ShapeEdSequenceList.getSelectedName(); + %oldSource = ShapeEditor.getSequenceSource( %seqName ); + %from = rtrim( getFields( %oldSource, 0, 0 ) ); + + if ( %seq $= "" ) + %seq = rtrim( getFields( %oldSource, 0, 1 ) ); + + if ( getFields( %oldSource, 0, 3 ) !$= ( %from TAB %seq TAB %start TAB %end ) ) + { + ShapeEditor.doEditSeqSource( %seqName, %from TAB %seq, %start, %end ); + } } } @@ -1441,25 +1534,8 @@ function ShapeEdSequences::onAddSequence( %this, %name ) if ( %name $= "" ) %name = ShapeEditor.getUniqueName( "sequence", "mySequence" ); - // Use the currently selected sequence as the base - %from = ShapeEdSequenceList.getSelectedName(); - %row = ShapeEdSequenceList.getSelectedRow(); - if ( ( %row < 2 ) && ( ShapeEdSequenceList.rowCount() > 2 ) ) - %row = 2; - if ( %from $= "" ) - { - // No sequence selected => open dialog to browse for one - //getLoadFormatFilename( %this @ ".onAddSequenceFromBrowse", ShapeEdFromMenu.lastPath ); - AssetBrowser.showDialog("ShapeAnimationAsset", "onAddAnimationAssetShapeEditor", "", "", ""); - return; - } - else - { - // Add the new sequence - %start = ShapeEdSequences-->startFrame.getText(); - %end = ShapeEdSequences-->endFrame.getText(); - ShapeEditor.doAddSequence( %name, %from, %start, %end ); - } + %this.newSeqName = %name; + AssetBrowser.showDialog("ShapeAnimationAsset ShapeAsset", "onAddAnimationAssetShapeEditor", "", "", ""); } function ShapeEdSequences::onAddSequenceFromBrowse( %this, %path ) @@ -1472,6 +1548,30 @@ function ShapeEdSequences::onAddSequenceFromBrowse( %this, %path ) ShapeEditor.doAddSequence( %name, %path, 0, -1 ); } +function ShapeEdSequences::onAddSeqFromExisting( %this, %name ) +{ + if ( %name $= "" ) + %name = ShapeEditor.getUniqueName( "sequence", "mySequence" ); + + // Use the currently selected sequence as the base + %from = ShapeEdSequenceList.getSelectedName(); + %row = ShapeEdSequenceList.getSelectedRow(); + if ( ( %row < 2 ) && ( ShapeEdSequenceList.rowCount() > 2 ) ) + %row = 2; + if ( %from $= "" ) + { + toolsMessageBoxOK("Error", "You need to select a valid sequence from the sequences list to act as a source for the new sequence!"); + return; + } + else + { + // Add the new sequence + %start = ShapeEdSequences-->startFrame.getText(); + %end = ShapeEdSequences-->endFrame.getText(); + ShapeEditor.doAddSequence( %name, %from, %start, %end ); + } +} + // Delete the selected sequence function ShapeEdSequences::onDeleteSequence( %this ) { @@ -1573,19 +1673,27 @@ function ShapeEdSeqFromMenu::onBrowseSelect( %this, %assetId ) //%this.lastPath = %path; %this.setText( %assetId ); - %assetDef = AssetDatabase.acquireAsset(%assetId); - %shapePath = %assetDef.getShapePath(); - AssetDatabase.releaseAsset(%assetId); + if(!AssetDatabase.isDeclaredAsset(%assetId)) + { + toolsMessageBoxOK("Error!", "Tried to add a new sequence to shape, but the assetId was invalid!"); + %this.setText( "Browse..." ); + return; + } - ShapeEdSequences.onEditSequenceSource( %shapePath ); + ShapeEdSequences.onEditSequenceSource( %assetId ); +} + +function ShapeEdSeqNameFromMenu::onSelect( %this, %id, %text ) +{ + ShapeEdSequences.onEditSequenceSourceName( %text ); } //------------------------------------------------------------------------------ -function ShapeEdAnimWIndow::onWake(%this) +function ShapeEdAnimWindow::onResize(%this) { - %animWindow = ShapeEdAnimWIndow; - %position = "1" SPC Canvas.extent.y - 132; + %animWindow = ShapeEdAnimWindow; + %position = "1" SPC Canvas.extent.y - EditorGuiStatusBar.extent.y - %this.Extent.y; if(isObject(ShapeEdPropWindow)) { @@ -1599,6 +1707,8 @@ function ShapeEdAnimWIndow::onWake(%this) %extent = Canvas.extent.x - 360 - 2 SPC %animWindow.extent.y; } + //echo("ShapeEdAnimWIndow::onWake() - " @ %position.x @ ", " @ %position.y @ ", " @ %extent.x @ ", " @ %extent.y); + // resize and position accordingly %animWindow.resize(%position.x, %position.y, %extent.x, %extent.y); } @@ -3261,11 +3371,12 @@ function ShapeEditorTabbook::onTabSelected( %this ) if( ShapeEditorTabbook.getSelectedPage() == 1) { AssetBrowser.showDialog("ShapeAsset", "openShapeInShapeEditor"); + %this.selectPage(0); } } function openShapeInShapeEditor(%shapeAssetId) { %assetDef = AssetDatabase.acquireAsset(%shapeAssetId); - AssetBrowser.editShapeAsset(%assetDef); + ShapeEditorPlugin.openShapeAsset(%assetDef); } \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript index 09168cbca..a6c5a2c52 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript +++ b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript @@ -301,7 +301,7 @@ function ActionEditNodeTransform::undo( %this ) // Add sequence function onAddAnimationAssetShapeEditor(%selectedAnimation) { - ShapeEditor.doAddSequence(%selectedAnimation, 0, 0, 0); + shapeEdAddSequenceGui::show(%selectedAnimation); } function ShapeEditor::doAddSequence( %this, %seqName, %from, %start, %end ) @@ -318,8 +318,26 @@ function ShapeEditor::doAddSequence( %this, %seqName, %from, %start, %end ) function ActionAddSequence::doit( %this ) { - if(ShapeEditorPlugin.selectedAssetDef $= "" || !AssetDatabase.isDeclaredAsset(%this.seqName)) + if(AssetDatabase.isDeclaredAsset(%this.from)) { + %seqAsset = %this.from; + } + else + { + if(getFieldCount(%this.from) > 1) + { + %firstWord = getField(%this.from, 0); + if(AssetDatabase.isDeclaredAsset(%firstWord)) + { + %seqAsset = %firstWord; + } + } + } + + if(ShapeEditorPlugin.selectedAssetDef $= "" || %seqAsset $= "") + { + echo("--- Current asset or selected sequence is not valid!"); + echo(" Trying to go do a lookup..."); // If adding this sequence from an existing sequence, make a backup copy of // the existing sequence first, so we can edit the start/end frames later // without having to worry if the original source sequence has changed. @@ -342,37 +360,15 @@ function ActionAddSequence::doit( %this ) } else { - %assetDef = AssetDatabase.acquireAsset(%this.seqName); - %moduleName = getWord(getToken(%this.seqName, ":", 0),0); + $collada::forceLoadDAE = EditorSettings.value( "forceLoadDAE" ); + %success = ShapeEditor.shape.addSequence( %this.from, %this.seqName, %this.start, %this.end ); + $collada::forceLoadDAE = false; - //If we have or ambient, we'll want to ignore them for our idx values when embedding animation dependencies to our shape asset - %idxOffset = 0; - - if(ShapeEdSequenceList.findTextIndex("\t\t\t\t") != -1) - %idxOffset++; - - if(ShapeEdSequenceList.findTextIndex("ambient\t\t\t\t") != -1) - %idxOffset++; - - //TODO, properly ignore and ambient entries for our idx values, but only if they're there! - %idx = ShapeEdSequenceList.rowCount() - %idxOffset; - - //We adjust due to the list "header" row as well - %idx -= 1; - - %animSet = "ShapeEditorPlugin.selectedAssetDef.animationSequence"@%idx@"=\"@asset="@%moduleName@":"@%assetDef.assetName@"\";"; - eval(%animSet); - - %assetPath = AssetDatabase.getAssetFilePath(ShapeEditorPlugin.selectedAssetId); - - %assetImportSuccessful = TAMLWrite(ShapeEditorPlugin.selectedAssetDef, %assetPath); - - AssetDatabase.refreshAsset(ShapeEditorPlugin.selectedAssetId); - - //force a refresh - ShapeEdPropWindow.update_onShapeSelectionChanged(); - - return true; + if ( %success ) + { + ShapeEdPropWindow.update_onSequenceAdded( %this.seqName, -1 ); + return true; + } } return false; }