Full Template for ticket #1

This commit is contained in:
DavidWyand-GG 2012-09-19 11:54:25 -04:00
parent 74f265b3b3
commit f439dc8dcd
2150 changed files with 286240 additions and 0 deletions

View file

@ -0,0 +1,52 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Shape Editor Profiles
//-----------------------------------------------------------------------------
singleton GuiControlProfile(GuiShapeEdScrollProfile : GuiEditorScrollProfile)
{
// Don't clear the scroll area (since we need to be able to see the GuiContainer
// underneath that provides the fill color for the header row)
opaque = false;
category = "Editor";
};
singleton GuiControlProfile(GuiShapeEdTextListProfile : GuiTextListProfile)
{
// Customise the not-active font used for the header row
fontColorNA = "75 75 75";
category = "Editor";
};
singleton GuiControlProfile(GuiShapeEdRolloutProfile : GuiInspectorRolloutProfile0)
{
bitmap = "tools/editorclasses/gui/images/rollout";
category = "Editor";
};
singleton GuiControlProfile( GuiShapeEdTransitionSliderProfile )
{
bitmap = "tools/shapeEditor/images/transition_slider";
category = "Core";
};

View file

@ -0,0 +1,549 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(ShapeEditorSettingsTab,EditorGuiGroup) {
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "800 600";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
new GuiTabPageCtrl(EShapeEditorSettingsPage) {
fitBook = "1";
text = "Shape Editor";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "1";
Profile = "GuiSolidDefaultProfile";
HorizSizing = "width";
VertSizing = "height";
position = "0 0";
Extent = "208 400";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
new GuiScrollCtrl() {
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
lockHorizScroll = "1";
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 = "1";
Profile = "GuiScrollProfile";
HorizSizing = "width";
VertSizing = "height";
position = "0 0";
Extent = "208 400";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
new GuiStackControl() {
StackingType = "Vertical";
HorizStacking = "Left to Right";
VertStacking = "Top to Bottom";
Padding = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "1 1";
extent = "208 210";
MinExtent = "8 2";
canSave = "1";
isDecoy = "0";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
new GuiRolloutCtrl() {
Profile = "GuiRolloutProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "10 10";
extent = "208 95";
Caption = "Colors";
Margin = "0 3 0 0";
DragSizable = false;
container = true;
new GuiStackControl() {
StackingType = "Vertical";
HorizStacking = "Left to Right";
VertStacking = "Top to Bottom";
Padding = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "0 0";
Extent = "208 0";
MinExtent = "8 2";
canSave = "1";
isDecoy = "0";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
padding = "3";
new GuiControl() {
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 10";
Extent = "208 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
class = "ESettingsWindowColor";
className = "ESettingsWindowColor";
editorSettingsRead = "ShapeEdShapeView.sunDiffuse = EditorSettings.value(%this.editorSettingsValue);";
editorSettingsValue = "ShapeEditor/SunDiffuseColor";
editorSettingsWrite = "ShapeEditorPlugin.writeSettings();";
new GuiTextCtrl() {
text = "Sun Diffuse:";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "0";
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 1";
Extent = "70 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
};
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 = "GuiTextEditProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "80 0";
Extent = "104 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "ColorEdit";
canSaveDynamicFields = "1";
class = "ESettingsWindowColorEdit";
className = "ESettingsWindowColorEdit";
};
new GuiSwatchButtonCtrl() {
color = "1 1 1 1";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "188 2";
extent = "14 14";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "ColorButton";
canSaveDynamicFields = "1";
class = "ESettingsWindowColorButton";
className = "ESettingsWindowColorButton";
};
};
new GuiControl() {
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 30";
Extent = "208 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
class = "ESettingsWindowColor";
className = "ESettingsWindowColor";
editorSettingsRead = "ShapeEdShapeView.sunAmbient = EditorSettings.value(%this.editorSettingsValue);";
editorSettingsValue = "ShapeEditor/SunAmbientColor";
editorSettingsWrite = "ShapeEditorPlugin.writeSettings();";
new GuiTextCtrl() {
text = "Sun Ambient:";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "0";
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 1";
Extent = "70 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
};
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 = "GuiTextEditProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "80 0";
Extent = "104 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "ColorEdit";
canSaveDynamicFields = "1";
class = "ESettingsWindowColorEdit";
className = "ESettingsWindowColorEdit";
};
new GuiSwatchButtonCtrl() {
color = "1 1 1 1";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "188 2";
extent = "14 14";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "ColorButton";
canSaveDynamicFields = "1";
class = "ESettingsWindowColorButton";
className = "ESettingsWindowColorButton";
};
};
new GuiControl() {
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 50";
Extent = "208 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
class = "ESettingsWindowColor";
className = "ESettingsWindowColor";
editorSettingsRead = "ShapeEdPreviewGui-->previewBackground.color = ColorIntToFloat(EditorSettings.value(%this.editorSettingsValue));";
editorSettingsValue = "ShapeEditor/BackgroundColor";
editorSettingsWrite = "ShapeEditorPlugin.writeSettings();";
new GuiTextCtrl() {
text = "Background:";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "0";
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 2";
Extent = "70 14";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
};
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 = "GuiTextEditProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "80 0";
Extent = "104 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "ColorEdit";
canSaveDynamicFields = "1";
class = "ESettingsWindowColorEdit";
className = "ESettingsWindowColorEdit";
};
new GuiSwatchButtonCtrl() {
color = "1 1 1 1";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "188 2";
extent = "14 14";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
internalName = "ColorButton";
canSaveDynamicFields = "1";
class = "ESettingsWindowColorButton";
className = "ESettingsWindowColorButton";
};
};
};
};
new GuiRolloutCtrl() {
Profile = "GuiRolloutProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "10 10";
extent = "208 95";
Caption = "Grid";
Margin = "0 3 0 0";
DragSizable = false;
container = true;
new GuiStackControl() {
StackingType = "Vertical";
HorizStacking = "Left to Right";
VertStacking = "Top to Bottom";
Padding = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "0 0";
Extent = "208 0";
MinExtent = "8 2";
canSave = "1";
isDecoy = "0";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
padding = "3";
new GuiControl() {
isContainer = "1";
horizSizing = "right";
vertSizing = "bottom";
extent = "208 18";
new GuiTextCtrl() {
text = "Grid Size:";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "0";
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 1";
Extent = "70 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
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 = "GuiTextEditNumericProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "81 0";
Extent = "121 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
class = "ESettingsWindowTextEdit";
className = "ESettingsWindowTextEdit";
editorSettingsRead = "ShapeEdShapeView.gridSize = EditorSettings.value(%this.editorSettingsValue);";
editorSettingsValue = "ShapeEditor/GridSize";
editorSettingsWrite = "ShapeEditorPlugin.writeSettings();";
};
};
new GuiControl() {
isContainer = "1";
horizSizing = "right";
vertSizing = "bottom";
extent = "208 18";
new GuiTextCtrl() {
text = "Grid Dimension:";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "0";
Profile = "GuiTextRightProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 1";
Extent = "70 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
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 = "GuiTextEditProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "81 0";
Extent = "121 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "1";
class = "ESettingsWindowTextEdit";
className = "ESettingsWindowTextEdit";
editorSettingsRead = "ShapeEdShapeView.gridDimension = EditorSettings.value(%this.editorSettingsValue);";
editorSettingsValue = "ShapeEditor/GridDimension";
editorSettingsWrite = "ShapeEditorPlugin.writeSettings();";
};
};
};
};
};
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,295 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
canSaveDynamicFields = "0";
internalName = "";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "102 0";
Extent = "550" SPC getWord(EditorGuiToolbar.extent, 1);
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
canMove = "0";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
resizeWidth = "0";
resizeHeight = "0";
EdgeSnap = "0";
text ="";
new GuiContainer() {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "menubarProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "0 0";
Extent = "800 32";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "5 7";
extent = "86 16";
minExtent = "8 8";
visible = "1";
text = "Preview Settings";
maxLength = "255";
helpTag = "0";
};
new GuiBitmapCtrl() {
Profile = "GuiDefaultProfile";
position = "94 3";
Extent = "2 26";
MinExtent = "1 1";
bitmap = "core/art/gui/images/separator-h.png";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
internalName = "showGridBtn";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "100 3";
Extent = "29 27";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ShapeEdShapeView.renderGrid = $ThisControl.getValue();";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Show grid";
hovertime = "1000";
bitmap = "tools/gui/images/menubar/show-grid";
text = "";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
internalName = "fitToShapeBtn";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "134 3";
Extent = "29 27";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ShapeEdShapeView.fitToShape();";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Fit Camera to Shape (F)";
hovertime = "1000";
bitmap = "tools/gui/images/menubar/fit-selection";
text = "";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
internalName = "orbitNodeBtn";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "168 3";
Extent = "29 27";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ShapeEdShapeView.orbitNode = $ThisControl.getValue();";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Orbit the selected node";
hovertime = "1000";
bitmap = "tools/gui/images/menubar/orbit-cam";
text = "";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
};
new GuiBitmapCtrl() {
Profile = "GuiDefaultProfile";
position = "202 3";
Extent = "2 26";
MinExtent = "1 1";
bitmap = "core/art/gui/images/separator-h.png";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
internalName = "showNodes";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "210 3";
Extent = "29 27";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ShapeEdShapeView.renderNodes = $ThisControl.getValue();";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Show Nodes (N)";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/shownodes_btn";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl() {
internalName = "ghostMode";
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "243 3";
Extent = "29 27";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdShapeView.renderGhost = $ThisControl.getValue();";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Toggle shape transparency in the preview window (T)";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/ghost_btn";
buttonType = "ToggleButton";
groupNum = "0";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl() {
internalName = "wireframeMode";
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "276 3";
Extent = "29 27";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "shapeEditorWireframeMode();";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Toggle shape wireframe in the preview window (R)";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/show-wireframe";
buttonType = "ToggleButton";
groupNum = "0";
useMouseEvents = "0";
};
new GuiBitmapCtrl() {
Profile = "GuiDefaultProfile";
position = "309 3";
Extent = "2 26";
MinExtent = "1 1";
bitmap = "core/art/gui/images/separator-h.png";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
internalName = "showBounds";
Enabled = "1";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "315 3";
Extent = "29 27";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ShapeEdShapeView.renderbounds = $ThisControl.getValue();";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Toggle shape bounding box in the preview window";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/object-bounds";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
internalName = "showObjBox";
Enabled = "1";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "348 3";
Extent = "29 27";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ShapeEdShapeView.renderObjBox = $ThisControl.getValue();";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Toggle selected object bounding box in the preview window";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/object-fit-bounds";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
internalName = "renderColMeshes";
Enabled = "1";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "381 3";
Extent = "29 27";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "shapeEdShapeView.renderColMeshes = $ThisControl.getValue();";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Toggle rendering of collision meshes in the preview window";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/collision-shape";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
};
new GuiBitmapCtrl() {
Profile = "GuiDefaultProfile";
position = "415 3";
Extent = "2 26";
MinExtent = "1 1";
bitmap = "core/art/gui/images/separator-h.png";
};
new GuiBitmapButtonCtrl() {
internalName = "showAdvanced";
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "423 3";
Extent = "29 27";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdAdvancedWindow.setVisible( $ThisControl.getValue() );";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Toggle Advanced Properties Window";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/detail-levels_btn";
buttonType = "ToggleButton";
groupNum = "0";
useMouseEvents = "0";
};
};
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,438 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiToolbarWindowProfile";
HorizSizing = "width";
VertSizing = "top";
Position = -1 SPC getWord(ShapeEdPreviewGui.extent,0)-94;
Extent = "817 53";
MinExtent = "475 53";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Margin = "4 4 4 4";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
resizeWidth = "1";
resizeHeight = "0";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
EdgeSnap = "0";
canCollapse = "0";
text = "";
new GuiContainer() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "top";
Position = "5 10";
Extent = "809 ";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
// Sequence playback controls
new GuiControl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "top";
Position = "0 3";
Extent = "809 38";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
new GuiTextCtrl() {
HorizSizing = "left";
VertSizing = "top";
position = "740 19";
Extent = "35 16";
text = "Frame:";
};
new GuiTextCtrl() {
HorizSizing = "left";
VertSizing = "top";
Profile = "GuiTextProfile";
position = "778 19";
Extent = "26 18";
Variable = "$ShapeEdCurrentFrame";
};
new GuiTextEditCtrl() {
internalName = "seqIn";
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = "28 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
AltCommand = "ShapeEdSequences.onEditSeqInOut(\"in\", $ThisControl.getText());";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Set the In Point to the Current Frame";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
maxLength = "5";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
passwordMask = "*";
};
new GuiSliderCtrl(ShapeEdSeqSlider) {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiSliderProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "35 4";
Extent = "736 20";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
range = "0 255";
ticks = "0";
value = "0";
Variable = "$ShapeEdCurrentFrame";
};
new GuiTextEditCtrl() {
internalName = "seqOut";
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiTextEditProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "778 0";
Extent = "28 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
AltCommand = "ShapeEdSequences.onEditSeqInOut(\"out\", $ThisControl.getText());";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Set the Out Point to the Current Frame";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
maxLength = "5";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
passwordMask = "*";
};
// VCR style buttons: back step_back play step_fwd fwd
new GuiControl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "center";
VertSizing = "top";
position = "194 17";
extent = "420 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
new GuiButtonCtrl() {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = "28 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdSequences.onEditSeqInOut(\"in\", ShapeEdSeqSlider.getValue());";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Set the in position to the current frame (I)";
hovertime = "1000";
text = "in";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "48 0";
Extent = "18 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdAnimWindow.setKeyframe( ShapeEdAnimWindow-->seqIn.getText() );";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Skip to in frame (SHIFT -)";
hovertime = "1000";
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/back_btn";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "76 0";
Extent = "18 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdAnimWindow.setKeyframe( mCeil(ShapeEdSeqSlider.getValue() - 1) );";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Previous frame (-)";
hovertime = "1000";
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/stepback_btn";
internalName = "stepBkwdBtn";
};
new GuiControl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "114 0";
Extent = "94 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
new GuiBitmapButtonCtrl() {
internalName = "playBkwdBtn";
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = "18 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdAnimWindow.setNoProxySequence(); ShapeEdAnimWindow.setThreadDirection( -1 );";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Play sequence in reverse";
hovertime = "1000";
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/playbkwd_btn";
};
new GuiBitmapButtonCtrl() {
internalName = "pauseBtn";
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "38 0";
Extent = "18 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdAnimWindow.setThreadDirection( 0 );";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Toggle pause (SPACE)";
hovertime = "1000";
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/pause_btn";
};
new GuiBitmapButtonCtrl() {
internalName = "playFwdBtn";
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "76 0";
Extent = "18 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdAnimWindow.setNoProxySequence(); ShapeEdAnimWindow.setThreadDirection( 1 );";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Play sequence";
hovertime = "1000";
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/playfwd_btn";
};
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "228 0";
Extent = "18 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdAnimWindow.setKeyframe( mFloor(ShapeEdSeqSlider.getValue() + 1) );";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Next frame (+)";
hovertime = "1000";
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/stepfwd_btn";
internalName = "stepFwdBtn";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "266 0";
Extent = "18 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdAnimWindow.setKeyframe( ShapeEdAnimWindow-->seqOut.getText() );";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Skip to out frame (SHIFT +)";
hovertime = "1000";
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/fwd_btn";
};
new GuiButtonCtrl() {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
horizSizing = "right";
VertSizing = "bottom";
position = "306 0";
Extent = "28 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdSequences.onEditSeqInOut(\"out\", ShapeEdSeqSlider.getValue());";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Set the out position to the current frame (O)";
hovertime = "1000";
text = "out";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl() {
internalName = "pingpong";
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
horizSizing = "left";
VertSizing = "bottom";
position = "365 0";
Extent = "18 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdAnimWindow.togglePingPong();";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Toggle 'pingpong' mode on the current thread";
hovertime = "1000";
groupNum = "0";
buttonType = "ToggleButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/pingpong_btn";
};
new GuiTextEditCtrl() {
internalName = "timeScale";
Profile = "GuiTextEditProfile";
horizSizing = "left";
VertSizing = "bottom";
position = "390 0";
extent = "30 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Text = "1.0";
AltCommand = "ShapeEdShapeView.setTimeScale( $ThisControl.getText() );";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Edit this value to change the playback speed for all threads";
hovertime = "1000";
canSaveDynamicFields = "0";
};
};
};
new GuiBitmapButtonCtrl() {
internalName = "seqInBar";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "39 0";
Extent = "8 13";
MinExtent = "1 1";
bitmap = "tools/shapeEditor/images/seq_bar-in";
ToolTip = "Set the In Point to the Current Frame";
Command = "ShapeEdSequences.onEditSeqInOut(\"in\", ShapeEdSeqSlider.getValue());";
};
new GuiBitmapButtonCtrl() {
internalName = "seqOutBar";
Profile = "GuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "765 0";
Extent = "8 13";
MinExtent = "1 1";
bitmap = "tools/shapeEditor/images/seq_bar-out";
ToolTip = "Set the Out Point to the Current Frame";
Command = "ShapeEdSequences.onEditSeqInOut(\"out\", ShapeEdSeqSlider.getValue());";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,85 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = "1024 768";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
new GuiContainer(ShapeEdPreviewGui) {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "0" SPC (getWord(EditorGuiToolbar.extent, 1)-1);
Docking = "Client";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
new GuiSwatchButtonCtrl() {
internalName = "previewBackground";
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiInspectorSwatchButtonProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "-210 -40";
Extent = getWord(ShapeEdPreviewGui.extent,0)+212
SPC getWord(ShapeEdPreviewGui.extent,0)+42;
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
color = "0 0 0 .39";
};
new GuiShapeEdPreview(ShapeEdShapeView) {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "-209 -90";
Extent = getWord(ShapeEdPreviewGui.extent,0)+209
SPC getWord(ShapeEdPreviewGui.extent, 1)+90;
MinExtent = "8 8";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
renderMissionArea = "0";
GizmoProfile = "GlobalGizmoProfile";
cameraZRot = "0";
forceFOV = "0";
gridColor = "0 0 0 140";
renderNodes = "0";
renderObjBox = "0";
renderMounts = "0";
renderColMeshes = "0";
selectedNode = "-1";
sunDiffuse = "255 255 255 255";
sunAmbient = "180 180 180 255";
timeScale = "1.0";
fixedDetail = "0";
orbitNode = "0";
};
};
};
//--- OBJECT WRITE END ---

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,504 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiDefaultProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "0 0";
Extent = "1024 768";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
//---------------------------------------------------------------------------
// Shape selector window
new GuiWindowCollapseCtrl(ShapeEdSelectWindow) {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiWindowProfile";
HorizSizing = "windowRelative";
VertSizing = "windowRelative";
Position = getWord($pref::Video::mode, 0) - 209
SPC getWord(EditorGuiToolbar.extent, 1) - 1;
Extent = "210 213";
MinExtent = "210 114";
canSave = "1";
Visible = "0";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Margin = "4 4 4 4";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
EdgeSnap = "1";
text = "Shapes";
new GuiTabBookCtrl() {
internalName = "tabBook";
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiTabBookProfile";
HorizSizing = "width";
VertSizing = "height";
position = "4 24";
Extent = "202 165";
MinExtent = "8 -500";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
docking = "client";
Margin = "3 1 3 3";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
TabPosition = "Top";
TabMargin = "6";
MinTabWidth = "32";
//---------------------------------------------------------------
// Scene shapes (ie. the MissionGroup)
new GuiTabPageCtrl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiTabPageProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "0 19";
Extent = "202 146";
MinExtent = "0 -500";
canSave = "1";
Visible = "0";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
text = "Scene";
maxLength = "1024";
new GuiScrollCtrl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiScrollProfile";
HorizSizing = "width";
VertSizing = "height";
position = "0 0";
Extent = "202 146";
MinExtent = "8 -500";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "dynamic";
lockHorizScroll = false;
lockVertScroll = "false";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
new GuiTreeViewCtrl(ShapeEdShapeTreeView) {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiTreeViewProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "1 1";
Extent = "190 144";
MinExtent = "8 -500";
canSave = "1";
Visible = "1";
hovertime = "1000";
tabSize = "16";
textOffset = "2";
fullRowSelect = "0";
itemHeight = "21";
destroyTreeOnSleep = "1";
MouseDragging = "1";
MultipleSelections = "1";
DeleteObjectAllowed = "1";
DragToItemAllowed = "1";
showRoot = "1";
internalNamesOnly = "0";
showObjectIds = "0";
showClassNames = "0";
showObjectNames = "1";
showInternalNames = "1";
showClassNameForUnnamedObjects = "1";
};
};
};
//---------------------------------------------------------------
// All shapes
new GuiTabPageCtrl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiTabPageProfile";
HorizSizing = "width";
VertSizing = "height";
position = "0 19";
Extent = "202 146";
MinExtent = "0 -500";
canSave = "1";
Visible = "0";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
text = "Library";
maxLength = "1024";
new GuiContainer() {
isContainer = "1";
HorizSizing = "width";
VertSizing = "height";
position = "0 0";
Extent = "202 146";
MinExtent = "0 -500";
Profile = "GuiInspectorProfile";
};
new GuiBitmapBorderCtrl() {
isContainer = "1";
HorizSizing = "width";
VertSizing = "height";
position = "0 0";
Extent = "202 146";
MinExtent = "0 -500";
Profile = "GuiTabBorderProfile";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "3 4";
Extent = "20 19";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ShapeEdSelectWindow.navigateUp();";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/gui/images/folderUp";
};
new GuiPopUpMenuCtrl(ShapeEdSelectMenu) {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiPopUpMenuProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "26 4";
Extent = "172 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
text = "art";
maxLength = "1024";
maxPopupHeight = "200";
sbUsesNAColor = "0";
reverseTextList = "0";
bitmapBounds = "16 16";
};
new GuiScrollCtrl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiScrollProfile";
HorizSizing = "width";
VertSizing = "height";
position = "0 24";
Extent = "202 122";
MinExtent = "8 -500";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "dynamic";
lockHorizScroll = false;
lockVertScroll = "false";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
new GuiDynamicCtrlArrayControl() {
internalName = "shapeLibrary";
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiTransparentProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "1 1";
Extent = "189 42";
MinExtent = "8 11";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
colCount = "1";
colSize = "64";
rowCount = "0";
RowSize = "64";
rowSpacing = "4";
colSpacing = "4";
frozen = "0";
autoCellSize = "1";
fillRowFirst = "1";
dynamicSize = "1";
};
};
};
//---------------------------------------------------------------
// Shape hints
new GuiTabPageCtrl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiTabPageProfile";
HorizSizing = "width";
VertSizing = "height";
position = "0 19";
Extent = "202 146";
MinExtent = "0 -500";
canSave = "1";
Visible = "0";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
text = "Hints";
maxLength = "1024";
new GuiContainer() {
isContainer = "1";
HorizSizing = "width";
VertSizing = "height";
position = "0 0";
Extent = "202 146";
MinExtent = "0 -500";
Profile = "GuiInspectorProfile";
};
new GuiBitmapBorderCtrl() {
isContainer = "1";
HorizSizing = "width";
VertSizing = "height";
position = "0 0";
Extent = "202 146";
MinExtent = "0 -500";
Profile = "GuiTabBorderProfile";
};
new GuiScrollCtrl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiScrollProfile";
HorizSizing = "width";
VertSizing = "height";
position = "0 24";
Extent = "202 123";
MinExtent = "8 -500";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "dynamic";
lockHorizScroll = true;
lockVertScroll = "false";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
new GuiStackControl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiTransparentProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "0 1";
Extent = "185 50";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
StackingType = "Vertical";
HorizStacking = "Left to Right";
VertStacking = "Top to Bottom";
Padding = "2";
new GuiRolloutCtrl() {
Profile = "GuiShapeEdRolloutProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "1 0";
Extent = "184 24";
MinExtent = "8 -500";
Caption = "Nodes";
Margin = "2 2 2 2";
Expanded = "0";
new GuiStackControl() {
internalName = "nodeHints";
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiTransparentProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "0 24";
Extent = "184 0";
MinExtent = "8 -500";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
StackingType = "Vertical";
HorizStacking = "Left to Right";
VertStacking = "Top to Bottom";
Padding = "2";
};
};
new GuiRolloutCtrl() {
Profile = "GuiShapeEdRolloutProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "1 26";
Extent = "184 24";
MinExtent = "8 -500";
Caption = "Sequences";
Margin = "2 2 2 2";
Expanded = "0";
new GuiStackControl() {
internalName = "sequenceHints";
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiTransparentProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "0 0";
Extent = "184 24";
MinExtent = "8 -500";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
StackingType = "Vertical";
HorizStacking = "Left to Right";
VertStacking = "Top to Bottom";
Padding = "2";
};
};
};
};
new GuiTextCtrl(){
Position = "5 5";
Extent = "60 16";
text = "Shape Type";
};
new GuiPopUpMenuCtrl(ShapeEdHintMenu) {
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "GuiPopUpMenuProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "66 4";
Extent = "132 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
text = "art";
maxLength = "1024";
maxPopupHeight = "200";
sbUsesNAColor = "0";
reverseTextList = "0";
bitmapBounds = "16 16";
};
};
};
// Force load DAEs
new GuiCheckBoxCtrl() {
Profile = "GuiCheckBoxProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "135 27";
Extent = "72 13";
Variable = "EWorldEditor.forceLoadDAE";
Command = "EWorldEditor.forceLoadDAE = $ThisControl.getValue(); EditorSettings.setValue(\"forceLoadDAE\", EWorldEditor.forceLoadDAE);";
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Forces loading of DAE files (ignores cached.dts if present)";
hovertime = "1000";
text = " Force DAE";
};
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 341 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 B

View file

@ -0,0 +1,420 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Shape Editor
//------------------------------------------------------------------------------
function initializeShapeEditor()
{
echo(" % - Initializing Shape Editor");
exec("./gui/Profiles.ed.cs");
exec("./gui/shapeEdPreviewWindow.ed.gui");
exec("./gui/shapeEdAnimWindow.ed.gui");
exec("./gui/shapeEdAdvancedWindow.ed.gui");
exec("./gui/shapeEditorToolbar.ed.gui");
exec("./gui/shapeEdSelectWindow.ed.gui");
exec("./gui/shapeEdPropWindow.ed.gui");
exec("./scripts/shapeEditor.ed.cs");
exec("./scripts/shapeEditorHints.ed.cs");
exec("./scripts/shapeEditorActions.ed.cs");
// Add windows to editor gui
ShapeEdPreviewGui.setVisible(false);
ShapeEdAnimWindow.setVisible(false);
ShapeEditorToolbar.setVisible(false);
ShapeEdSelectWindow.setVisible(false);
ShapeEdPropWindow.setVisible(false);
EditorGui.add(ShapeEdPreviewGui);
EditorGui.add(ShapeEdAnimWindow);
EditorGui.add(ShapeEdAdvancedWindow);
EditorGui.add(ShapeEditorToolbar);
EditorGui.add(ShapeEdSelectWindow);
EditorGui.add(ShapeEdPropWindow);
new ScriptObject(ShapeEditorPlugin)
{
superClass = "EditorPlugin";
editorGui = ShapeEdShapeView;
};
%map = new ActionMap();
%map.bindCmd( keyboard, "escape", "ToolsToolbarArray->WorldEditorInspectorPalette.performClick();", "" );
%map.bindCmd( keyboard, "1", "ShapeEditorNoneModeBtn.performClick();", "" );
%map.bindCmd( keyboard, "2", "ShapeEditorMoveModeBtn.performClick();", "" );
%map.bindCmd( keyboard, "3", "ShapeEditorRotateModeBtn.performClick();", "" );
//%map.bindCmd( keyboard, "4", "ShapeEditorScaleModeBtn.performClick();", "" ); // not needed for the shape editor
%map.bindCmd( keyboard, "n", "ShapeEditorToolbar->showNodes.performClick();", "" );
%map.bindCmd( keyboard, "t", "ShapeEditorToolbar->ghostMode.performClick();", "" );
%map.bindCmd( keyboard, "r", "ShapeEditorToolbar->wireframeMode.performClick();", "" );
%map.bindCmd( keyboard, "f", "ShapeEditorToolbar->fitToShapeBtn.performClick();", "" );
%map.bindCmd( keyboard, "g", "ShapeEditorToolbar->showGridBtn.performClick();", "" );
%map.bindCmd( keyboard, "h", "ShapeEdSelectWindow->tabBook.selectPage( 2 );", "" ); // Load help tab
%map.bindCmd( keyboard, "l", "ShapeEdSelectWindow->tabBook.selectPage( 1 );", "" ); // load Library Tab
%map.bindCmd( keyboard, "j", "ShapeEdSelectWindow->tabBook.selectPage( 0 );", "" ); // load scene object Tab
%map.bindCmd( keyboard, "SPACE", "ShapeEdAnimWindow.togglePause();", "" );
%map.bindCmd( keyboard, "i", "ShapeEdSequences.onEditSeqInOut(\"in\", ShapeEdSeqSlider.getValue());", "" );
%map.bindCmd( keyboard, "o", "ShapeEdSequences.onEditSeqInOut(\"out\", ShapeEdSeqSlider.getValue());", "" );
%map.bindCmd( keyboard, "shift -", "ShapeEdSeqSlider.setValue(ShapeEdAnimWindow-->seqIn.getText());", "" );
%map.bindCmd( keyboard, "shift =", "ShapeEdSeqSlider.setValue(ShapeEdAnimWindow-->seqOut.getText());", "" );
%map.bindCmd( keyboard, "=", "ShapeEdAnimWindow-->stepFwdBtn.performClick();", "" );
%map.bindCmd( keyboard, "-", "ShapeEdAnimWindow-->stepBkwdBtn.performClick();", "" );
ShapeEditorPlugin.map = %map;
ShapeEditorPlugin.initSettings();
}
function destroyShapeEditor()
{
}
function SetToggleButtonValue(%ctrl, %value)
{
if ( %ctrl.getValue() != %value )
%ctrl.performClick();
}
// Replace the command field in an Editor PopupMenu item (returns the original value)
function ShapeEditorPlugin::replaceMenuCmd(%this, %menuTitle, %id, %newCmd)
{
%menu = EditorGui.findMenu( %menuTitle );
%cmd = getField( %menu.item[%id], 2 );
%menu.setItemCommand( %id, %newCmd );
return %cmd;
}
function ShapeEditorPlugin::onWorldEditorStartup(%this)
{
// Add ourselves to the window menu.
%accel = EditorGui.addToEditorsMenu("Shape Editor", "", ShapeEditorPlugin);
// Add ourselves to the ToolsToolbar
%tooltip = "Shape Editor (" @ %accel @ ")";
EditorGui.addToToolsToolbar( "ShapeEditorPlugin", "ShapeEditorPalette", expandFilename("tools/worldEditor/images/toolbar/shape-editor"), %tooltip );
// 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);
ShapeEdAdvancedWindow-->tabBook.selectPage(0);
ShapeEdSelectWindow-->tabBook.selectPage(0);
ShapeEdSelectWindow.navigate("");
SetToggleButtonValue( ShapeEditorToolbar-->orbitNodeBtn, 0 );
SetToggleButtonValue( ShapeEditorToolbar-->ghostMode, 0 );
// Initialise hints menu
ShapeEdHintMenu.clear();
%count = ShapeHintGroup.getCount();
for (%i = 0; %i < %count; %i++)
{
%hint = ShapeHintGroup.getObject(%i);
ShapeEdHintMenu.add(%hint.objectType, %hint);
}
}
function ShapeEditorPlugin::open(%this, %filename)
{
if ( !%this.isActivated )
{
// Activate the Shape Editor
EditorGui.setEditor( %this, true );
// Get editor settings (note the sun angle is not configured in the settings
// dialog, so apply the settings here instead of in readSettings)
%this.readSettings();
ShapeEdShapeView.sunAngleX = EditorSettings.value("ShapeEditor/SunAngleX");
ShapeEdShapeView.sunAngleZ = EditorSettings.value("ShapeEditor/SunAngleZ");
EWorldEditor.forceLoadDAE = EditorSettings.value("forceLoadDAE");
$wasInWireFrameMode = $gfx::wireframe;
ShapeEditorToolbar-->wireframeMode.setStateOn($gfx::wireframe);
if ( GlobalGizmoProfile.getFieldValue(alignment) $= "Object" )
ShapeEdNodes-->objectTransform.setStateOn(1);
else
ShapeEdNodes-->worldTransform.setStateOn(1);
// Initialise and show the shape editor
ShapeEdShapeTreeView.open(MissionGroup);
ShapeEdShapeTreeView.buildVisibleTree(true);
ShapeEdPreviewGui.setVisible(true);
ShapeEdSelectWindow.setVisible(true);
ShapeEdPropWindow.setVisible(true);
ShapeEdAnimWindow.setVisible(true);
ShapeEdAdvancedWindow.setVisible(ShapeEditorToolbar-->showAdvanced.getValue());
ShapeEditorToolbar.setVisible(true);
EditorGui.bringToFront(ShapeEdPreviewGui);
ToolsPaletteArray->WorldEditorMove.performClick();
%this.map.push();
// Switch to the ShapeEditor UndoManager
%this.oldUndoMgr = Editor.getUndoManager();
Editor.setUndoManager( ShapeEdUndoManager );
ShapeEdShapeView.setDisplayType( EditorGui.currentDisplayType );
%this.initStatusBar();
// Customise menu bar
%this.oldCamFitCmd = %this.replaceMenuCmd( "Camera", 8, "ShapeEdShapeView.fitToShape();" );
%this.oldCamFitOrbitCmd = %this.replaceMenuCmd( "Camera", 9, "ShapeEdShapeView.fitToShape();" );
Parent::onActivated(%this);
}
// Select the new shape
if (isObject(ShapeEditor.shape) && (ShapeEditor.shape.baseShape $= %filename))
{
// Shape is already selected => re-highlight the selected material if necessary
ShapeEdMaterials.updateSelectedMaterial(ShapeEdMaterials-->highlightMaterial.getValue());
}
else if (%filename !$= "")
{
ShapeEditor.selectShape(%filename, ShapeEditor.isDirty());
// 'fitToShape' only works after the GUI has been rendered, so force a repaint first
Canvas.repaint();
ShapeEdShapeView.fitToShape();
}
}
function ShapeEditorPlugin::onActivated(%this)
{
%this.open("");
// Try to start with the shape selected in the world editor
%count = EWorldEditor.getSelectionSize();
for (%i = 0; %i < %count; %i++)
{
%obj = EWorldEditor.getSelectedObject(%i);
%shapeFile = ShapeEditor.getObjectShapeFile(%obj);
if (%shapeFile !$= "")
{
if (!isObject(ShapeEditor.shape) || (ShapeEditor.shape.baseShape !$= %shapeFile))
{
// Call the 'onSelect' method directly if the object is not in the
// MissionGroup tree (such as a Player or Projectile object).
ShapeEdShapeTreeView.clearSelection();
if (!ShapeEdShapeTreeView.selectItem(%obj))
ShapeEdShapeTreeView.onSelect(%obj);
// 'fitToShape' only works after the GUI has been rendered, so force a repaint first
Canvas.repaint();
ShapeEdShapeView.fitToShape();
}
break;
}
}
}
function ShapeEditorPlugin::initStatusBar(%this)
{
EditorGuiStatusBar.setInfo("Shape editor ( Shift Click ) to speed up camera.");
EditorGuiStatusBar.setSelection( ShapeEditor.shape.baseShape );
}
function ShapeEditorPlugin::onDeactivated(%this)
{
%this.writeSettings();
// Notify game objects if shape has been modified
if ( ShapeEditor.isDirty() )
ShapeEditor.shape.notifyShapeChanged();
$gfx::wireframe = $wasInWireFrameMode;
ShapeEdMaterials.updateSelectedMaterial(false);
ShapeEditorToolbar.setVisible(false);
ShapeEdPreviewGui.setVisible(false);
ShapeEdSelectWindow.setVisible(false);
ShapeEdPropWindow.setVisible(false);
ShapeEdAnimWindow.setVisible(false);
ShapeEdAdvancedWindow.setVisible(false);
if( EditorGui-->MatEdPropertiesWindow.visible )
{
ShapeEdMaterials.editSelectedMaterialEnd( true );
}
%this.map.pop();
// Restore the original undo manager
Editor.setUndoManager( %this.oldUndoMgr );
// Restore menu bar
%this.replaceMenuCmd( "Camera", 8, %this.oldCamFitCmd );
%this.replaceMenuCmd( "Camera", 9, %this.oldCamFitOrbitCmd );
Parent::onDeactivated(%this);
}
function ShapeEditorPlugin::onExitMission( %this )
{
// unselect the current shape
ShapeEdShapeView.setModel( "" );
if (ShapeEditor.shape != -1)
ShapeEditor.shape.delete();
ShapeEditor.shape = 0;
ShapeEdUndoManager.clearAll();
ShapeEditor.setDirty( false );
ShapeEdSequenceList.clear();
ShapeEdNodeTreeView.removeItem( 0 );
ShapeEdPropWindow.update_onNodeSelectionChanged( -1 );
ShapeEdDetailTree.removeItem( 0 );
ShapeEdMaterialList.clear();
ShapeEdMountWindow-->mountList.clear();
ShapeEdThreadWindow-->seqList.clear();
ShapeEdThreadList.clear();
}
function ShapeEditorPlugin::openShape( %this, %path, %discardChangesToCurrent )
{
EditorGui.setEditor( ShapeEditorPlugin );
if( ShapeEditor.isDirty() && !%discardChangesToCurrent )
{
MessageBoxYesNo( "Save Changes?",
"Save changes to current shape?",
"ShapeEditor.saveChanges(); ShapeEditorPlugin.openShape(\"" @ %path @ "\");",
"ShapeEditorPlugin.openShape(\"" @ %path @ "\");" );
return;
}
ShapeEditor.selectShape( %path );
ShapeEdShapeView.fitToShape();
}
function shapeEditorWireframeMode()
{
$gfx::wireframe = !$gfx::wireframe;
ShapeEditorToolbar-->wireframeMode.setStateOn($gfx::wireframe);
}
//-----------------------------------------------------------------------------
// Settings
//-----------------------------------------------------------------------------
function ShapeEditorPlugin::initSettings( %this )
{
EditorSettings.beginGroup( "ShapeEditor", true );
// Display options
EditorSettings.setDefaultValue( "BackgroundColor", "0 0 0 100" );
EditorSettings.setDefaultValue( "HighlightMaterial", 1 );
EditorSettings.setDefaultValue( "ShowNodes", 1 );
EditorSettings.setDefaultValue( "ShowBounds", 0 );
EditorSettings.setDefaultValue( "ShowObjBox", 1 );
EditorSettings.setDefaultValue( "RenderMounts", 1 );
EditorSettings.setDefaultValue( "RenderCollision", 0 );
// Grid
EditorSettings.setDefaultValue( "ShowGrid", 1 );
EditorSettings.setDefaultValue( "GridSize", 0.1 );
EditorSettings.setDefaultValue( "GridDimension", "40 40" );
// Sun
EditorSettings.setDefaultValue( "SunDiffuseColor", "255 255 255 255" );
EditorSettings.setDefaultValue( "SunAmbientColor", "180 180 180 255" );
EditorSettings.setDefaultValue( "SunAngleX", "45" );
EditorSettings.setDefaultValue( "SunAngleZ", "135" );
// Sub-windows
EditorSettings.setDefaultValue( "AdvancedWndVisible", "1" );
EditorSettings.endGroup();
}
function ShapeEditorPlugin::readSettings( %this )
{
EditorSettings.beginGroup( "ShapeEditor", true );
// Display options
ShapeEdPreviewGui-->previewBackground.color = ColorIntToFloat( EditorSettings.value("BackgroundColor") );
SetToggleButtonValue( ShapeEdMaterials-->highlightMaterial, EditorSettings.value( "HighlightMaterial" ) );
SetToggleButtonValue( ShapeEditorToolbar-->showNodes, EditorSettings.value( "ShowNodes" ) );
SetToggleButtonValue( ShapeEditorToolbar-->showBounds, EditorSettings.value( "ShowBounds" ) );
SetToggleButtonValue( ShapeEditorToolbar-->showObjBox, EditorSettings.value( "ShowObjBox" ) );
SetToggleButtonValue( ShapeEditorToolbar-->renderColMeshes, EditorSettings.value( "RenderCollision" ) );
SetToggleButtonValue( ShapeEdMountWindow-->renderMounts, EditorSettings.value( "RenderMounts" ) );
// Grid
SetToggleButtonValue( ShapeEditorToolbar-->showGridBtn, EditorSettings.value( "ShowGrid" ) );
ShapeEdShapeView.gridSize = EditorSettings.value( "GridSize" );
ShapeEdShapeView.gridDimension = EditorSettings.value( "GridDimension" );
// Sun
ShapeEdShapeView.sunDiffuse = EditorSettings.value("SunDiffuseColor");
ShapeEdShapeView.sunAmbient = EditorSettings.value("SunAmbientColor");
// Sub-windows
SetToggleButtonValue( ShapeEditorToolbar-->showAdvanced, EditorSettings.value( "AdvancedWndVisible" ) );
EditorSettings.endGroup();
}
function ShapeEditorPlugin::writeSettings( %this )
{
EditorSettings.beginGroup( "ShapeEditor", true );
// Display options
EditorSettings.setValue( "BackgroundColor", ColorFloatToInt( ShapeEdPreviewGui-->previewBackground.color ) );
EditorSettings.setValue( "HighlightMaterial", ShapeEdMaterials-->highlightMaterial.getValue() );
EditorSettings.setValue( "ShowNodes", ShapeEditorToolbar-->showNodes.getValue() );
EditorSettings.setValue( "ShowBounds", ShapeEditorToolbar-->showBounds.getValue() );
EditorSettings.setValue( "ShowObjBox", ShapeEditorToolbar-->showObjBox.getValue() );
EditorSettings.setValue( "RenderCollision", ShapeEditorToolbar-->renderColMeshes.getValue() );
EditorSettings.setValue( "RenderMounts", ShapeEdMountWindow-->renderMounts.getValue() );
// Grid
EditorSettings.setValue( "ShowGrid", ShapeEditorToolbar-->showGridBtn.getValue() );
EditorSettings.setValue( "GridSize", ShapeEdShapeView.gridSize );
EditorSettings.setValue( "GridDimension", ShapeEdShapeView.gridDimension );
// Sun
EditorSettings.setValue( "SunDiffuseColor", ShapeEdShapeView.sunDiffuse );
EditorSettings.setValue( "SunAmbientColor", ShapeEdShapeView.sunAmbient );
EditorSettings.setValue( "SunAngleX", ShapeEdShapeView.sunAngleX );
EditorSettings.setValue( "SunAngleZ", ShapeEdShapeView.sunAngleZ );
// Sub-windows
EditorSettings.setValue( "AdvancedWndVisible", ShapeEditorToolbar-->showAdvanced.getValue() );
EditorSettings.endGroup();
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,142 @@
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
// The Shape Editor tool can provide some simple hints about which nodes and
// sequences are required/desired for a particular type of shape to work with
// Torque. The following objects define the node and sequence hints, and the
// Shape Editor gui marks them as present or not-present in the current shape.
new SimGroup (ShapeHintControls)
{
};
new SimGroup (ShapeHintGroup)
{
new ScriptObject()
{
objectType = "ShapeBase";
node0 = "cam" TAB "This node is used as the 3rd person camera position.";
node1 = "eye" TAB "This node is used as the 1st person camera position.";
node2 = "ear" TAB "This node is where the SFX listener is mounted on (if missing, eye is used).";
node3 = "mount0-31" TAB "Nodes used for mounting ShapeBaseImages to this object";
node4 = "AIRepairNode" TAB "unused";
sequence0 = "Visibility" TAB "2 frame sequence used to show object damage (start=no damage, end=fully damaged)";
sequence1 = "Damage" TAB "Sequence used to show object damage (start=no damage, end=fully damaged)";
};
new ScriptObject()
{
objectType = "ShapeBaseImageData";
node0 = "ejectPoint" TAB "Node from which shell casings are emitted (for weapon ShapeImages)";
node1 = "muzzlePoint" TAB "Node used to fire projectiles and particles (for weapon ShapeImages)";
node2 = "retractionPoint" TAB "Nearest point to use as muzzle when up against a wall (and muzzle node is inside wall)";
node3 = "mountPoint" TAB "Where to attach to on this object";
sequence0 = "ambient" TAB "Cyclic sequence to play while image is mounted";
sequence1 = "spin" TAB "Cyclic sequence to play while image is mounted";
};
new ScriptObject()
{
objectType = "Player";
node0 = "Bip01 Pelvis" TAB "";
node1 = "Bip01 Spine" TAB "";
node2 = "Bip01 Spine1" TAB "";
node3 = "Bip01 Spine2" TAB "";
node4 = "Bip01 Neck" TAB "";
node5 = "Bip01 Head" TAB "";
sequence0 = "head" TAB "Vertical head movement (for looking) (start=full up, end=full down)";
sequence1 = "headside" TAB "Horizontal head movement (for looking) (start=full left, end=full right)";
sequence2 = "look" TAB "Vertical arm movement (for looking) (start=full up, end=full down)";
sequence3 = "light_recoil" TAB "Player has been hit lightly";
sequence4 = "medium_recoil" TAB "Player has been hit moderately hard";
sequence5 = "heavy_recoil" TAB "Player has been hit hard";
sequence6 = "root" TAB "Player is not moving";
sequence7 = "run" TAB "Player is running forward";
sequence8 = "back" TAB "Player is running backward";
sequence9 = "side" TAB "Player is running sideways left (strafing)";
sequence9 = "side_right" TAB "Player is running sideways right (strafing)";
sequence10 = "crouch_root" TAB "Player is crouched and not moving";
sequence11 = "crouch_forward" TAB "Player is crouched and moving forward";
sequence11 = "crouch_backward" TAB "Player is crouched and moving backward";
sequence11 = "crouch_side" TAB "Player is crouched and moving sideways left";
sequence11 = "crouch_right" TAB "Player is crouched and moving sideways right";
sequence12 = "prone_root" TAB "Player is lying down and not moving";
sequence13 = "prone_forward" TAB "Player is lying down and moving forward";
sequence13 = "prone_backward" TAB "Player is lying down and moving backward";
sequence14 = "swim_root" TAB "Player is swimming and not moving";
sequence15 = "swim_forward" TAB "Player is swimming and moving forward";
sequence16 = "swim_backward" TAB "Player is swimming and moving backward";
sequence17 = "swim_left" TAB "Player is swimming and moving left";
sequence18 = "swim_right" TAB "Player is swimming and moving right";
sequence19 = "fall" TAB "Player is falling";
sequence20 = "jump" TAB "Player has jumped from a moving start";
sequence21 = "standjump" TAB "Player has jumped from a standing start";
sequence22 = "land" TAB "Player has landed after falling";
sequence23 = "jet" TAB "Player is jetting";
sequence24 = "death1-11" TAB "Player has been killed (only one of these will play)";
};
new ScriptObject()
{
objectType = "WheeledVehicle";
node0 = "hub0-7" TAB "Placement node for wheel X";
sequence0 = "spring0-7" TAB "Spring suspension for wheel X (start=fully compressed, end=fully extended)";
sequence1 = "steering" TAB "Steering mechanism (start=full left, end=full right)";
sequence2 = "brakelight" TAB "Sequence to play when braking (start=brakes off, end=brakes on)";
};
new ScriptObject()
{
objectType = "HoverVehicle";
node0 = "JetNozzle0-3" TAB "Nodes for jet engine exhaust particle emission";
node1 = "JetNozzleX" TAB "Nodes for jet engine exhaust particle emission";
sequence0 = "activateBack" TAB "Non-cyclic sequence to play when vehicle first starts moving backwards";
sequence1 = "maintainBack" TAB "Cyclic sequence to play when vehicle continues moving backwards";
};
new ScriptObject()
{
objectType = "FlyingVehicle";
node0 = "JetNozzle0-3" TAB "Nodes for jet engine exhaust particle emission";
node1 = "JetNozzleX" TAB "Nodes for jet engine exhaust particle emission";
node2 = "JetNozzleY" TAB "Nodes for jet engine exhaust particle emission";
node3 = "contrail0-3" TAB "Nodes for contrail particle emission";
sequence0 = "activateBack" TAB "Sequence to play when vehicle first starts thrusting backwards";
sequence1 = "maintainBack" TAB "Cyclic sequence to play when vehicle continues thrusting backwards";
sequence2 = "activateBot" TAB "Non-cyclic sequence to play when vehicle first starts thrusting upwards";
sequence3 = "maintainBot" TAB "Cyclic sequence to play when vehicle continues thrusting upwards";
};
new ScriptObject()
{
objectType = "Projectile";
sequence0 = "activate" TAB "Non-cyclic sequence to play when projectile is first created";
sequence1 = "maintain" TAB "Cyclic sequence to play for remainder of projectile lifetime";
};
};