mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-19 03:15:27 +00:00
Make terrain texture settings global, add dialog to painter
This commit is contained in:
parent
d3996aec84
commit
db496fa0c4
10 changed files with 483 additions and 317 deletions
|
|
@ -11,6 +11,18 @@ function Core_Rendering::onCreate(%this)
|
|||
|
||||
$pref::ReflectionProbes::BakeResolution = ProjectSettings.value("Rendering/ProbeCaptureResolution", "64");
|
||||
|
||||
$Terrain::LerpBlend = ProjectSettings.value("Terrain/LerpBlend");
|
||||
|
||||
$Terrain::DetailTextureSize = ProjectSettings.value("Terrain/DetailTextureSize");
|
||||
$Terrain::MacroTextureSize = ProjectSettings.value("Terrain/MacroTextureSize");
|
||||
$Terrain::NormalTextureSize = ProjectSettings.value("Terrain/NormalTextureSize");
|
||||
$Terrain::OrmTextureSize = ProjectSettings.value("Terrain/OrmTextureSize");
|
||||
|
||||
$Terrain::DetailTextureFormat = ProjectSettings.value("Terrain/DetailTextureFormat");
|
||||
$Terrain::MacroTextureFormat = ProjectSettings.value("Terrain/MacroTextureFormat");
|
||||
$Terrain::NormalTextureFormat = ProjectSettings.value("Terrain/NormalTextureFormat");
|
||||
$Terrain::OrmTextureFormat = ProjectSettings.value("Terrain/OrmTextureFormat");
|
||||
|
||||
exec("./scripts/graphicsOptions.cs");
|
||||
exec("./scripts/renderManager.cs");
|
||||
exec("./scripts/gfxData/clouds.cs");
|
||||
|
|
|
|||
|
|
@ -464,9 +464,9 @@
|
|||
bitmap = "tools/gui/images/separator-h.png";
|
||||
};
|
||||
|
||||
new GuiControl(LerpBlendCheckButtonContainer,EditorGuiGroup) {
|
||||
new GuiControl(TerrainTextureSettingsButtonContainer,EditorGuiGroup) {
|
||||
position = "628 5";
|
||||
extent = "70 50";
|
||||
extent = "90 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
|
|
@ -478,27 +478,17 @@
|
|||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiCheckBoxCtrl() {
|
||||
text = " LerpBlend";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 2";
|
||||
extent = "140 18";
|
||||
minExtent = "8 2";
|
||||
|
||||
new GuiButtonCtrl() {
|
||||
text = "Texture Settings";
|
||||
buttonType = "pushButton";
|
||||
profile = "ToolsGuiButtonProfile";
|
||||
command = "TerrainTextureSettingsDlg.show();";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
position = "0 0";
|
||||
extent = "90 18";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiCheckBoxProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "ETerrainEditor.toggleBlendType($ThisControl);";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "LerpBlendCheckBox";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,278 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(TerrainTextureSettingsDlg, EditorGuiGroup) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
internalName = "TerrainTextureSettings";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "ToolsGuiWindowProfile";
|
||||
position = "342 184";
|
||||
extent = "340 400";
|
||||
minExtent = "340 400";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "1";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "1";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "0";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "4 4";
|
||||
closeCommand = "TerrainTextureSettingsDlg.cancel();";
|
||||
EdgeSnap = "0";
|
||||
text = "Global Terrain Texture Settings";
|
||||
|
||||
new GuiCheckBoxCtrl() {
|
||||
internalName = "lerpBlendCheckBox";
|
||||
text = "LerpBlend";
|
||||
profile = "ToolsGuiCheckBoxProfile";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "If enabled, terrain textures will use a simple linear interpolation blending method.";
|
||||
|
||||
command = "TerrainTextureSettingsDlg.apply();";
|
||||
|
||||
position = "20 40";
|
||||
extent = "300 20";
|
||||
};
|
||||
|
||||
new GuiControl() {
|
||||
position = "20 80";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
extent = "300 20";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "Detail Texture Size:";
|
||||
profile = "ToolsGuiTextProfile";
|
||||
|
||||
position = "0 0";
|
||||
extent = "120 20";
|
||||
};
|
||||
|
||||
new GuiTextEditCtrl() {
|
||||
internalName = "detailTextureSizeTextEdit";
|
||||
profile = "ToolsGuiTextEditProfile";
|
||||
|
||||
command = "TerrainTextureSettingsDlg.apply();";
|
||||
|
||||
position = "130 0";
|
||||
extent = "170 20";
|
||||
};
|
||||
};
|
||||
|
||||
new GuiControl() {
|
||||
position = "20 110";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
extent = "300 20";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "Detail Texture Format:";
|
||||
profile = "ToolsGuiTextProfile";
|
||||
|
||||
position = "0 0";
|
||||
extent = "120 20";
|
||||
};
|
||||
|
||||
new GuiPopUpMenuCtrl() {
|
||||
internalName = "detailTextureFormatPopUpMenu";
|
||||
profile = "ToolsGuiPopUpMenuProfile";
|
||||
|
||||
command = "TerrainTextureSettingsDlg.apply();";
|
||||
|
||||
position = "130 0";
|
||||
extent = "170 20";
|
||||
};
|
||||
};
|
||||
|
||||
new GuiControl() {
|
||||
position = "20 140";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
extent = "300 20";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "Macro Texture Size:";
|
||||
profile = "ToolsGuiTextProfile";
|
||||
|
||||
position = "0 0";
|
||||
extent = "120 20";
|
||||
};
|
||||
|
||||
new GuiTextEditCtrl() {
|
||||
internalName = "macroTextureSizeTextEdit";
|
||||
profile = "ToolsGuiTextEditProfile";
|
||||
|
||||
command = "TerrainTextureSettingsDlg.apply();";
|
||||
|
||||
position = "130 0";
|
||||
extent = "170 20";
|
||||
};
|
||||
};
|
||||
|
||||
new GuiControl() {
|
||||
position = "20 170";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
extent = "300 20";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "Macro Texture Format:";
|
||||
profile = "ToolsGuiTextProfile";
|
||||
|
||||
position = "0 0";
|
||||
extent = "120 20";
|
||||
};
|
||||
|
||||
new GuiPopUpMenuCtrl() {
|
||||
internalName = "macroTextureFormatPopUpMenu";
|
||||
profile = "ToolsGuiPopUpMenuProfile";
|
||||
|
||||
command = "TerrainTextureSettingsDlg.apply();";
|
||||
|
||||
position = "130 0";
|
||||
extent = "170 20";
|
||||
};
|
||||
};
|
||||
|
||||
new GuiControl() {
|
||||
position = "20 200";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
extent = "300 20";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "Normal Texture Size:";
|
||||
profile = "ToolsGuiTextProfile";
|
||||
|
||||
position = "0 0";
|
||||
extent = "120 20";
|
||||
};
|
||||
|
||||
new GuiTextEditCtrl() {
|
||||
internalName = "normalTextureSizeTextEdit";
|
||||
profile = "ToolsGuiTextEditProfile";
|
||||
|
||||
command = "TerrainTextureSettingsDlg.apply();";
|
||||
|
||||
position = "130 0";
|
||||
extent = "170 20";
|
||||
};
|
||||
};
|
||||
|
||||
new GuiControl() {
|
||||
position = "20 230";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
extent = "300 20";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "Normal Texture Format:";
|
||||
profile = "ToolsGuiTextProfile";
|
||||
|
||||
position = "0 0";
|
||||
extent = "120 20";
|
||||
};
|
||||
|
||||
new GuiPopUpMenuCtrl() {
|
||||
internalName = "normalTextureFormatPopUpMenu";
|
||||
profile = "ToolsGuiPopUpMenuProfile";
|
||||
|
||||
command = "TerrainTextureSettingsDlg.apply();";
|
||||
|
||||
position = "130 0";
|
||||
extent = "170 20";
|
||||
};
|
||||
};
|
||||
|
||||
new GuiControl() {
|
||||
position = "20 260";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
extent = "300 20";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "ORM Texture Size:";
|
||||
profile = "ToolsGuiTextProfile";
|
||||
|
||||
position = "0 0";
|
||||
extent = "120 20";
|
||||
};
|
||||
|
||||
new GuiTextEditCtrl() {
|
||||
internalName = "ormTextureSizeTextEdit";
|
||||
profile = "ToolsGuiTextEditProfile";
|
||||
|
||||
position = "130 0";
|
||||
extent = "170 20";
|
||||
};
|
||||
};
|
||||
|
||||
new GuiControl() {
|
||||
position = "20 290";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
extent = "300 20";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
text = "ORM Texture Format:";
|
||||
profile = "ToolsGuiTextProfile";
|
||||
|
||||
position = "0 0";
|
||||
extent = "120 20";
|
||||
};
|
||||
|
||||
new GuiPopUpMenuCtrl() {
|
||||
internalName = "ormTextureFormatPopUpMenu";
|
||||
profile = "ToolsGuiPopUpMenuProfile";
|
||||
|
||||
position = "130 0";
|
||||
extent = "170 20";
|
||||
};
|
||||
};
|
||||
|
||||
new GuiControl() {
|
||||
position = "20 350";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
extent = "300 30";
|
||||
|
||||
new GuiButtonCtrl() {
|
||||
text = "Apply & Save";
|
||||
profile = "ToolsGuiButtonProfile";
|
||||
position = "0 0";
|
||||
|
||||
extent = "145 30";
|
||||
|
||||
command = "TerrainTextureSettingsDlg.applyAndSave();";
|
||||
};
|
||||
|
||||
new GuiButtonCtrl() {
|
||||
text = "Cancel";
|
||||
profile = "ToolsGuiButtonProfile";
|
||||
position = "155 0";
|
||||
|
||||
command = "TerrainTextureSettingsDlg.cancel();";
|
||||
|
||||
extent = "145 30";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -119,7 +119,8 @@ function EditorGui::init(%this)
|
|||
}
|
||||
|
||||
exec("~/worldEditor/gui/guiTerrainMaterialDlg.ed.gui");
|
||||
exec("~/worldEditor/gui/TerrainBrushSoftnessCurveDlg.ed.gui");
|
||||
exec("~/worldEditor/gui/TerrainBrushSoftnessCurveDlg.ed.gui");
|
||||
exec("~/worldEditor/gui/guiTerrainTextureSettingsDlg.ed.gui");
|
||||
}
|
||||
if ( !isObject( %this-->TerrainPainterToolbar) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -222,8 +222,6 @@ function EPainter::setup( %this, %matIndex )
|
|||
ETerrainEditor.setAction( ETerrainEditor.currentAction );
|
||||
EditorGuiStatusBar.setInfo(ETerrainEditor.currentActionDesc);
|
||||
ETerrainEditor.renderVertexSelection = true;
|
||||
|
||||
EWTerrainPainterToolbar-->LerpBlendCheckBox.setValue($Terrain::LerpBlend);
|
||||
}
|
||||
|
||||
function onNeedRelight()
|
||||
|
|
@ -259,12 +257,6 @@ function TerrainEditor::toggleBrushType( %this, %brush )
|
|||
%this.setBrushType( %brush.internalName );
|
||||
}
|
||||
|
||||
function TerrainEditor::toggleBlendType( %this, %check )
|
||||
{
|
||||
$Terrain::LerpBlend = %check.getValue();
|
||||
%this.getActiveTerrain().getClientObject().setMaterialsDirty();
|
||||
}
|
||||
|
||||
function TerrainEditor::offsetBrush(%this, %x, %y)
|
||||
{
|
||||
%curPos = %this.getBrushPos();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,151 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// 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.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$TerrainTextureSettingsDlg::TerrainTextureFormat =
|
||||
"R8G8B8 10" TAB
|
||||
"R8G8B8_SRGB 11" TAB
|
||||
"R8G8B8A8 12" TAB
|
||||
"R8G8B8A8_SRGB 15" TAB
|
||||
"BC5 33";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function TerrainTextureSettingsDlg::show( %this )
|
||||
{
|
||||
//%this.onWake();
|
||||
Canvas.pushDialog( %this );
|
||||
}
|
||||
|
||||
function TerrainTextureSettingsDlg::onWake( %this ) {
|
||||
%this-->lerpBlendCheckBox.setStateOn(ProjectSettings.value("Terrain/LerpBlend"));
|
||||
|
||||
%this-->detailTextureFormatPopUpMenu.clear();
|
||||
%this-->macroTextureFormatPopUpMenu.clear();
|
||||
%this-->normalTextureFormatPopUpMenu.clear();
|
||||
%this-->ormTextureFormatPopUpMenu.clear();
|
||||
|
||||
for(%i = 0; %i < getFieldCount($TerrainTextureSettingsDlg::TerrainTextureFormat); %i++) {
|
||||
%field = getField($TerrainTextureSettingsDlg::TerrainTextureFormat, %i);
|
||||
|
||||
%this-->detailTextureFormatPopUpMenu.add(getWord(%field, 0), getWord(%field, 1));
|
||||
%this-->macroTextureFormatPopUpMenu.add(getWord(%field, 0), getWord(%field, 1));
|
||||
%this-->normalTextureFormatPopUpMenu.add(getWord(%field, 0), getWord(%field, 1));
|
||||
%this-->ormTextureFormatPopUpMenu.add(getWord(%field, 0), getWord(%field, 1));
|
||||
}
|
||||
|
||||
%this-->detailTextureFormatPopUpMenu.setSelected(ProjectSettings.value("Terrain/DetailTextureFormat"), false);
|
||||
%this-->macroTextureFormatPopUpMenu.setSelected(ProjectSettings.value("Terrain/MacroTextureFormat"), false);
|
||||
%this-->normalTextureFormatPopUpMenu.setSelected(ProjectSettings.value("Terrain/NormalTextureFormat"), false);
|
||||
%this-->ormTextureFormatPopUpMenu.setSelected(ProjectSettings.value("Terrain/OrmTextureFormat"), false);
|
||||
|
||||
%this-->detailTextureSizeTextEdit.setText(ProjectSettings.value("Terrain/DetailTextureSize"));
|
||||
%this-->macroTextureSizeTextEdit.setText(ProjectSettings.value("Terrain/MacroTextureSize"));
|
||||
%this-->normalTextureSizeTextEdit.setText(ProjectSettings.value("Terrain/NormalTextureSize"));
|
||||
%this-->ormTextureSizeTextEdit.setText(ProjectSettings.value("Terrain/OrmTextureSize"));
|
||||
}
|
||||
|
||||
function TerrainTextureSettingsDlg::apply( %this ) {
|
||||
$Terrain::LerpBlend = %this-->lerpBlendCheckBox.isStateOn();
|
||||
|
||||
$Terrain::DetailTextureFormat = %this-->detailTextureFormatPopUpMenu.getSelected();
|
||||
$Terrain::MacroTextureFormat = %this-->macroTextureFormatPopUpMenu.getSelected();
|
||||
$Terrain::NormalTextureFormat = %this-->normalTextureFormatPopUpMenu.getSelected();
|
||||
$Terrain::OrmTextureFormat = %this-->ormTextureFormatPopUpMenu.getSelected();
|
||||
|
||||
if (%this-->detailTextureSizeTextEdit.getText() $= "" || mIsPow2(%this-->detailTextureSizeTextEdit.getText())) {
|
||||
$Terrain::DetailTextureSize = %this-->detailTextureSizeTextEdit.getText();
|
||||
}
|
||||
if (%this-->macroTextureSizeTextEdit.getText() $= "" || mIsPow2(%this-->macroTextureSizeTextEdit.getText())) {
|
||||
$Terrain::MacroTextureSize = %this-->macroTextureSizeTextEdit.getText();
|
||||
}
|
||||
if (%this-->normalTextureSizeTextEdit.getText() $= "" || mIsPow2(%this-->normalTextureSizeTextEdit.getText())) {
|
||||
$Terrain::NormalTextureSize = %this-->normalTextureSizeTextEdit.getText();
|
||||
}
|
||||
if (%this-->ormTextureSizeTextEdit.getText() $= "" || mIsPow2(%this-->ormTextureSizeTextEdit.getText())) {
|
||||
$Terrain::OrmTextureSize = %this-->ormTextureSizeTextEdit.getText();
|
||||
}
|
||||
|
||||
ETerrainEditor.getActiveTerrain().getClientObject().setMaterialsDirty();
|
||||
}
|
||||
|
||||
|
||||
function TerrainTextureSettingsDlg::validate( %this ) {
|
||||
if (%this-->detailTextureSizeTextEdit.getText() !$= "" && !mIsPow2(%this-->detailTextureSizeTextEdit.getText())) {
|
||||
toolsMessageBoxOK("Detail Texture Error!", "Detail texture resolution must be a power of 2");
|
||||
return false;
|
||||
}
|
||||
if (%this-->macroTextureSizeTextEdit.getText() !$= "" && !mIsPow2(%this-->macroTextureSizeTextEdit.getText())) {
|
||||
toolsMessageBoxOK("Macro Texture Error!", "Macro texture resolution must be a power of 2");
|
||||
return false;
|
||||
}
|
||||
if (%this-->normalTextureSizeTextEdit.getText() !$= "" && !mIsPow2(%this-->normalTextureSizeTextEdit.getText())) {
|
||||
toolsMessageBoxOK("Normal Texture Error!", "Normal texture resolution must be a power of 2");
|
||||
return false;
|
||||
}
|
||||
if (%this-->ormTextureSizeTextEdit.getText() !$= "" && !mIsPow2(%this-->ormTextureSizeTextEdit.getText())) {
|
||||
toolsMessageBoxOK("ORM Texture Error!", "ORM texture resolution must be a power of 2");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function TerrainTextureSettingsDlg::cancel( %this ) {
|
||||
$Terrain::LerpBlend = ProjectSettings.value("Terrain/LerpBlend");
|
||||
|
||||
$Terrain::DetailTextureFormat = ProjectSettings.value("Terrain/DetailTextureFormat");
|
||||
$Terrain::MacroTextureFormat = ProjectSettings.value("Terrain/MacroTextureFormat");
|
||||
$Terrain::NormalTextureFormat = ProjectSettings.value("Terrain/NormalTextureFormat");
|
||||
$Terrain::OrmTextureFormat = ProjectSettings.value("Terrain/OrmTextureFormat");
|
||||
|
||||
$Terrain::DetailTextureSize = ProjectSettings.value("Terrain/DetailTextureSize");
|
||||
$Terrain::MacroTextureSize = ProjectSettings.value("Terrain/MacroTextureSize");
|
||||
$Terrain::NormalTextureSize = ProjectSettings.value("Terrain/NormalTextureSize");
|
||||
$Terrain::OrmTextureSize = ProjectSettings.value("Terrain/OrmTextureSize");
|
||||
|
||||
ETerrainEditor.getActiveTerrain().getClientObject().setMaterialsDirty();
|
||||
Canvas.popDialog(%this);
|
||||
}
|
||||
|
||||
function TerrainTextureSettingsDlg::applyAndSave( %this ) {
|
||||
if (!%this.validate()) {
|
||||
return;
|
||||
}
|
||||
%this.apply();
|
||||
|
||||
ProjectSettings.setValue("Terrain/LerpBlend", $Terrain::LerpBlend);
|
||||
|
||||
ProjectSettings.setValue("Terrain/DetailTextureFormat", $Terrain::DetailTextureFormat);
|
||||
ProjectSettings.setValue("Terrain/MacroTextureFormat", $Terrain::MacroTextureFormat);
|
||||
ProjectSettings.setValue("Terrain/NormalTextureFormat", $Terrain::NormalTextureFormat);
|
||||
ProjectSettings.setValue("Terrain/OrmTextureFormat", $Terrain::OrmTextureFormat);
|
||||
|
||||
ProjectSettings.setValue("Terrain/DetailTextureSize", $Terrain::DetailTextureSize);
|
||||
ProjectSettings.setValue("Terrain/MacroTextureSize", $Terrain::MacroTextureSize);
|
||||
ProjectSettings.setValue("Terrain/NormalTextureSize", $Terrain::NormalTextureSize);
|
||||
ProjectSettings.setValue("Terrain/OrmTextureSize", $Terrain::OrmTextureSize);
|
||||
|
||||
ProjectSettings.write();
|
||||
|
||||
Canvas.popDialog(%this);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue