Merge branch 'development' of https://github.com/TorqueGameEngines/Torque3D into SubScenes_Gamemode_PR

This commit is contained in:
JeffR 2024-09-28 22:11:39 -05:00
commit 20a01d9f02
71 changed files with 353 additions and 509 deletions

View file

@ -19,6 +19,19 @@ $guiContent = new GuiContainer(EditorGui,EditorGuiGroup) {
AnchorLeft = "1";
AnchorRight = "0";
new GuiDecoyCtrl(EditorGuiMainTabBookBG) {
profile = "GuiDarkFillProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 5";
extent = "800 24";
minExtent = "8 8";
visible = "1";
helpTag = "0";
useMouseEvents = "0";
isDecoy = "1";
};
new GuiTabBookCtrl(EditorGuiMainTabBook) {
tabHeight = "20";
selectedPage = "0";
@ -261,7 +274,7 @@ $guiContent = new GuiContainer(EditorGui,EditorGuiGroup) {
HorizSizing = "width";
VertSizing = "bottom";
Position = "0 0";
Extent = "800 37";
Extent = "800 40";
MinExtent = "8 8";
Margin = "0 0 0 0";
Padding = "0 0 0 0";

View file

@ -23,7 +23,7 @@ $guiContent = new GuiControl(EditorSettingsWindow,EditorGuiGroup) {
canMaximize = "0";
minSize = "50 50";
EdgeSnap = "1";
text = ":: Editor Settings";
text = ":: Editor Settings";
closeCommand = "ESettingsWindow.hideDialog();";
Margin = "0 0 0 0";
Padding = "0 0 0 0";

View file

@ -29,7 +29,7 @@ $guiContent = new GuiControl(ManageBookmarksContainer, EditorGuiGroup) {
position = "50 90";
extent = "180 306";
MinExtent = "120 130";
text = ":: Camera Bookmark Manager";
text = ":: Camera Bookmark Manager";
closeCommand = "EManageBookmarks.hideDialog();";
EdgeSnap = "0";
canCollapse = "0";

View file

@ -27,7 +27,7 @@ $guiContent = new GuiControl(ManageSFXParametersContainer,EditorGuiGroup) {
minSize = "50 50";
closeCommand = "EManageSFXParameters.setVisible( false );";
EdgeSnap = "0";
text = ":: Audio Parameters";
text = ":: Audio Parameters";
Margin = "5 5 5 5";
Padding = "5 5 5 5";
AnchorTop = "1";

View file

@ -30,7 +30,7 @@ $guiContent = new GuiControl(ObjectSnapOptionsContainer, EditorGuiGroup) {
position = "400 31";
extent =" 175 267";
MinExtent = "175 130";
text = ":: Snap Options";
text = ":: Snap Options";
closeCommand = "ESnapOptions.hideDialog();";
EdgeSnap = "0";
canCollapse = "0";

View file

@ -47,7 +47,7 @@ $guiContent = new GuiControl(TerrainPainterContainer,EditorGuiGroup) {
minSize = "300 160";
closeCommand = "EPainter.parentGroup.setVisible(false);";
EdgeSnap = "1";
text = ":: Terrain Painter - Preview";
text = ":: Terrain Painter - Preview";
new GuiContainer(EPainterPreviewCont){
Docking = "Client";
@ -293,7 +293,7 @@ $guiContent = new GuiControl(TerrainPainterContainer,EditorGuiGroup) {
minSize = "152 300";
closeCommand = "EPainter.parentGroup.setVisible(false);";
EdgeSnap = "1";
text = ":: Terrain Painter - Selector";
text = ":: Terrain Painter - Selector";
new GuiScrollCtrl( EPainterScroll ) {
canSaveDynamicFields = "0";

View file

@ -9,13 +9,26 @@ $guiContent = new GuiContainer(EWToolsToolbar) {
VertSizing = "bottom";
Position = "0 38";
Extent = "0 33";
MinExtent = "8 2";
MinExtent = "8 34";
canSave = "1";
Visible = "1";
hovertime = "1000";
isClosed = "0";
isDynamic = "0";
new GuiDecoyCtrl(EWToolsToolbarSpacer) {
profile = "ToolsMenubarProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 3";
extent = "4 33";
minExtent = "8 8";
visible = "1";
helpTag = "0";
useMouseEvents = "0";
isDecoy = "1";
};
new GuiDynamicCtrlArrayControl(ToolsToolbarArray) {
canSaveDynamicFields = "0";
Enabled = "1";
@ -24,15 +37,15 @@ $guiContent = new GuiContainer(EWToolsToolbar) {
HorizSizing = "width";
VertSizing = "bottom";
position = "4 3";
Extent = "264 32";
MinExtent = "1024 32";
Extent = "264 33";
MinExtent = "1024 33";
canSave = "1";
Visible = "1";
hovertime = "1000";
colCount = "1";
colSize = "29";
RowSize = "27";
rowSpacing = "2";
rowSpacing = "1";
colSpacing = "4";
};
new GuiBitmapButtonCtrl() {
@ -61,7 +74,7 @@ $guiContent = new GuiContainer(EWToolsToolbar) {
horizSizing = "right";
vertSizing = "bottom";
position = "1 1";
extent = "35 31";
extent = "35 33";
minExtent = "8 8";
visible = "0";
helpTag = "0";

View file

@ -44,7 +44,7 @@ $guiContent = new GuiControl() {
closeCommand = "EWInspectorWindow.setVisible(false);";
minSize = "50 50";
EdgeSnap = "1";
text = ":: World Editor - Inspector";
text = ":: World Editor - Inspector";
new GuiContainer(EWInspectorContainer) {
canSaveDynamicFields = "0";

View file

@ -44,7 +44,7 @@ $guiContent = new GuiControl() {
minSize = "50 50";
closeCommand = "EWTreeWindow.setVisible(false);";
EdgeSnap = "1";
text = ":: World Edior - Scene Tree";
text = ":: World Editor - Scene Tree";
new GuiTabBookCtrl(EditorTreeTabBook) {
canSaveDynamicFields = "0";

View file

@ -46,7 +46,7 @@ $guiContent = new GuiControl(TerrainImportGui, EditorGuiGroup) {
minSize = "4 4";
closeCommand = "Canvas.popDialog( TerrainImportGui );";
EdgeSnap = "0";
text = ":: Import Terrain Height Map";
text = ":: Import Terrain Height Map";
new GuiTextEditCtrl() {
canSaveDynamicFields = "0";

View file

@ -7,7 +7,7 @@ $guiContent = new GuiControl(TerrainMaterialDlg,EditorGuiGroup) {
canSaveDynamicFields = "1";
new GuiWindowCtrl() {
text = ":: Terrain Materials Editor";
text = ":: Terrain Materials Editor";
resizeWidth = "0";
canMinimize = "0";
canMaximize = "0";

View file

@ -628,6 +628,7 @@ function EditorGui::updateSideBar(%this)
{
if(GuiEditorIsActive())
{
// Update the Asset Browser's size
if(isObject(AssetBrowserWindow) && isObject(GuiEditorSidebar))
{
if(AssetBrowserWindow.docked == true)
@ -639,6 +640,19 @@ function EditorGui::updateSideBar(%this)
AssetBrowserWindow.resize(0, %browserPosY, %browserWidth, %browserHeight);
}
}
// Update the Windowed Console's size
if(isObject(windowConsoleControl) && isObject(GuiEditorSidebar))
{
if(windowConsoleControl.docked == true)
{
// The width is relative to the sidepanel
%consoleWidth = Canvas.extent.x - GuiEditorSidebar.extent.x;
%consoleHeight = windowConsoleControl.extent.y;
%consolePosY = Canvas.extent.y - windowConsoleControl.extent.y - 33;
windowConsoleControl.resize(0, %consolePosY, %consoleWidth, %consoleHeight);
}
}
return;
}
@ -1019,6 +1033,10 @@ function WorldEditorPlugin::onActivated( %this )
ETransformSelection.setVisible(true);
}
EWorldEditor.UseGridSnap = EditorSettings.value("WorldEditor/Tools/UseGridSnap");
ESnapOptions-->GridSnapButton.setStateOn( EWorldEditor.UseGridSnap );
SnapToBar-->objectGridSnapBtn.setStateOn( EWorldEditor.UseGridSnap );
Parent::onActivated(%this);
}
@ -1616,9 +1634,10 @@ function EWorldEditor::maxSize(%this, %window)
%fixedWindow = EWTreeWindow;
%fluidWindow = EWInspectorWindow;
%top = EditorGuiToolbar.extent.y + 6;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;
%offset = 25; // tweak the vertical offset so that it aligns neatly
%top = EditorGuiToolbar.extent.y + %offset;
%bottom = %top + 59;
%maxHeight = Canvas.extent.y - %top - %bottom + 12;
// --- Fixed window (top) ------------------------------------------------
// put it back if it moved
@ -2495,7 +2514,8 @@ function EWorldEditor::syncGui( %this )
ESnapOptions-->SnapSize.setText( EWorldEditor.getSoftSnapSize() );
ESnapOptions-->GridSize.setText( EWorldEditor.getGridSize() );
ESnapOptions-->GridSnapButton.setStateOn( %this.getGridSnap() );
%this.UseGridSnap = EditorSettings.value("WorldEditor/Tools/UseGridSnap");
ESnapOptions-->GridSnapButton.setStateOn( %this.UseGridSnap );
%this.UseGroupCenter = EditorSettings.value("WorldEditor/Tools/UseGroupCenter");
@ -2840,7 +2860,9 @@ function toggleSnappingOptions( %var )
}
else if( %var $= "grid" )
{
EWorldEditor.setGridSnap( !EWorldEditor.getGridSnap() );
EWorldEditor.UseGridSnap = !EWorldEditor.UseGridSnap;
EditorSettings.setValue("WorldEditor/Tools/UseGridSnap", EWorldEditor.UseGridSnap );
EWorldEditor.setGridSnap( EWorldEditor.UseGridSnap );
}
else if( %var $= "byGroup" )
{

View file

@ -596,8 +596,9 @@ function TerrainPainterContainer::maxSize(%this, %window)
%fixedWindow = EPainterPreview;
%fluidWindow = EPainter;
%top = EditorGuiToolbar.extent.y + 6;
%bottom = %top + 65 - 6;
%offset = 23; // tweak the vertical offset so that it aligns neatly
%top = EditorGuiToolbar.extent.y + %offset;
%bottom = %top + 59;
%maxHeight = Canvas.extent.y - %top - %bottom;
// --- Fixed window (top) ------------------------------------------------
@ -635,7 +636,7 @@ function TerrainPainterContainer::maxSize(%this, %window)
// --- Windowed Console --------------------------------------------------
if(isObject(windowConsoleControl))
{
// Only resize the AssetBrowser if it's docked
// Only resize the console if it's docked
if(windowConsoleControl.docked == true)
{
// The width is relative to the sidepanel

View file

@ -1,31 +1,9 @@
singleton GFXStateBlockData( Viz_DefaultVisualizeState )
{
/*alphaDefined = true;
alphaTestEnable = true;
alphaTestRef = 1;
alphaTestFunc = GFXCmpGreaterEqual;
// Do a one to one blend.
blendDefined = true;
blendEnable = true;
blendDefined = false;
blendEnable = false;
blendSrc = GFXBlendOne;
blendDest = GFXBlendOne;
zDefined = true;
zEnable = false;
zWriteEnable = false;
samplersDefined = true;
samplerStates[0] = SamplerClampPoint;
samplerStates[1] = SamplerClampPoint;
samplerStates[2] = SamplerClampPoint;
samplerStates[3] = SamplerClampPoint;
samplerStates[4] = SamplerClampLinear;
samplerStates[5] = SamplerClampLinear;*/
blendDefined = true;
blendEnable = true;
blendSrc = GFXBlendSrcAlpha;
blendDest = GFXBlendInvSrcAlpha;
blendDest = GFXBlendZero;
zDefined = true;
zEnable = false;
@ -36,7 +14,6 @@ singleton GFXStateBlockData( Viz_DefaultVisualizeState )
samplerStates[1] = SamplerClampPoint;
samplerStates[2] = SamplerClampPoint;
samplerStates[3] = SamplerClampLinear; // depthviz
samplerStates[4] = SamplerClampLinear; // depthviz
};
singleton shaderData( Viz_TexelDensity )
@ -92,7 +69,6 @@ singleton shaderData( Viz_SurfaceProperties )
samplerNames[2] = "$matInfoBuffer";
samplerNames[3] = "$ssaoMaskTex";
samplerNames[4] = "$backbufferTex";
samplerNames[5] = "$glowBuffer";
pixVersion = 2.0;
};
@ -106,7 +82,6 @@ singleton PostEffect( Viz_SurfacePropertiesPFX )
texture[2] = "#matinfo";
texture[3] = "#ssaoMask";
texture[4] = "$backBuffer";
texture[5] = "#glowbuffer";
target = "$backBuffer";
renderPriority = 9999;
@ -186,8 +161,6 @@ function toggleSurfacePropertiesViz( %mode )
$Viz_SurfacePropertiesModeVar = "12";
case "Backbuffer":
$Viz_SurfacePropertiesModeVar = "13";
case "Glow":
$Viz_SurfacePropertiesModeVar = "14";
default:
$Viz_SurfacePropertiesModeVar = "-1";
}
@ -269,8 +242,8 @@ singleton PostEffect( Viz_ColorBlindnessPFX )
{
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterBin";
renderBin = "GlowBin";
renderTime = "PFXBeforeBin";
renderBin = "EditorBin";
shader = Viz_ColorBlindness;
stateBlock = PFX_DefaultStateBlock;

View file

@ -32,7 +32,6 @@ uniform sampler2D colorBuffer;
uniform sampler2D matInfoBuffer;
uniform sampler2D ssaoMaskTex;
uniform sampler2D backbufferTex;
uniform sampler2D glowBuffer;
uniform float mode;
uniform vec3 eyePosWorld;
@ -78,6 +77,4 @@ void main()
OUT_col = vec4(texture( ssaoMaskTex, IN_uv0 ).rgb, 1.0);
else if(mode == 13)
OUT_col = vec4(texture( backbufferTex, IN_uv0 ).rgb, 1.0);
else if(mode == 14)
OUT_col = vec4(texture( glowBuffer, IN_uv0 ).rgb, 1.0);
}

View file

@ -30,7 +30,6 @@ TORQUE_UNIFORM_SAMPLER2D(colorBuffer, 1);
TORQUE_UNIFORM_SAMPLER2D(matInfoBuffer, 2);
TORQUE_UNIFORM_SAMPLER2D(ssaoMaskTex, 3);
TORQUE_UNIFORM_SAMPLER2D(backbufferTex, 4);
TORQUE_UNIFORM_SAMPLER2D(glowBuffer, 5);
uniform float mode;
uniform float4x4 cameraToWorld;
@ -76,8 +75,6 @@ float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
float4(TORQUE_TEX2D( ssaoMaskTex, IN.uv0 ).rgb, 1.0);
else if(mode == 13)
float4(TORQUE_TEX2D( backbufferTex, IN.uv0 ).rgb, 1.0);
else if(mode == 14)
float4(TORQUE_TEX2D( glowBuffer, IN.uv0 ).rgb, 1.0);
return float4(0,0,0,1);
}