diff --git a/Engine/source/T3D/assets/ComponentAsset.cpp b/Engine/source/T3D/assets/ComponentAsset.cpp
index 324ec495f..d0464490c 100644
--- a/Engine/source/T3D/assets/ComponentAsset.cpp
+++ b/Engine/source/T3D/assets/ComponentAsset.cpp
@@ -105,10 +105,6 @@ ComponentAsset::ComponentAsset()
ComponentAsset::~ComponentAsset()
{
- // If the asset manager does not own the asset then we own the
- // asset definition so delete it.
- if (!getOwned())
- delete mpAssetDefinition;
}
//-----------------------------------------------------------------------------
diff --git a/Engine/source/T3D/assets/CppAsset.cpp b/Engine/source/T3D/assets/CppAsset.cpp
index 91ab0a8ae..ce2ff3bb3 100644
--- a/Engine/source/T3D/assets/CppAsset.cpp
+++ b/Engine/source/T3D/assets/CppAsset.cpp
@@ -99,10 +99,6 @@ CppAsset::CppAsset() : AssetBase()
CppAsset::~CppAsset()
{
- // If the asset manager does not own the asset then we own the
- // asset definition so delete it.
- if (!getOwned())
- delete mpAssetDefinition;
}
//-----------------------------------------------------------------------------
diff --git a/Engine/source/T3D/assets/CubemapAsset.cpp b/Engine/source/T3D/assets/CubemapAsset.cpp
index 32d5dce3a..b68fea184 100644
--- a/Engine/source/T3D/assets/CubemapAsset.cpp
+++ b/Engine/source/T3D/assets/CubemapAsset.cpp
@@ -105,10 +105,6 @@ CubemapAsset::CubemapAsset()
CubemapAsset::~CubemapAsset()
{
- // If the asset manager does not own the asset then we own the
- // asset definition so delete it.
- if (!getOwned())
- delete mpAssetDefinition;
}
//-----------------------------------------------------------------------------
diff --git a/Engine/source/T3D/assets/ExampleAsset.cpp b/Engine/source/T3D/assets/ExampleAsset.cpp
index b8c43ac07..8953880e5 100644
--- a/Engine/source/T3D/assets/ExampleAsset.cpp
+++ b/Engine/source/T3D/assets/ExampleAsset.cpp
@@ -98,10 +98,6 @@ ExampleAsset::ExampleAsset()
ExampleAsset::~ExampleAsset()
{
- // If the asset manager does not own the asset then we own the
- // asset definition so delete it.
- if (!getOwned())
- delete mpAssetDefinition;
}
//-----------------------------------------------------------------------------
@@ -119,4 +115,4 @@ void ExampleAsset::copyTo(SimObject* object)
{
// Call to parent.
Parent::copyTo(object);
-}
\ No newline at end of file
+}
diff --git a/Engine/source/T3D/assets/GUIAsset.cpp b/Engine/source/T3D/assets/GUIAsset.cpp
index ec06156a2..6089ea230 100644
--- a/Engine/source/T3D/assets/GUIAsset.cpp
+++ b/Engine/source/T3D/assets/GUIAsset.cpp
@@ -92,10 +92,6 @@ GUIAsset::GUIAsset()
GUIAsset::~GUIAsset()
{
- // If the asset manager does not own the asset then we own the
- // asset definition so delete it.
- if (!getOwned())
- delete mpAssetDefinition;
}
//-----------------------------------------------------------------------------
diff --git a/Engine/source/T3D/assets/GameObjectAsset.cpp b/Engine/source/T3D/assets/GameObjectAsset.cpp
index 4058d5ee1..514d6da20 100644
--- a/Engine/source/T3D/assets/GameObjectAsset.cpp
+++ b/Engine/source/T3D/assets/GameObjectAsset.cpp
@@ -103,10 +103,6 @@ GameObjectAsset::GameObjectAsset()
GameObjectAsset::~GameObjectAsset()
{
- // If the asset manager does not own the asset then we own the
- // asset definition so delete it.
- if (!getOwned())
- delete mpAssetDefinition;
}
//-----------------------------------------------------------------------------
diff --git a/Engine/source/T3D/assets/LevelAsset.cpp b/Engine/source/T3D/assets/LevelAsset.cpp
index 6fd73db92..4036b1666 100644
--- a/Engine/source/T3D/assets/LevelAsset.cpp
+++ b/Engine/source/T3D/assets/LevelAsset.cpp
@@ -103,10 +103,6 @@ LevelAsset::LevelAsset() : AssetBase(), mIsSubLevel(false)
LevelAsset::~LevelAsset()
{
- // If the asset manager does not own the asset then we own the
- // asset definition so delete it.
- if (!getOwned())
- delete mpAssetDefinition;
}
//-----------------------------------------------------------------------------
diff --git a/Engine/source/T3D/assets/ParticleAsset.cpp b/Engine/source/T3D/assets/ParticleAsset.cpp
index bcefd2dfa..30cf327ab 100644
--- a/Engine/source/T3D/assets/ParticleAsset.cpp
+++ b/Engine/source/T3D/assets/ParticleAsset.cpp
@@ -100,10 +100,6 @@ ParticleAsset::ParticleAsset()
ParticleAsset::~ParticleAsset()
{
- // If the asset manager does not own the asset then we own the
- // asset definition so delete it.
- if (!getOwned())
- delete mpAssetDefinition;
}
//-----------------------------------------------------------------------------
@@ -202,4 +198,4 @@ bool GuiInspectorTypeParticleAssetPtr::updateRects()
}
return resized;
-}
\ No newline at end of file
+}
diff --git a/Engine/source/T3D/assets/PostEffectAsset.cpp b/Engine/source/T3D/assets/PostEffectAsset.cpp
index 745e6fe24..5c68f5429 100644
--- a/Engine/source/T3D/assets/PostEffectAsset.cpp
+++ b/Engine/source/T3D/assets/PostEffectAsset.cpp
@@ -99,10 +99,6 @@ PostEffectAsset::PostEffectAsset()
PostEffectAsset::~PostEffectAsset()
{
- // If the asset manager does not own the asset then we own the
- // asset definition so delete it.
- if (!getOwned())
- delete mpAssetDefinition;
}
//-----------------------------------------------------------------------------
diff --git a/Engine/source/T3D/assets/ScriptAsset.cpp b/Engine/source/T3D/assets/ScriptAsset.cpp
index 25ded7f9e..f99bb1b6d 100644
--- a/Engine/source/T3D/assets/ScriptAsset.cpp
+++ b/Engine/source/T3D/assets/ScriptAsset.cpp
@@ -98,10 +98,6 @@ ScriptAsset::ScriptAsset() : AssetBase(), mIsServerSide(true)
ScriptAsset::~ScriptAsset()
{
- // If the asset manager does not own the asset then we own the
- // asset definition so delete it.
- if (!getOwned())
- delete mpAssetDefinition;
}
//-----------------------------------------------------------------------------
diff --git a/Engine/source/T3D/assets/SoundAsset.cpp b/Engine/source/T3D/assets/SoundAsset.cpp
index 9563f5d8a..052bf4d63 100644
--- a/Engine/source/T3D/assets/SoundAsset.cpp
+++ b/Engine/source/T3D/assets/SoundAsset.cpp
@@ -104,10 +104,6 @@ SoundAsset::SoundAsset()
SoundAsset::~SoundAsset()
{
- // If the asset manager does not own the asset then we own the
- // asset definition so delete it.
- if (!getOwned())
- delete mpAssetDefinition;
}
//-----------------------------------------------------------------------------
diff --git a/Engine/source/T3D/assets/stateMachineAsset.cpp b/Engine/source/T3D/assets/stateMachineAsset.cpp
index 44ca7f40d..3e2d4f1a5 100644
--- a/Engine/source/T3D/assets/stateMachineAsset.cpp
+++ b/Engine/source/T3D/assets/stateMachineAsset.cpp
@@ -99,10 +99,6 @@ StateMachineAsset::StateMachineAsset()
StateMachineAsset::~StateMachineAsset()
{
- // If the asset manager does not own the asset then we own the
- // asset definition so delete it.
- if (!getOwned())
- delete mpAssetDefinition;
}
//-----------------------------------------------------------------------------
@@ -225,4 +221,4 @@ bool GuiInspectorTypeStateMachineAssetPtr::updateRects()
}
return resized;
-}
\ No newline at end of file
+}
diff --git a/Engine/source/gui/editor/popupMenu.cpp b/Engine/source/gui/editor/popupMenu.cpp
index 1c1f44ae4..b2ba122a7 100644
--- a/Engine/source/gui/editor/popupMenu.cpp
+++ b/Engine/source/gui/editor/popupMenu.cpp
@@ -51,7 +51,7 @@ PopupMenu::PopupMenu()
mBarTitle = StringTable->EmptyString();
mBounds = RectI(0, 0, 64, 64);
- mVisible = true;
+ mVisible = false;
mBitmapIndex = -1;
mDrawBitmapOnly = false;
@@ -86,6 +86,7 @@ void PopupMenu::initPersistFields()
addField("barTitle", TypeCaseString, Offset(mBarTitle, PopupMenu), "");
addField("radioSelection", TypeBool, Offset(mRadioSelection, PopupMenu), "");
+ addField("visible", TypeBool, Offset(mVisible, PopupMenu), "");
}
//-----------------------------------------------------------------------------
@@ -439,6 +440,8 @@ void PopupMenu::showPopup(GuiCanvas *owner, S32 x /* = -1 */, S32 y /* = -1 */)
mTextList->setHidden(false);
+
+ mVisible = true;
}
void PopupMenu::hidePopup()
@@ -449,6 +452,8 @@ void PopupMenu::hidePopup()
}
hidePopupSubmenus();
+
+ mVisible = false;
}
void PopupMenu::hidePopupSubmenus()
diff --git a/Engine/source/ts/tsShapeConstruct.cpp b/Engine/source/ts/tsShapeConstruct.cpp
index 03a2d3757..ca40b142d 100644
--- a/Engine/source/ts/tsShapeConstruct.cpp
+++ b/Engine/source/ts/tsShapeConstruct.cpp
@@ -402,12 +402,6 @@ bool TSShapeConstructor::onAdd()
if ( !Parent::onAdd() )
return false;
- static const U32 bufSize = 512;
- char* buf = Con::getReturnBuffer(bufSize);
- Platform::makeFullPathName(mShapePath, buf, bufSize, NULL);
-
- mShapePath = buf;
-
// Prevent multiple objects pointing at the same shape file
TSShapeConstructor* tss = findShapeConstructor( mShapePath );
if ( tss )
diff --git a/Templates/BaseGame/game/core/gui/scripts/canvas.cs b/Templates/BaseGame/game/core/gui/scripts/canvas.cs
index 50263f53d..ee0be71a7 100644
--- a/Templates/BaseGame/game/core/gui/scripts/canvas.cs
+++ b/Templates/BaseGame/game/core/gui/scripts/canvas.cs
@@ -157,6 +157,6 @@ function configureCanvas()
// We need to parse the setting between AA modes, and then it's level
// It's formatted as AATypexAALevel
// So, FXAAx4 or MLAAx2
- if ( isObject( FXAA_PostEffect ) )
- FXAA_PostEffect.isEnabled = ( %aa > 0 ) ? true : false;
+ if ( isObject( FXAAPostFX ) )
+ FXAAPostFX.isEnabled = ( %aa > 0 ) ? true : false;
}
diff --git a/Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.asset.taml
new file mode 100644
index 000000000..ddaefea3c
--- /dev/null
+++ b/Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.asset.taml
@@ -0,0 +1,6 @@
+
diff --git a/Templates/BaseGame/game/core/postFX/scripts/fxaa.cs b/Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.cs
similarity index 98%
rename from Templates/BaseGame/game/core/postFX/scripts/fxaa.cs
rename to Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.cs
index 4b81c6e19..b24aef85f 100644
--- a/Templates/BaseGame/game/core/postFX/scripts/fxaa.cs
+++ b/Templates/BaseGame/game/core/postFX/scripts/FXAAPostFX.cs
@@ -47,7 +47,7 @@ singleton ShaderData( FXAA_ShaderData )
pixVersion = 3.0;
};
-singleton PostEffect( FXAA_PostEffect )
+singleton PostEffect( FXAAPostFX )
{
isEnabled = false;
diff --git a/Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.asset.taml
new file mode 100644
index 000000000..2a3a724e0
--- /dev/null
+++ b/Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.asset.taml
@@ -0,0 +1,6 @@
+
diff --git a/Templates/BaseGame/game/core/postFX/scripts/glow.cs b/Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.cs
similarity index 99%
rename from Templates/BaseGame/game/core/postFX/scripts/glow.cs
rename to Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.cs
index c4e7a9595..41a23db82 100644
--- a/Templates/BaseGame/game/core/postFX/scripts/glow.cs
+++ b/Templates/BaseGame/game/core/postFX/scripts/GlowPostFX.cs
@@ -60,7 +60,7 @@ singleton GFXStateBlockData( PFX_GlowCombineStateBlock : PFX_DefaultStateBlock )
};
-singleton PostEffect( GlowPostFx )
+singleton PostEffect( GlowPostFX )
{
// Do not allow the glow effect to work in reflection
// passes by default so we don't do the extra drawing.
diff --git a/Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.asset.taml
new file mode 100644
index 000000000..a0bb8dca9
--- /dev/null
+++ b/Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.asset.taml
@@ -0,0 +1,6 @@
+
diff --git a/Templates/BaseGame/game/core/postFX/scripts/hdr.cs b/Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.cs
similarity index 100%
rename from Templates/BaseGame/game/core/postFX/scripts/hdr.cs
rename to Templates/BaseGame/game/core/postFX/scripts/HDRPostFX.cs
diff --git a/Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.asset.taml
new file mode 100644
index 000000000..b506c5b97
--- /dev/null
+++ b/Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.asset.taml
@@ -0,0 +1,6 @@
+
diff --git a/Templates/BaseGame/game/core/postFX/scripts/ssao.cs b/Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.cs
similarity index 100%
rename from Templates/BaseGame/game/core/postFX/scripts/ssao.cs
rename to Templates/BaseGame/game/core/postFX/scripts/SSAOPostFx.cs
diff --git a/Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.asset.taml
new file mode 100644
index 000000000..b022f0a3f
--- /dev/null
+++ b/Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.asset.taml
@@ -0,0 +1,6 @@
+
diff --git a/Templates/BaseGame/game/core/postFX/scripts/turbulence.cs b/Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.cs
similarity index 98%
rename from Templates/BaseGame/game/core/postFX/scripts/turbulence.cs
rename to Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.cs
index 967c3b2bf..f9b0f0730 100644
--- a/Templates/BaseGame/game/core/postFX/scripts/turbulence.cs
+++ b/Templates/BaseGame/game/core/postFX/scripts/TurbulencePostFX.cs
@@ -42,7 +42,7 @@ singleton ShaderData( PFX_TurbulenceShader )
pixVersion = 3.0;
};
-singleton PostEffect( TurbulenceFx )
+singleton PostEffect( TurbulencePostFX )
{
isEnabled = false;
allowReflectPass = true;
diff --git a/Templates/BaseGame/game/core/postFX/scripts/fogPostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/fogPostFX.asset.taml
new file mode 100644
index 000000000..4745a0050
--- /dev/null
+++ b/Templates/BaseGame/game/core/postFX/scripts/fogPostFX.asset.taml
@@ -0,0 +1,6 @@
+
diff --git a/Templates/BaseGame/game/core/postFX/scripts/fogPostFX.cs b/Templates/BaseGame/game/core/postFX/scripts/fogPostFX.cs
new file mode 100644
index 000000000..ed9dd9ce7
--- /dev/null
+++ b/Templates/BaseGame/game/core/postFX/scripts/fogPostFX.cs
@@ -0,0 +1,67 @@
+//-----------------------------------------------------------------------------
+// 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.
+//-----------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+// Fog
+//------------------------------------------------------------------------------
+
+singleton ShaderData( FogPassShader )
+{
+ DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
+ DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/fogP.hlsl";
+
+ OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
+ OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/fogP.glsl";
+
+ samplerNames[0] = "$deferredTex";
+
+ pixVersion = 2.0;
+};
+
+
+singleton GFXStateBlockData( FogPassStateBlock : PFX_DefaultStateBlock )
+{
+ blendDefined = true;
+ blendEnable = true;
+ blendSrc = GFXBlendSrcAlpha;
+ blendDest = GFXBlendInvSrcAlpha;
+};
+
+
+singleton PostEffect( fogPostFX )
+{
+ // We forward render the reflection pass
+ // so it does its own fogging.
+ allowReflectPass = false;
+
+ renderTime = "PFXBeforeBin";
+ renderBin = "ObjTranslucentBin";
+
+ shader = FogPassShader;
+ stateBlock = FogPassStateBlock;
+ texture[0] = "#deferred";
+
+ renderPriority = 5;
+
+ targetFormat = getBestHDRFormat();
+ isEnabled = true;
+};
\ No newline at end of file
diff --git a/Templates/BaseGame/game/core/postFX/scripts/lightRays.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/lightRays.asset.taml
new file mode 100644
index 000000000..cd2d63b51
--- /dev/null
+++ b/Templates/BaseGame/game/core/postFX/scripts/lightRays.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/core/postFX/scripts/lightRay.cs b/Templates/BaseGame/game/core/postFX/scripts/lightRays.cs
similarity index 100%
rename from Templates/BaseGame/game/core/postFX/scripts/lightRay.cs
rename to Templates/BaseGame/game/core/postFX/scripts/lightRays.cs
diff --git a/Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.asset.taml
new file mode 100644
index 000000000..ecaf521d5
--- /dev/null
+++ b/Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.asset.taml
@@ -0,0 +1,6 @@
+
diff --git a/Templates/BaseGame/game/core/postFX/scripts/pbr.cs b/Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.cs
similarity index 100%
rename from Templates/BaseGame/game/core/postFX/scripts/pbr.cs
rename to Templates/BaseGame/game/core/postFX/scripts/reflectionProbeArrayPostFX.cs
diff --git a/Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.asset.taml
new file mode 100644
index 000000000..1dc8dd11b
--- /dev/null
+++ b/Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.asset.taml
@@ -0,0 +1,6 @@
+
diff --git a/Templates/BaseGame/game/core/postFX/scripts/fog.cs b/Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.cs
similarity index 66%
rename from Templates/BaseGame/game/core/postFX/scripts/fog.cs
rename to Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.cs
index 4b9bfc663..739224a0b 100644
--- a/Templates/BaseGame/game/core/postFX/scripts/fog.cs
+++ b/Templates/BaseGame/game/core/postFX/scripts/underWaterFogPostFX.cs
@@ -20,53 +20,6 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-// Fog
-//------------------------------------------------------------------------------
-
-singleton ShaderData( FogPassShader )
-{
- DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
- DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/fogP.hlsl";
-
- OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
- OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/fogP.glsl";
-
- samplerNames[0] = "$deferredTex";
-
- pixVersion = 2.0;
-};
-
-
-singleton GFXStateBlockData( FogPassStateBlock : PFX_DefaultStateBlock )
-{
- blendDefined = true;
- blendEnable = true;
- blendSrc = GFXBlendSrcAlpha;
- blendDest = GFXBlendInvSrcAlpha;
-};
-
-
-singleton PostEffect( FogPostFx )
-{
- // We forward render the reflection pass
- // so it does its own fogging.
- allowReflectPass = false;
-
- renderTime = "PFXBeforeBin";
- renderBin = "ObjTranslucentBin";
-
- shader = FogPassShader;
- stateBlock = FogPassStateBlock;
- texture[0] = "#deferred";
-
- renderPriority = 5;
-
- targetFormat = getBestHDRFormat();
- isEnabled = true;
-};
-
-
//------------------------------------------------------------------------------
// UnderwaterFog
//------------------------------------------------------------------------------
@@ -96,7 +49,7 @@ singleton GFXStateBlockData( UnderwaterFogPassStateBlock : PFX_DefaultStateBlock
};
-singleton PostEffect( UnderwaterFogPostFx )
+singleton PostEffect( underWaterFogPostFX )
{
oneFrameOnly = true;
onThisFrame = false;
@@ -120,16 +73,16 @@ singleton PostEffect( UnderwaterFogPostFx )
isEnabled = true;
};
-function UnderwaterFogPostFx::onEnabled( %this )
+function underWaterFogPostFX::onEnabled( %this )
{
- TurbulenceFx.enable();
+ TurbulencePostFX.enable();
CausticsPFX.enable();
return true;
}
-function UnderwaterFogPostFx::onDisabled( %this )
+function underWaterFogPostFX::onDisabled( %this )
{
- TurbulenceFx.disable();
+ TurbulencePostFX.disable();
CausticsPFX.disable();
return false;
}
diff --git a/Templates/BaseGame/game/core/postFX/scripts/vignette.cs b/Templates/BaseGame/game/core/postFX/scripts/vignette.cs
index d22f7d14a..6c7f294c0 100644
--- a/Templates/BaseGame/game/core/postFX/scripts/vignette.cs
+++ b/Templates/BaseGame/game/core/postFX/scripts/vignette.cs
@@ -36,7 +36,12 @@ singleton ShaderData( VignetteShader )
pixVersion = 2.0;
};
-singleton PostEffect( VignettePostEffect )
+function vignettePostFX::onAdd( %this )
+{
+ PostFXManager.registerPostEffect(%this);
+}
+
+singleton PostEffect( vignettePostFX )
{
isEnabled = false;
allowReflectPass = false;
@@ -48,8 +53,45 @@ singleton PostEffect( VignettePostEffect )
renderPriority = 10;
};
-function VignettePostEffect::setShaderConsts(%this)
+function vignettePostFX::setShaderConsts(%this)
{
%this.setShaderConst("$Vmax", $VignettePostEffect::VMax);
%this.setShaderConst("$Vmin", $VignettePostEffect::VMin);
+}
+
+function vignettePostFX::populatePostFXSettings(%this)
+{
+ PostEffectEditorInspector.startGroup("Vignette - General");
+ PostEffectEditorInspector.addField("$PostFXManager::Settings::EnableVignette", "Enabled", "bool", "", $PostFXManager::PostFX::EnableVignette, "");
+ PostEffectEditorInspector.addField("$PostFXManager::Settings::VignettePostEffect::VMin", "Vignette Min", "float", "", $VignettePostEffect::VMin, "");
+ PostEffectEditorInspector.addField("$PostFXManager::Settings::VignettePostEffect::VMax", "Vignette Max", "float", "", $VignettePostEffect::VMax, "");
+ PostEffectEditorInspector.endGroup();
+}
+
+function vignettePostFX::applyFromPreset(%this)
+{
+ //Light rays settings
+ $PostFXManager::PostFX::EnableLightRays = $PostFXManager::Settings::EnableLightRays;
+ $LightRayPostFX::brightScalar = $PostFXManager::Settings::LightRays::brightScalar;
+
+ $LightRayPostFX::numSamples = $PostFXManager::Settings::LightRays::numSamples;
+ $LightRayPostFX::density = $PostFXManager::Settings::LightRays::density;
+ $LightRayPostFX::weight = $PostFXManager::Settings::LightRays::weight;
+ $LightRayPostFX::decay = $PostFXManager::Settings::LightRays::decay;
+
+ if($PostFXManager::PostFX::EnableVignette)
+ %this.enable();
+ else
+ %this.disable();
+}
+
+function vignettePostFX::settingsApply(%this)
+{
+ $PostFXManager::Settings::EnableLightRays = $PostFXManager::PostFX::EnableLightRays;
+ $PostFXManager::Settings::LightRays::brightScalar = $LightRayPostFX::brightScalar;
+
+ $PostFXManager::Settings::LightRays::numSamples = $LightRayPostFX::numSamples;
+ $PostFXManager::Settings::LightRays::density = $LightRayPostFX::density;
+ $PostFXManager::Settings::LightRays::weight = $LightRayPostFX::weight;
+ $PostFXManager::Settings::LightRays::decay = $LightRayPostFX::decay;
}
\ No newline at end of file
diff --git a/Templates/BaseGame/game/core/postFX/scripts/vignettePostFX.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/vignettePostFX.asset.taml
new file mode 100644
index 000000000..c2bd1c15e
--- /dev/null
+++ b/Templates/BaseGame/game/core/postFX/scripts/vignettePostFX.asset.taml
@@ -0,0 +1,6 @@
+
diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/folderIcon.png b/Templates/BaseGame/game/tools/assetBrowser/art/folderIcon.png
index b2c0a251d..ba9452fe4 100644
Binary files a/Templates/BaseGame/game/tools/assetBrowser/art/folderIcon.png and b/Templates/BaseGame/game/tools/assetBrowser/art/folderIcon.png differ
diff --git a/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml b/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml
index 039a6674a..71d78379f 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml
+++ b/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml
@@ -1,64 +1,137 @@
-
-
- 0
- Z_AXIS
- TrailingNumber
- 0.01
- 0
- 0
- 0
- 1
- 1
- 0
- 0
- 0
-
-
- Col
- CollisionMesh
- 1
- LOS
- CollisionMesh
- 1
-
-
- _AO,_AMBIENT,_AMBIENTOCCLUSION
- _ROUGH,_ROUGHNESS
- 1
- _COMP,_COMPOSITE
- _SMOOTH,_SMOOTHNESS
- 1
- _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a,
- 0
- 1
- N/A
- 1
- _NORMAL,_NORM
- 1.0
- _METAL,_MET,_METALNESS,_METALLIC
- Bilinear
-
+
- ColorEffect*,
+ 1
1
1
1
- 0
- 1
+
+
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ TrailingNumber
+ 0
+ 0
+ 0
+ Z_AXIS
+ 0
+
+
+ _NORMAL,_NORM
+ _AO,_AMBIENT,_AMBIENTOCCLUSION
+ _METAL,_MET,_METALNESS,_METALLIC
+ 1
+ _COMP,_COMPOSITE
+ _ROUGH,_ROUGHNESS
+ N/A
+ 1
+ 1.0
+ Bilinear
+ 0
+ _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL
+ 1
+ _SMOOTH,_SMOOTHNESS
+ 1
+
+
+ AutoPrune
+ 0
+ 0
+ 1
+
+
+ Col
+ LOS
+ 1
+ 1
+ CollisionMesh
+ CollisionMesh
1
+ Seconds
+ 2
1
1.0
+ 1.0
+ 0
+
+
+
+
+ _METAL,_MET,_METALNESS,_METALLIC
+ 0
+ Bilinear
+ _SMOOTH,_SMOOTHNESS
+ 1
+ _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a,
+ _AO,_AMBIENT,_AMBIENTOCCLUSION
+ _COMP,_COMPOSITE
+ 1.0
+ 1
+ _NORMAL,_NORM
+ _ROUGH,_ROUGHNESS
+ 1
+ N/A
+ 1
+
+
+ CollisionMesh
+ LOS
+ Col
+ CollisionMesh
+ 1
+ 1
+
+
0
1.0
+ 1.0
AutoPrune
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ TrailingNumber
+ 0
+ Z_AXIS
+ 0
+ 0.01
+ 0
+
+
+ ColorEffect*,
+ 1
+ 1
+ 1
+ 0
+ 1
+
+
+ 1
+ 1
+
diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportConfigEditor.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportConfigEditor.gui
new file mode 100644
index 000000000..89ad5aef3
--- /dev/null
+++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportConfigEditor.gui
@@ -0,0 +1,429 @@
+//--- OBJECT WRITE BEGIN ---
+%guiContent = new GuiControl(AssetImportConfigEditor) {
+ position = "0 0";
+ extent = "1024 768";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "GuiDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "1";
+
+ new GuiWindowCtrl(ImportAssetNewConfigEditorWindow) {
+ text = "Import Options Config";
+ resizeWidth = "1";
+ resizeHeight = "1";
+ canMove = "1";
+ canClose = "1";
+ canMinimize = "0";
+ canMaximize = "0";
+ canCollapse = "0";
+ edgeSnap = "1";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "324 349";
+ extent = "376 70";
+ minExtent = "48 70";
+ horizSizing = "center";
+ vertSizing = "center";
+ profile = "ToolsGuiWindowProfile";
+ visible = "0";
+ active = "1";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ hidden = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiTextCtrl() {
+ text = "Configuration Name:";
+ maxLength = "1024";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "10 26";
+ extent = "100 17";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiTextProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiTextEditCtrl(AssetImportNewConfigName) {
+ historySize = "0";
+ tabComplete = "0";
+ sinkAllKeyEvents = "0";
+ password = "0";
+ passwordMask = "*";
+ maxLength = "1024";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "113 25";
+ extent = "250 18";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "bottom";
+ profile = "ToolsGuiTextEditProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiButtonCtrl() {
+ text = "Done";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "301 45";
+ extent = "64 22";
+ minExtent = "8 2";
+ horizSizing = "left";
+ vertSizing = "top";
+ profile = "ToolsGuiButtonProfile";
+ visible = "1";
+ active = "1";
+ command = "AssetImportConfigEditor.createNewImportConfig();";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ };
+ new GuiWindowCtrl() {
+ text = "Asset Import Config Editor";
+ resizeWidth = "1";
+ resizeHeight = "1";
+ canMove = "1";
+ canClose = "1";
+ canMinimize = "0";
+ canMaximize = "0";
+ canCollapse = "0";
+ closeCommand = "Canvas.popDialog(AssetImportConfigEditor);";
+ edgeSnap = "0";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "191 76";
+ extent = "642 615";
+ minExtent = "8 8";
+ horizSizing = "center";
+ vertSizing = "center";
+ profile = "ToolsGuiWindowProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiSplitContainer() {
+ orientation = "Vertical";
+ splitterSize = "2";
+ splitPoint = "182 100";
+ fixedPanel = "None";
+ fixedSize = "100";
+ docking = "None";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "0 24";
+ extent = "642 562";
+ minExtent = "64 64";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiSolidDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiPanel() {
+ docking = "Client";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "0 0";
+ extent = "180 562";
+ minExtent = "16 16";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiSolidDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ internalName = "Panel1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiBitmapButtonCtrl() {
+ bitmap = "tools/gui/images/iconAdd.png";
+ bitmapMode = "Centered";
+ autoFitExtents = "0";
+ useModifiers = "0";
+ useStates = "1";
+ masked = "0";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "145 4";
+ extent = "16 16";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "GuiDefaultProfile";
+ visible = "1";
+ active = "1";
+ command = "AssetImportConfigEditor.addNewConfig();";
+ tooltipProfile = "GuiToolTipProfile";
+ tooltip = "Add a new Import Config";
+ hovertime = "1000";
+ isContainer = "0";
+ internalName = "newImportConfig";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiBitmapButtonCtrl() {
+ bitmap = "tools/gui/images/iconDelete.png";
+ bitmapMode = "Centered";
+ autoFitExtents = "0";
+ useModifiers = "0";
+ useStates = "1";
+ masked = "0";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "163 4";
+ extent = "16 16";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "GuiDefaultProfile";
+ visible = "1";
+ active = "1";
+ command = "AssetImportConfigEditor.deleteConfig();";
+ tooltipProfile = "GuiToolTipProfile";
+ tooltip = "Delets the currently selected import config";
+ hovertime = "1000";
+ isContainer = "0";
+ internalName = "deleteImportConfig";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiScrollCtrl() {
+ willFirstRespond = "1";
+ hScrollBar = "alwaysOff";
+ vScrollBar = "dynamic";
+ lockHorizScroll = "0";
+ lockVertScroll = "0";
+ constantThumbHeight = "0";
+ childMargin = "0 0";
+ mouseWheelScrollSpeed = "-1";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "3 24";
+ extent = "177 538";
+ minExtent = "100 50";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiScrollProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiTextListCtrl(AssetImportConfigList) {
+ columns = "0";
+ fitParentWidth = "0";
+ clipColumnText = "0";
+ rowHeightPadding = "2";
+ position = "1 1";
+ extent = "60 32";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiListBoxProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ };
+ };
+ new GuiPanel() {
+ docking = "Client";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "184 0";
+ extent = "458 562";
+ minExtent = "16 16";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiSolidDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ internalName = "panel2";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiScrollCtrl() {
+ willFirstRespond = "1";
+ hScrollBar = "dynamic";
+ vScrollBar = "dynamic";
+ lockHorizScroll = "0";
+ lockVertScroll = "0";
+ constantThumbHeight = "0";
+ childMargin = "0 0";
+ mouseWheelScrollSpeed = "-1";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "0 0";
+ extent = "458 562";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiScrollProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiVariableInspector(AssetImportConfigEditorInspector) {
+ dividerMargin = "5";
+ showCustomFields = "1";
+ stackingType = "Vertical";
+ horizStacking = "Left to Right";
+ vertStacking = "Top to Bottom";
+ padding = "1";
+ dynamicSize = "1";
+ dynamicNonStackExtent = "0";
+ dynamicPos = "0";
+ changeChildSizeToFit = "1";
+ changeChildPosition = "1";
+ position = "1 1";
+ extent = "441 615";
+ minExtent = "16 16";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "GuiDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ };
+ };
+ };
+ new GuiButtonCtrl() {
+ text = "Apply";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "451 588";
+ extent = "93 23";
+ minExtent = "8 8";
+ horizSizing = "right";
+ vertSizing = "top";
+ profile = "ToolsGuiButtonProfile";
+ visible = "1";
+ active = "1";
+ command = "AssetImportConfigEditor.apply(); Canvas.popDialog(AssetImportConfigEditor);";
+ tooltipProfile = "GuiToolTipProfile";
+ tooltip = "Apply the settings and close this dialog";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiButtonCtrl() {
+ text = "Cancel";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "547 588";
+ extent = "93 23";
+ minExtent = "8 8";
+ horizSizing = "right";
+ vertSizing = "top";
+ profile = "ToolsGuiButtonProfile";
+ visible = "1";
+ active = "1";
+ command = "Canvas.popDialog(AssetImprotConfigEditor);";
+ tooltipProfile = "GuiToolTipProfile";
+ tooltip = "Apply the settings and close this dialog";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ };
+};
+//--- OBJECT WRITE END ---
diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui
index 299007868..05b81844a 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui
+++ b/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui
@@ -20,18 +20,12 @@
coreModulesFilter = "0";
currentPreviewPage = "0";
Enabled = "1";
- importAssetFinalListArray = "20689";
- ImportAssetResolutionsPopup = "18119";
- importAssetUnprocessedListArray = "20688";
- importingFilesArray = "20687";
- isReImportingAsset = "0";
navigationHistoryIdx = "0";
onlyShowModulesWithAssets = "0";
previewData = "19953";
previewSize = "80";
templateFilesPath = "tools/assetBrowser/scripts/templateFiles/";
totalPages = "1";
- treeFilterMode = "list";
new GuiWindowCtrl(AssetBrowser_addFilterWindow) {
text = "Create New Tag";
diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui
index a89b344c5..6fdfd88c2 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui
+++ b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui
@@ -14,8 +14,8 @@
canSave = "1";
canSaveDynamicFields = "1";
- new GuiWindowCtrl(ImportAssetOptionsWindow) {
- text = "Import Options";
+ new GuiWindowCtrl(ImportAssetWindow) {
+ text = "Import Assets";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
@@ -30,62 +30,241 @@
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
- position = "339 179";
- extent = "346 409";
+ position = "132 80";
+ extent = "733 582";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
- visible = "0";
+ visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
- hidden = "1";
canSave = "1";
canSaveDynamicFields = "0";
- new GuiButtonCtrl() {
- text = "Done";
- groupNum = "-1";
- buttonType = "PushButton";
- useMouseEvents = "0";
- position = "271 377";
- extent = "64 22";
- minExtent = "8 2";
- horizSizing = "left";
- vertSizing = "top";
- profile = "ToolsGuiButtonProfile";
- visible = "1";
- active = "1";
- command = "ImportAssetOptionsWindow.saveAssetOptions();";
- tooltipProfile = "ToolsGuiToolTipProfile";
- hovertime = "1000";
- isContainer = "0";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiScrollCtrl() {
- willFirstRespond = "1";
- hScrollBar = "dynamic";
- vScrollBar = "dynamic";
- lockHorizScroll = "0";
- lockVertScroll = "0";
- constantThumbHeight = "0";
- childMargin = "0 0";
- mouseWheelScrollSpeed = "-1";
+ new GuiTextCtrl() {
+ text = "Target Path:";
+ maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
- position = "9 26";
- extent = "326 344";
+ position = "12 30";
+ extent = "116 17";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiTextProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiTextEditCtrl(AssetImportTargetAddress) {
+ historySize = "0";
+ tabComplete = "0";
+ sinkAllKeyEvents = "0";
+ password = "0";
+ passwordMask = "*";
+ maxLength = "1024";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "135 30";
+ extent = "569 18";
minExtent = "8 2";
horizSizing = "width";
+ vertSizing = "bottom";
+ profile = "ToolsGuiTextEditProfile";
+ visible = "1";
+ active = "0";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiBitmapButtonCtrl() {
+ bitmap = "tools/gui/images/iconOpen.png";
+ bitmapMode = "Centered";
+ autoFitExtents = "0";
+ useModifiers = "0";
+ useStates = "1";
+ masked = "0";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "707 27";
+ extent = "22 22";
+ minExtent = "8 2";
+ horizSizing = "left";
+ vertSizing = "bottom";
+ profile = "ToolsGuiButtonProfile";
+ visible = "1";
+ active = "1";
+ command = "SelectAssetPath.showDialog(AssetBrowser.dirHandler.currentAddress, \"assetImportUpdatePath\");\nSelectAssetPath.selectWindow();";
+ tooltipProfile = "GuiToolTipProfile";
+ tooltip = "New Module";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiTextCtrl() {
+ text = "Target Module:";
+ maxLength = "1024";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "12 54";
+ extent = "116 17";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiTextProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiTextEditCtrl(AssetImportTargetModule) {
+ historySize = "0";
+ tabComplete = "0";
+ sinkAllKeyEvents = "0";
+ password = "0";
+ passwordMask = "*";
+ maxLength = "1024";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "135 53";
+ extent = "569 18";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "bottom";
+ profile = "ToolsGuiTextEditProfile";
+ visible = "1";
+ active = "0";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiTextCtrl() {
+ text = "Import Options Config:";
+ maxLength = "1024";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "12 79";
+ extent = "116 17";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiTextProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiPopUpMenuCtrlEx(ImportAssetConfigList) {
+ maxPopupHeight = "200";
+ sbUsesNAColor = "0";
+ reverseTextList = "0";
+ bitmapBounds = "16 16";
+ hotTrackCallback = "0";
+ maxLength = "1024";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "135 78";
+ extent = "569 22";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "bottom";
+ profile = "ToolsGuiPopUpMenuProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiBitmapButtonCtrl() {
+ bitmap = "tools/gui/images/save-as";
+ bitmapMode = "Centered";
+ autoFitExtents = "0";
+ useModifiers = "0";
+ useStates = "1";
+ masked = "0";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "711 77";
+ extent = "15 22";
+ minExtent = "8 2";
+ horizSizing = "left";
+ vertSizing = "bottom";
+ profile = "ToolsGuiButtonProfile";
+ visible = "1";
+ active = "1";
+ command = "Canvas.pushDialog(AssetImportConfigEditor);";
+ tooltipProfile = "GuiToolTipProfile";
+ tooltip = "Edit Config";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiSplitContainer() {
+ orientation = "Vertical";
+ splitterSize = "2";
+ splitPoint = "182 100";
+ fixedPanel = "None";
+ fixedSize = "100";
+ docking = "None";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "5 102";
+ extent = "723 447";
+ minExtent = "64 64";
+ horizSizing = "width";
vertSizing = "height";
- profile = "ToolsGuiScrollProfile";
+ profile = "ToolsGuiSolidDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
@@ -94,32 +273,257 @@
canSave = "1";
canSaveDynamicFields = "0";
- new GuiVariableInspector(ImportOptionsList) {
- dividerMargin = "5";
- showCustomFields = "1";
- stackingType = "Vertical";
- horizStacking = "Left to Right";
- vertStacking = "Top to Bottom";
- padding = "1";
- dynamicSize = "1";
- dynamicNonStackExtent = "0";
- dynamicPos = "0";
- changeChildSizeToFit = "1";
- changeChildPosition = "1";
- position = "1 1";
- extent = "309 64";
+ new GuiPanel() {
+ docking = "Client";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "0 0";
+ extent = "180 447";
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
- profile = "GuiDefaultProfile";
+ profile = "ToolsGuiSolidDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
+ internalName = "Panel1";
canSave = "1";
canSaveDynamicFields = "0";
+
+ new GuiScrollCtrl() {
+ willFirstRespond = "1";
+ hScrollBar = "alwaysOff";
+ vScrollBar = "dynamic";
+ lockHorizScroll = "0";
+ lockVertScroll = "0";
+ constantThumbHeight = "0";
+ childMargin = "0 0";
+ mouseWheelScrollSpeed = "-1";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "3 3";
+ extent = "180 444";
+ minExtent = "100 50";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiScrollProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiMouseEventCtrl(NewAssetsPanelInputs) {
+ lockMouse = "0";
+ position = "1 0";
+ extent = "339 467";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "GuiDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiTreeViewCtrl() {
+ tabSize = "16";
+ textOffset = "2";
+ fullRowSelect = "0";
+ itemHeight = "21";
+ destroyTreeOnSleep = "1";
+ mouseDragging = "1";
+ multipleSelections = "1";
+ deleteObjectAllowed = "1";
+ dragToItemAllowed = "1";
+ clearAllOnSingleSelection = "1";
+ showRoot = "1";
+ useInspectorTooltips = "0";
+ tooltipOnWidthOnly = "0";
+ showObjectIds = "1";
+ showClassNames = "1";
+ showObjectNames = "1";
+ showInternalNames = "1";
+ showClassNameForUnnamedObjects = "0";
+ compareToObjectID = "1";
+ canRenameObjects = "1";
+ renameInternal = "0";
+ position = "1 1";
+ extent = "180 444";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiTreeViewProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ internalName = "NewAssetsTree";
+ class = "NewAssetsViewTree";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ };
};
+ new GuiPanel() {
+ docking = "Client";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "184 0";
+ extent = "539 447";
+ minExtent = "16 16";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiSolidDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ internalName = "panel2";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiScrollCtrl() {
+ willFirstRespond = "1";
+ hScrollBar = "dynamic";
+ vScrollBar = "dynamic";
+ lockHorizScroll = "0";
+ lockVertScroll = "0";
+ constantThumbHeight = "0";
+ childMargin = "0 0";
+ mouseWheelScrollSpeed = "-1";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "0 0";
+ extent = "539 447";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiScrollProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiVariableInspector() {
+ dividerMargin = "5";
+ showCustomFields = "1";
+ stackingType = "Vertical";
+ horizStacking = "Left to Right";
+ vertStacking = "Top to Bottom";
+ padding = "1";
+ dynamicSize = "1";
+ dynamicNonStackExtent = "0";
+ dynamicPos = "0";
+ changeChildSizeToFit = "1";
+ changeChildPosition = "1";
+ position = "1 1";
+ extent = "522 615";
+ minExtent = "16 16";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ internalName = "NewAssetsInspector";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ };
+ };
+ };
+ new GuiButtonCtrl() {
+ text = "Done";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "589 553";
+ extent = "64 22";
+ minExtent = "8 2";
+ horizSizing = "left";
+ vertSizing = "top";
+ profile = "ToolsGuiButtonProfile";
+ visible = "1";
+ active = "1";
+ command = "ImportAssetWindow.ImportAssets();";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiButtonCtrl() {
+ text = "Cancel";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "657 553";
+ extent = "64 22";
+ minExtent = "8 2";
+ horizSizing = "left";
+ vertSizing = "top";
+ profile = "ToolsGuiButtonProfile";
+ visible = "1";
+ active = "1";
+ command = "ImportAssetWindow.close();";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiTextCtrl(AssetImportSummarization) {
+ maxLength = "1024";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "4 554";
+ extent = "574 23";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "top";
+ profile = "ToolsGuiTextProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
};
};
new GuiWindowCtrl(ImportAssetConfigEditorWindow) {
@@ -131,6 +535,7 @@
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
+ closeCommand = "ImportAssetConfigEditorWindow.close();";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
@@ -152,7 +557,6 @@
hidden = "1";
canSave = "1";
canSaveDynamicFields = "0";
- closeCommand = "ImportAssetConfigEditorWindow.close();";
new GuiTextCtrl() {
text = "Configuration Name:";
@@ -281,436 +685,5 @@
};
};
};
- new GuiWindowCtrl(ImportAssetWindow) {
- text = "Import Assets";
- resizeWidth = "1";
- resizeHeight = "1";
- canMove = "1";
- canClose = "0";
- canMinimize = "0";
- canMaximize = "0";
- canCollapse = "0";
- edgeSnap = "1";
- margin = "0 0 0 0";
- padding = "0 0 0 0";
- anchorTop = "1";
- anchorBottom = "0";
- anchorLeft = "1";
- anchorRight = "0";
- position = "145 133";
- extent = "733 502";
- minExtent = "48 92";
- horizSizing = "center";
- vertSizing = "center";
- profile = "ToolsGuiWindowProfile";
- visible = "1";
- active = "1";
- tooltipProfile = "ToolsGuiToolTipProfile";
- hovertime = "1000";
- isContainer = "1";
- canSave = "1";
- canSaveDynamicFields = "0";
-
- new GuiButtonCtrl() {
- text = "Done";
- groupNum = "-1";
- buttonType = "PushButton";
- useMouseEvents = "0";
- position = "589 470";
- extent = "64 22";
- minExtent = "8 2";
- horizSizing = "left";
- vertSizing = "top";
- profile = "ToolsGuiButtonProfile";
- visible = "1";
- active = "1";
- command = "ImportAssetWindow.ImportAssets();";
- tooltipProfile = "ToolsGuiToolTipProfile";
- hovertime = "1000";
- isContainer = "0";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiButtonCtrl() {
- text = "Cancel";
- groupNum = "-1";
- buttonType = "PushButton";
- useMouseEvents = "0";
- position = "657 470";
- extent = "64 22";
- minExtent = "8 2";
- horizSizing = "left";
- vertSizing = "top";
- profile = "ToolsGuiButtonProfile";
- visible = "1";
- active = "1";
- command = "ImportAssetWindow.close();";
- tooltipProfile = "ToolsGuiToolTipProfile";
- hovertime = "1000";
- isContainer = "0";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiTextCtrl() {
- text = "Target Module:";
- maxLength = "1024";
- margin = "0 0 0 0";
- padding = "0 0 0 0";
- anchorTop = "1";
- anchorBottom = "0";
- anchorLeft = "1";
- anchorRight = "0";
- position = "12 30";
- extent = "116 17";
- minExtent = "8 2";
- horizSizing = "right";
- vertSizing = "bottom";
- profile = "ToolsGuiDefaultProfile";
- visible = "1";
- active = "1";
- tooltipProfile = "GuiToolTipProfile";
- hovertime = "1000";
- isContainer = "1";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiPopUpMenuCtrlEx(ImportAssetModuleList) {
- maxPopupHeight = "200";
- sbUsesNAColor = "0";
- reverseTextList = "0";
- bitmapBounds = "16 16";
- hotTrackCallback = "0";
- maxLength = "1024";
- margin = "0 0 0 0";
- padding = "0 0 0 0";
- anchorTop = "1";
- anchorBottom = "0";
- anchorLeft = "1";
- anchorRight = "0";
- position = "134 27";
- extent = "569 22";
- minExtent = "8 2";
- horizSizing = "width";
- vertSizing = "bottom";
- profile = "ToolsGuiPopupMenuProfile";
- visible = "1";
- active = "1";
- tooltipProfile = "GuiToolTipProfile";
- hovertime = "1000";
- isContainer = "1";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/iconAdd.png";
- bitmapMode = "Centered";
- autoFitExtents = "0";
- useModifiers = "0";
- useStates = "1";
- masked = "0";
- groupNum = "-1";
- buttonType = "PushButton";
- useMouseEvents = "0";
- position = "707 27";
- extent = "22 22";
- minExtent = "8 2";
- horizSizing = "left";
- vertSizing = "bottom";
- profile = "ToolsGuiButtonProfile";
- visible = "1";
- active = "1";
- command = "Canvas.pushDialog(AssetBrowser_addModule);\nAssetBrowser_addModuleWindow.selectWindow();";
- tooltipProfile = "GuiToolTipProfile";
- tooltip = "New Module";
- hovertime = "1000";
- isContainer = "0";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiTextCtrl() {
- text = "Import Options Config:";
- maxLength = "1024";
- margin = "0 0 0 0";
- padding = "0 0 0 0";
- anchorTop = "1";
- anchorBottom = "0";
- anchorLeft = "1";
- anchorRight = "0";
- position = "12 56";
- extent = "116 17";
- minExtent = "8 2";
- horizSizing = "right";
- vertSizing = "bottom";
- profile = "ToolsGuiTextProfile";
- visible = "1";
- active = "1";
- tooltipProfile = "GuiToolTipProfile";
- hovertime = "1000";
- isContainer = "1";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiPopUpMenuCtrlEx(ImportAssetConfigList) {
- maxPopupHeight = "200";
- sbUsesNAColor = "0";
- reverseTextList = "0";
- bitmapBounds = "16 16";
- hotTrackCallback = "0";
- maxLength = "1024";
- margin = "0 0 0 0";
- padding = "0 0 0 0";
- anchorTop = "1";
- anchorBottom = "0";
- anchorLeft = "1";
- anchorRight = "0";
- position = "126 53";
- extent = "540 22";
- minExtent = "8 2";
- horizSizing = "width";
- vertSizing = "bottom";
- profile = "ToolsGuiPopupMenuProfile";
- visible = "1";
- active = "1";
- tooltipProfile = "GuiToolTipProfile";
- hovertime = "1000";
- isContainer = "1";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/iconAdd.png";
- bitmapMode = "Centered";
- autoFitExtents = "0";
- useModifiers = "0";
- useStates = "1";
- masked = "0";
- groupNum = "-1";
- buttonType = "PushButton";
- useMouseEvents = "0";
- position = "670 53";
- extent = "15 22";
- minExtent = "8 2";
- horizSizing = "left";
- vertSizing = "bottom";
- profile = "ToolsGuiButtonProfile";
- visible = "1";
- active = "1";
- command = "ImportAssetConfigEditorWindow.addNewConfig();";
- tooltipProfile = "GuiToolTipProfile";
- tooltip = "New Config";
- hovertime = "1000";
- isContainer = "0";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/iconInformation.png";
- bitmapMode = "Centered";
- autoFitExtents = "0";
- useModifiers = "0";
- useStates = "1";
- masked = "0";
- groupNum = "-1";
- buttonType = "PushButton";
- useMouseEvents = "0";
- position = "690 53";
- extent = "15 22";
- minExtent = "8 2";
- horizSizing = "left";
- vertSizing = "bottom";
- profile = "ToolsGuiButtonProfile";
- visible = "1";
- active = "1";
- command = "ImportAssetConfigEditorWindow.editConfig();";
- tooltipProfile = "GuiToolTipProfile";
- tooltip = "Edit Config";
- hovertime = "1000";
- isContainer = "0";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/iconDelete.png";
- bitmapMode = "Centered";
- autoFitExtents = "0";
- useModifiers = "0";
- useStates = "1";
- masked = "0";
- groupNum = "-1";
- buttonType = "PushButton";
- useMouseEvents = "0";
- position = "711 53";
- extent = "15 22";
- minExtent = "8 2";
- horizSizing = "left";
- vertSizing = "bottom";
- profile = "ToolsGuiButtonProfile";
- visible = "1";
- active = "1";
- command = "ImportAssetConfigEditorWindow.deleteConfig();";
- tooltipProfile = "GuiToolTipProfile";
- tooltip = "Delete Config";
- hovertime = "1000";
- isContainer = "0";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiScrollCtrl() {
- willFirstRespond = "1";
- hScrollBar = "dynamic";
- vScrollBar = "dynamic";
- lockHorizScroll = "0";
- lockVertScroll = "0";
- constantThumbHeight = "0";
- childMargin = "0 0";
- mouseWheelScrollSpeed = "-1";
- margin = "0 0 0 0";
- padding = "0 0 0 0";
- anchorTop = "1";
- anchorBottom = "0";
- anchorLeft = "1";
- anchorRight = "0";
- position = "9 82";
- extent = "713 381";
- minExtent = "8 2";
- horizSizing = "width";
- vertSizing = "height";
- profile = "ToolsGuiScrollProfile";
- visible = "1";
- active = "1";
- tooltipProfile = "GuiToolTipProfile";
- hovertime = "1000";
- isContainer = "1";
- canSave = "1";
- canSaveDynamicFields = "0";
-
- new GuiStackControl(ImportingAssetList) {
- stackingType = "Vertical";
- horizStacking = "Left to Right";
- vertStacking = "Top to Bottom";
- padding = "0";
- dynamicSize = "1";
- dynamicNonStackExtent = "0";
- dynamicPos = "0";
- changeChildSizeToFit = "0";
- changeChildPosition = "1";
- position = "1 1";
- extent = "710 20";
- minExtent = "16 16";
- horizSizing = "width";
- vertSizing = "bottom";
- profile = "GuiDefaultProfile";
- visible = "1";
- active = "1";
- tooltipProfile = "GuiToolTipProfile";
- hovertime = "1000";
- isContainer = "1";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- };
- };
- new GuiWindowCtrl(ImportAssetNewConfigEditorWindow) {
- text = "Import Options Config";
- resizeWidth = "1";
- resizeHeight = "1";
- canMove = "1";
- canClose = "1";
- canMinimize = "0";
- canMaximize = "0";
- canCollapse = "0";
- edgeSnap = "1";
- margin = "0 0 0 0";
- padding = "0 0 0 0";
- anchorTop = "1";
- anchorBottom = "0";
- anchorLeft = "1";
- anchorRight = "0";
- position = "348 332";
- extent = "376 70";
- minExtent = "48 70";
- horizSizing = "center";
- vertSizing = "center";
- profile = "ToolsGuiWindowProfile";
- visible = "0";
- active = "1";
- tooltipProfile = "ToolsGuiToolTipProfile";
- hovertime = "1000";
- isContainer = "1";
- hidden = "1";
- canSave = "1";
- canSaveDynamicFields = "0";
-
- new GuiTextCtrl() {
- text = "Configuration Name:";
- maxLength = "1024";
- margin = "0 0 0 0";
- padding = "0 0 0 0";
- anchorTop = "1";
- anchorBottom = "0";
- anchorLeft = "1";
- anchorRight = "0";
- position = "10 26";
- extent = "100 17";
- minExtent = "8 2";
- horizSizing = "right";
- vertSizing = "bottom";
- profile = "ToolsGuiTextProfile";
- visible = "1";
- active = "1";
- tooltipProfile = "GuiToolTipProfile";
- hovertime = "1000";
- isContainer = "1";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiTextEditCtrl(AssetImportNewConfigName) {
- historySize = "0";
- tabComplete = "0";
- sinkAllKeyEvents = "0";
- password = "0";
- passwordMask = "*";
- maxLength = "1024";
- margin = "0 0 0 0";
- padding = "0 0 0 0";
- anchorTop = "1";
- anchorBottom = "0";
- anchorLeft = "1";
- anchorRight = "0";
- position = "113 25";
- extent = "250 18";
- minExtent = "8 2";
- horizSizing = "width";
- vertSizing = "bottom";
- profile = "ToolsGuiTextEditProfile";
- visible = "1";
- active = "1";
- tooltipProfile = "GuiToolTipProfile";
- hovertime = "1000";
- isContainer = "1";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- new GuiButtonCtrl() {
- text = "Done";
- groupNum = "-1";
- buttonType = "PushButton";
- useMouseEvents = "0";
- position = "301 45";
- extent = "64 22";
- minExtent = "8 2";
- horizSizing = "left";
- vertSizing = "top";
- profile = "ToolsGuiButtonProfile";
- visible = "1";
- active = "1";
- command = "ImportAssetConfigEditorWindow.createNewImportConfig();";
- tooltipProfile = "ToolsGuiToolTipProfile";
- hovertime = "1000";
- isContainer = "0";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
- };
};
//--- OBJECT WRITE END ---
diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/newFolder.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/newFolder.gui
new file mode 100644
index 000000000..ff1509cb4
--- /dev/null
+++ b/Templates/BaseGame/game/tools/assetBrowser/guis/newFolder.gui
@@ -0,0 +1,118 @@
+//--- OBJECT WRITE BEGIN ---
+%guiContent = new GuiControl(AssetBrowser_newFolder) {
+ position = "0 0";
+ extent = "1024 768";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiDefaultNonModalProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "1";
+ Enabled = "1";
+
+ new GuiWindowCtrl() {
+ text = "Name New Folder";
+ resizeWidth = "1";
+ resizeHeight = "0";
+ canMove = "1";
+ canClose = "1";
+ canMinimize = "0";
+ canMaximize = "0";
+ canCollapse = "0";
+ edgeSnap = "1";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "362 334";
+ extent = "355 99";
+ minExtent = "48 92";
+ horizSizing = "center";
+ vertSizing = "center";
+ profile = "ToolsGuiWindowProfile";
+ visible = "1";
+ active = "1";
+ command = "Canvas.popDialog(AssetBrowser_newFolder);";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiButtonCtrl() {
+ text = "Select";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "207 68";
+ extent = "71 22";
+ minExtent = "8 2";
+ horizSizing = "left";
+ vertSizing = "top";
+ profile = "ToolsGuiButtonProfile";
+ visible = "1";
+ active = "1";
+ command = "Canvas.popDialog(AssetBrowser_newFolder); AssetBrowser.doCreateNewFolder();";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiButtonCtrl() {
+ text = "Cancel";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "284 68";
+ extent = "64 22";
+ minExtent = "8 2";
+ horizSizing = "left";
+ vertSizing = "top";
+ profile = "ToolsGuiButtonProfile";
+ visible = "1";
+ active = "1";
+ command = "Canvas.popDialog(AssetBrowser_newFolder);";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiTextEditCtrl(AssetBrowser_newFolderNameTxt) {
+ historySize = "0";
+ tabComplete = "0";
+ sinkAllKeyEvents = "0";
+ password = "0";
+ passwordMask = "*";
+ maxLength = "1024";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "8 38";
+ extent = "341 18";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiTextEditProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ };
+};
+//--- OBJECT WRITE END ---
diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui
new file mode 100644
index 000000000..bbc4a6b0b
--- /dev/null
+++ b/Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui
@@ -0,0 +1,257 @@
+//--- OBJECT WRITE BEGIN ---
+%guiContent = new GuiControl(SelectAssetPath) {
+ position = "0 0";
+ extent = "1024 768";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "GuiDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "1";
+
+ new GuiWindowCtrl() {
+ text = "Select Path";
+ resizeWidth = "1";
+ resizeHeight = "1";
+ canMove = "1";
+ canClose = "1";
+ canMinimize = "1";
+ canMaximize = "1";
+ canCollapse = "0";
+ edgeSnap = "1";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "329 147";
+ extent = "296 442";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiWindowProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiContainer() {
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "0 24";
+ extent = "295 31";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "bottom";
+ profile = "inspectorStyleRolloutDarkProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiTextEditCtrl() {
+ historySize = "0";
+ tabComplete = "0";
+ sinkAllKeyEvents = "0";
+ password = "0";
+ passwordMask = "*";
+ text = "Search Folders...";
+ maxLength = "1024";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "0 0";
+ extent = "296 18";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiTextEditProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ internalName = "AssetBrowserFolderSearchFilter";
+ class = "AssetBrowserSearchFilterTxt";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ new GuiBitmapButtonCtrl() {
+ bitmap = "tools/gui/images/clear-icon";
+ bitmapMode = "Centered";
+ autoFitExtents = "0";
+ useModifiers = "0";
+ useStates = "1";
+ masked = "0";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "280 0";
+ extent = "15 15";
+ minExtent = "8 2";
+ horizSizing = "left";
+ vertSizing = "bottom";
+ profile = "GuiDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ tooltip = "ClearFolderFilterBtn";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ };
+ new GuiContainer() {
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "0 41";
+ extent = "297 369";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiSolidDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiScrollCtrl() {
+ willFirstRespond = "1";
+ hScrollBar = "alwaysOff";
+ vScrollBar = "dynamic";
+ lockHorizScroll = "1";
+ lockVertScroll = "0";
+ constantThumbHeight = "0";
+ childMargin = "0 0";
+ mouseWheelScrollSpeed = "-1";
+ docking = "Client";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "0 0";
+ extent = "297 369";
+ minExtent = "8 8";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "GuiEditorScrollProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "ToolsGuiSolidDefaultProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiTreeViewCtrl() {
+ class="selectAssetPathTree";
+ tabSize = "16";
+ textOffset = "2";
+ fullRowSelect = "0";
+ itemHeight = "21";
+ destroyTreeOnSleep = "1";
+ mouseDragging = "1";
+ multipleSelections = "1";
+ deleteObjectAllowed = "1";
+ dragToItemAllowed = "1";
+ clearAllOnSingleSelection = "1";
+ showRoot = "1";
+ useInspectorTooltips = "0";
+ tooltipOnWidthOnly = "0";
+ showObjectIds = "1";
+ showClassNames = "1";
+ showObjectNames = "1";
+ showInternalNames = "1";
+ showClassNameForUnnamedObjects = "0";
+ compareToObjectID = "1";
+ canRenameObjects = "1";
+ renameInternal = "0";
+ position = "1 1";
+ extent = "295 210";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiTreeViewProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ internalName = "folderTree";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ };
+ };
+ new GuiButtonCtrl() {
+ text = "Cancel";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "225 413";
+ extent = "69 24";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiButtonProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ command="Canvas.popDialog(SelectAssetPath);";
+ };
+ new GuiButtonCtrl() {
+ text = "Select";
+ groupNum = "-1";
+ buttonType = "PushButton";
+ useMouseEvents = "0";
+ position = "139 413";
+ extent = "85 24";
+ minExtent = "8 2";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiButtonProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ command="SelectAssetPath.selectPath();";
+ };
+ };
+};
+//--- OBJECT WRITE END ---
diff --git a/Templates/BaseGame/game/tools/assetBrowser/main.cs b/Templates/BaseGame/game/tools/assetBrowser/main.cs
index abc61f2e3..6cf88284a 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/main.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/main.cs
@@ -64,10 +64,13 @@ function initializeAssetBrowser()
exec("./guis/newComponentAsset.gui");
exec("./guis/editAsset.gui");
exec("./guis/assetImport.gui");
+ exec("./guis/assetImportConfigEditor.gui");
exec("./guis/selectModule.gui");
+ exec("./guis/selectPath.gui");
exec("./guis/editModule.gui");
exec("./guis/importTemplateModules.gui");
exec("./guis/assetPreviewButtonsTemplate.gui");
+ exec("./guis/newFolder.gui");
exec("./scripts/assetBrowser.cs");
exec("./scripts/popupMenus.cs");
@@ -79,6 +82,9 @@ function initializeAssetBrowser()
exec("./scripts/editAsset.cs");
exec("./scripts/editModule.cs");
exec("./scripts/selectModule.cs");
+ exec("./scripts/assetImportConfigEditor.cs");
+ exec("./scripts/directoryHandling.cs");
+ exec("./scripts/selectPath.cs");
//Processing for the different asset types
exec("./scripts/assetTypes/component.cs");
@@ -108,6 +114,20 @@ function initializeAssetBrowser()
Input::GetEventManager().subscribe( AssetBrowser, "DropFile" );
Input::GetEventManager().subscribe( AssetBrowser, "EndDropFiles" );
+ if(!isObject(AssetImportSettings))
+ {
+ new Settings(AssetImportSettings)
+ {
+ file = $AssetBrowser::importConfigsFile;
+ };
+ }
+ AssetImportSettings.read();
+
+ ImportAssetWindow.reloadImportOptionConfigs();
+
+ if(!isObject(ImportAssetTree))
+ new GuiTreeViewCtrl(ImportAssetTree);
+
AssetBrowser.buildPopupMenus();
}
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs
index c890a6ce7..8459d809f 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs
@@ -41,27 +41,20 @@ function AssetBrowser::onWake(%this)
if(!isObject(AssetPreviewArray))
new ArrayObject(AssetPreviewArray);
- if(!isObject(ImportAssetTree))
- new GuiTreeViewCtrl(ImportAssetTree);
+ if(!isObject(%this.dirHandler))
+ %this.dirHandler = makedirectoryHandler(AssetBrowser-->filterTree, "cache,shaderCache", "");
- if(!isObject(AssetBrowser_NavPrevHistoryList))
- {
- new ArrayObject(AssetBrowser_NavPrevHistoryList);
- }
- if(!isObject(AssetBrowser_NavForeHistoryList))
- {
- new ArrayObject(AssetBrowser_NavForeHistoryList);
- }
+ AssetBrowser-->filterTree.buildIconTable( ":tools/classIcons/Prefab:tools/classIcons/Prefab" @
+ ":tools/classIcons/SimSet:tools/classIcons/SimSet");
%this.importingFilesArray = new ArrayObject();
%this.importAssetUnprocessedListArray = new ArrayObject();
%this.importAssetFinalListArray = new ArrayObject();
-
%this.isReImportingAsset = false;
+
%this.coreModulesFilter = false;
%this.toolsModulesFilter = false;
%this.onlyShowModulesWithAssets = false;
- %this.treeFilterMode = "list";
%this.folderPanelState = true;
%this.folderPanelSplit = 0;
@@ -109,7 +102,7 @@ function AssetBrowser::viewCoreModulesFilter(%this)
EditorSettings.setValue("Assets/Browser/showCoreModule", %newVal);
- AssetBrowser.loadFilters();
+ AssetBrowser.refresh();
}
function AssetBrowser::viewToolsModulesFilter(%this)
@@ -121,7 +114,7 @@ function AssetBrowser::viewToolsModulesFilter(%this)
EditorSettings.setValue("Assets/Browser/showToolsModule", %newVal);
- AssetBrowser.loadFilters();
+ AssetBrowser.refresh();
}
function AssetBrowser::viewPopulatedModulesFilter(%this)
@@ -133,7 +126,7 @@ function AssetBrowser::viewPopulatedModulesFilter(%this)
EditorSettings.setValue("Assets/Browser/showOnlyPopulatedModule", %newVal);
- AssetBrowser.loadFilters();
+ AssetBrowser.refresh();
}
function AssetBrowser::toggleShowingFolders(%this)
@@ -145,7 +138,7 @@ function AssetBrowser::toggleShowingFolders(%this)
EditorSettings.setValue("Assets/Browser/showFolders", %newVal);
- AssetBrowser.loadFilters();
+ AssetBrowser.refresh();
}
function AssetBrowser::toggleShowingEmptyFolders(%this)
@@ -157,19 +150,7 @@ function AssetBrowser::toggleShowingEmptyFolders(%this)
EditorSettings.setValue("Assets/Browser/showEmptyFolders", %newVal);
- AssetBrowser.loadFilters();
-}
-
-function AssetBrowser::viewListFilter(%this)
-{
- %this.treeFilterMode = "list";
- AssetBrowser.loadFilters();
-}
-
-function AssetBrowser::viewTagsFilter(%this)
-{
- %this.treeFilterMode = "tags";
- AssetBrowser.loadFilters();
+ AssetBrowser.refresh();
}
function AssetBrowser::toggleAssetTypeFilter(%this, %assetTypeIdx)
@@ -223,6 +204,7 @@ function AssetBrowser::toggleAssetTypeFilter(%this, %assetTypeIdx)
%this.rebuildAssetArray();
}
+//
function AssetBrowser::selectAsset( %this, %asset )
{
if(AssetBrowser.selectCallback !$= "")
@@ -280,10 +262,8 @@ function AssetBrowser::showDialog( %this, %AssetTypeFilter, %selectCallback, %ta
{
%this-->SelectButton.setHidden(false);
}
-
- //AssetBrowser_importAssetWindow.setVisible(0);
- //AssetBrowser_importAssetConfigWindow.setVisible(0);
- AssetBrowser.loadFilters();
+
+ AssetBrowser.loadDirectories();
}
function AssetBrowser::hideDialog( %this )
@@ -397,6 +377,10 @@ function AssetBrowser::buildPreviewArray( %this, %asset, %moduleName )
AssetPreviewArray.add( %previewButton, %this.previewData.previewImage );
}
+function AssetBrowser::refresh(%this)
+{
+ %this.navigateTo(%this.dirHandler.currentAddress);
+}
//
//
function AssetPreviewButton::onClick(%this)
@@ -411,246 +395,31 @@ function AssetPreviewButton::onDoubleClick(%this)
//
//
-function AssetBrowser::loadFolders(%this, %path, %parentId)
-{
- //utilize home dir project setting here
- %paths = getDirectoryList(%path);
- for(%i=0; %i < getFieldCount(%paths); %i++)
- {
- %childPath = getField(%paths, %i);
-
- %folderCount = getTokenCount(%childPath, "/");
-
- for(%f=0; %f < %folderCount; %f++)
- {
- %folderName = getToken(%childPath, "/", %f);
-
- //we don't need to display the shadercache folder
- if(%parentId == 1 && (%folderName $= "shaderCache" || %folderName $= "cache"))
- continue;
-
- %iconIdx = 1;
-
- if(ModuleDatabase.findModule(%folderName) !$= "")
- %iconIdx = 0;
-
- %searchFoldersText = AssetBrowserFolderSearchFilter.getText();
- if(%searchFoldersText !$= "Search Folders...")
- {
- if(strstr(strlwr(%folderName), strlwr(%searchFoldersText)) != -1)
- {
- %folderID = AssetBrowser-->filterTree.insertItem(%parentId, %folderName, %path, "", %iconIdx, %iconIdx);
-
- %this.loadFolders(%path @ "/" @ %folderName, %folderID);
- }
- }
- else
- {
- %folderID = AssetBrowser-->filterTree.insertItem(%parentId, %folderName, %path, "", %iconIdx, %iconIdx);
-
- %this.loadFolders(%path @ "/" @ %folderName, %folderID);
- }
- }
- }
-}
-
-function AssetBrowser::loadFilters( %this )
+function AssetBrowser::loadDirectories( %this )
{
AssetBrowser-->filterTree.clear();
-
- AssetBrowser-->filterTree.buildIconTable( "tools/classIcons/Prefab" @
- ":tools/classIcons/SimSet");
%dataItem = AssetBrowser-->filterTree.insertItem(0, "Data");
- %this.loadFolders("Data", %dataItem);
+ %this.dirHandler.loadFolders("Data", %dataItem);
//If set to, show core
if(%this.coreModulesFilter)
{
%coreItem = AssetBrowser-->filterTree.insertItem(0, "Core");
- %this.loadFolders("Core", %coreItem);
+ %this.dirHandler.loadFolders("Core", %coreItem);
}
//If set to, show tools
if(%this.toolsModulesFilter)
{
%toolsItem = AssetBrowser-->filterTree.insertItem(0, "Tools");
- %this.loadFolders("Tools", %toolsItem);
+ %this.dirHandler.loadFolders("Tools", %toolsItem);
}
-
- //AssetBrowser-->filterTree.insertItem(0, "Data");
-
- //get it alllll
- /*%directoryDump = getDirectoryList("data", -1);
-
- %dirs = getFieldCount(%directoryDump);
-
- for(%i=0; %i < %dirs; %i++)
- {
- %folderName = getToken(%assetBasePath, "/", %f);
-
- %folderID = AssetBrowser-->filterTree.findChildItemByName(%prevFolderID, %folderName);
-
- if(%folderID == -1 || %folderID == 0)
- {
- %pathCache = "";
-
- for(%c=0; %c < %f; %c++)
- {
- %pathCache = %c == 0 ? getToken(%assetBasePath, "/", %c) : %pathCache @ "/" @ getToken(%assetBasePath, "/", %c);
- }
-
- %folderID = AssetBrowser-->filterTree.insertItem(%prevFolderID, %folderName, %pathCache, "", 1, 1);
- }
- }*/
AssetPreviewArray.empty();
- /*%assetQuery = new AssetQuery();
- %numAssetsFound = AssetDatabase.findAllAssets(%assetQuery);
-
- for( %i=0; %i < %numAssetsFound; %i++)
- {
- %assetId = %assetQuery.getAsset(%i);
-
- %assetPath = makeRelativePath(AssetDatabase.getAssetFilePath(%assetId));
-
- //clean up the path
- %assetPath = strreplace(%assetPath, "\\\\", "\\");
- %assetPath = strreplace(%assetPath, "\\", "\\");
- %assetPath = strreplace(%assetPath, "//", "\\");
-
- %assetBasePath = filePath(%assetPath);
-
- %foldersCount = getTokenCount(%assetBasePath, "/");
-
- //Build our directory structure
- %prevFolderID = 0;
- for(%f=0; %f < %foldersCount; %f++)
- {
- %folderName = getToken(%assetBasePath, "/", %f);
-
- %folderID = AssetBrowser-->filterTree.findChildItemByName(%prevFolderID, %folderName);
-
- if(%folderID == -1 || %folderID == 0)
- {
- %pathCache = "";
-
- for(%c=0; %c < %f; %c++)
- {
- %pathCache = %c == 0 ? getToken(%assetBasePath, "/", %c) : %pathCache @ "/" @ getToken(%assetBasePath, "/", %c);
- }
-
- %folderID = AssetBrowser-->filterTree.insertItem(%prevFolderID, %folderName, %pathCache, "", 1, 1);
- }
-
- %prevFolderID = %folderID;
- }
-
- //first, get the asset's module, as our major categories
- %module = AssetDatabase.getAssetModule(%assetId);
-
- %moduleName = %module.moduleId;
-
- %moduleGroup = %module.Group;
- if((%moduleGroup $= "Core" || %moduleGroup $= "Tools") && !%this.coreModulesFilter)
- continue;
-
- //first, see if this module Module is listed already
- /*%moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
-
- //if(%moduleItemId == 0)
- // %moduleItemId = AssetBrowser-->filterTree.insertItem(1, %moduleName, "", "", 1, 1);
-
- %assetType = AssetDatabase.getAssetCategory(%assetId);
-
- if(%assetType $= "")
- {
- %assetType = AssetDatabase.getAssetType(%assetId);
- if(%assetType $= "")
- %assetType = "Misc";
- }
-
- if(AssetBrowser.assetTypeFilter !$= "" && AssetBrowser.assetTypeFilter !$= %assetType)
- continue;
-
- %assetTypeId = AssetBrowser-->filterTree.findChildItemByName(%moduleItemId, %assetType);
-
- if(%assetTypeId == 0)
- %assetTypeId = AssetBrowser-->filterTree.insertItem(%moduleItemId, %assetType);*/
- //}
-
AssetBrowser-->filterTree.buildVisibleTree(true);
- /*if(%this.treeFilterMode $= "list")
- {
- //First, build our our list of active modules
- %modulesList = ModuleDatabase.findModules(true);
-
- for(%i=0; %i < getWordCount(%modulesList); %i++)
- {
- %moduleName = getWord(%modulesList, %i).ModuleId;
-
- %moduleGroup = getWord(%modulesList, %i).Group;
- if((%moduleGroup $= "Core" || %moduleGroup $= "Tools") && !%this.coreModulesFilter)
- continue;
-
- %moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
-
- if(%moduleItemId == 0)
- %moduleItemId = AssetBrowser-->filterTree.insertItem(1, %moduleName, "", "", 1, 1);
- }
-
- //Next, go through and list the asset categories
- %assetQuery = new AssetQuery();
- %numAssetsFound = AssetDatabase.findAllAssets(%assetQuery);
-
- for( %i=0; %i < %numAssetsFound; %i++)
- {
- %assetId = %assetQuery.getAsset(%i);
-
- //first, get the asset's module, as our major categories
- %module = AssetDatabase.getAssetModule(%assetId);
-
- %moduleName = %module.moduleId;
-
- %moduleGroup = %module.Group;
- if((%moduleGroup $= "Core" || %moduleGroup $= "Tools") && !%this.coreModulesFilter)
- continue;
-
- //first, see if this module Module is listed already
- %moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
-
- if(%moduleItemId == 0)
- %moduleItemId = AssetBrowser-->filterTree.insertItem(1, %moduleName, "", "", 1, 1);
-
- %assetType = AssetDatabase.getAssetCategory(%assetId);
-
- if(%assetType $= "")
- {
- %assetType = AssetDatabase.getAssetType(%assetId);
- if(%assetType $= "")
- %assetType = "Misc";
- }
-
- if(AssetBrowser.assetTypeFilter !$= "" && AssetBrowser.assetTypeFilter !$= %assetType)
- continue;
-
- %assetTypeId = AssetBrowser-->filterTree.findChildItemByName(%moduleItemId, %assetType);
-
- if(%assetTypeId == 0)
- %assetTypeId = AssetBrowser-->filterTree.insertItem(%moduleItemId, %assetType);
- }
-
- AssetBrowser-->filterTree.buildVisibleTree(true);
- }
- else if(%this.treeFilterMode $= "tags")
- {
-
- }*/
-
- //%this.collapseTree();
-
//Remove any modules that have no assets if we have that filter on
if(%this.onlyShowModulesWithAssets)
{
@@ -677,61 +446,14 @@ function AssetBrowser::loadFilters( %this )
%dataItem = AssetBrowser-->filterTree.findItemByName("Data");
AssetBrowser-->filterTree.expandItem(%dataItem);
- AssetBrowser.expandTreeToAddress(AssetBrowser.currentAddress);
+ AssetBrowser.dirHandler.expandTreeToAddress(AssetBrowser.dirHandler.currentAddress);
- %selectedItem = AssetBrowser.getFolderTreeItemFromAddress(AssetBrowser.currentAddress);
+ %selectedItem = AssetBrowser.dirHandler.getFolderTreeItemFromAddress(AssetBrowser.dirHandler.currentAddress);
AssetBrowser-->filterTree.scrollVisibleByObjectId(%selectedItem);
AssetBrowser-->filterTree.buildVisibleTree();
-}
-
-// create category and update current material if there is one
-function AssetBrowser::createFilter( %this, %filter )
-{
- if( %filter $= %existingFilters )
- {
- MessageBoxOK( "Error", "Can not create blank filter.");
- return;
- }
-
- for( %i = AssetBrowser.staticFilterObjects; %i < AssetBrowser-->filterArray.getCount() ; %i++ )
- {
- %existingFilters = AssetBrowser-->filterArray.getObject(%i).getObject(0).filter;
- if( %filter $= %existingFilters )
- {
- MessageBoxOK( "Error", "Can not create two filters of the same name.");
- return;
- }
- }
- %container = new GuiControl(){
- profile = "ToolsGuiDefaultProfile";
- Position = "0 0";
- Extent = "128 18";
- HorizSizing = "right";
- VertSizing = "bottom";
- isContainer = "1";
-
- new GuiCheckBoxCtrl(){
- Profile = "ToolsGuiCheckBoxListProfile";
- position = "5 1";
- Extent = "118 18";
- Command = "";
- groupNum = "0";
- buttonType = "ToggleButton";
- text = %filter @ " ( " @ MaterialFilterAllArray.countKey(%filter) @ " )";
- filter = %filter;
- Command = "AssetBrowser.preloadFilter();";
- };
- };
- AssetBrowser-->filterArray.add( %container );
-
- // if selection exists, lets reselect it to refresh it
- if( isObject(AssetBrowser.selectedMaterial) )
- AssetBrowser.updateSelection( AssetBrowser.selectedMaterial, AssetBrowser.selectedPreviewImagePath );
-
- // material category text field to blank
- AssetBrowser_addFilterWindow-->tagName.setText("");
+ AssetBrowser.refresh();
}
function AssetBrowser::updateSelection( %this, %asset, %moduleName )
@@ -765,26 +487,6 @@ function AssetBrowser::updateSelection( %this, %asset, %moduleName )
%this.prevSelectedMaterialHL = %asset;
}
-function AssetBrowser::collapseTree(%this)
-{
- %modulesList = ModuleDatabase.findModules(true);
-
- for(%i=0; %i < getWordCount(%modulesList); %i++)
- {
- %moduleName = getWord(%modulesList, %i).ModuleId;
-
- %moduleGroup = getWord(%modulesList, %i).Group;
- if((%moduleGroup $= "Core" || %moduleGroup $= "Tools") && !%this.coreModulesFilter)
- continue;
-
- %moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
-
- AssetBrowser-->filterTree.expandItem(%moduleItemId, false);
- }
-
- AssetBrowser-->filterTree.expandItem(1, true);
-}
-
//
//needs to be deleted with the persistence manager and needs to be blanked out of the matmanager
//also need to update instances... i guess which is the tricky part....
@@ -893,7 +595,7 @@ function AssetBrowser::toggleTagFilterPopup(%this)
%moduleItemId = AssetBrowser-->filterTree.findItemByName(%moduleName);
if(%moduleItemId == -1 || %moduleItemId == 0)
- %moduleItemId = AssetBrowser-->filterTree.insertItem(1, %module.moduleId, "", "", 1, 1);
+ %moduleItemId = AssetBrowser-->filterTree.insertItem(1, %module.moduleId, "", "", 1, 2);
//now, add the asset's category
%assetType = AssetDatabase.getAssetCategory(%assetId);
@@ -1015,7 +717,10 @@ function AssetPreviewButton::onRightClick(%this)
if(%assetType $= "LevelAsset")
EditLevelAssetPopup.showPopup(Canvas);
else if(%assetType $= "Folder")
+ {
+ EditFolderPopup.dirPath = %this.getParent().assetPath;
EditFolderPopup.showPopup(Canvas);
+ }
else
EditAssetPopup.showPopup(Canvas);
@@ -1050,6 +755,7 @@ function AssetBrowserFilterTree::onRightMouseDown(%this, %itemId)
else
{
EditFolderPopup.showPopup(Canvas);
+ EditFolderPopup.assetType = "Folder";
}
}
else if(%itemId == 1)
@@ -1126,14 +832,14 @@ function AssetBrowserFilterTree::onSelect(%this, %itemId)
%breadcrumbPath = %this.getItemText(%itemId);
if(%breadcrumbPath $= "")
- %breadcrumbPath = AssetBrowser.currentAddress;
+ %breadcrumbPath = AssetBrowser.dirHandler.currentAddress;
AssetBrowser.navigateTo(%breadcrumbPath);
}
function AssetBrowser::rebuildAssetArray(%this)
{
- %breadcrumbPath = AssetBrowser.currentAddress;
+ %breadcrumbPath = AssetBrowser.dirHandler.currentAddress;
// we have to empty out the list; so when we create new guicontrols, these dont linger
AssetBrowser-->assetList.deleteAllObjects();
@@ -1329,7 +1035,7 @@ function AssetBrowserFolderSearchFilter::onReturn( %this )
if( %text $= "" )
%this.reset();
- AssetBrowser.loadFilters();
+ AssetBrowser.refresh();
}
function AssetBrowserSearchFilter::onReturn( %this )
@@ -1345,7 +1051,7 @@ function AssetBrowserFolderSearchFilter::reset( %this )
{
%this.setText( "Search Folders..." );
- AssetBrowser.loadFilters();
+ AssetBrowser.refresh();
}
function AssetBrowserSearchFilter::reset( %this )
@@ -1364,15 +1070,64 @@ function AssetBrowser_ClearAssetFilterBtn::onClick( %this )
{
AssetBrowserSearchFilter.reset();
}
+
//
//
// Navigation
function AssetBrowser::navigateTo(%this, %address, %historyNav)
{
//Don't bother navigating if it's to the place we already are
- if(AssetBrowser.currentAddress $= %address)
- return;
+ if(AssetBrowser.dirHandler.currentAddress !$= %address)
+ {
+ AssetBrowser.dirHandler.navigateTo(%address, %historyNav);
+
+ %this.updateNavigationBreadcrumb(%address);
+ %module = AssetBrowser.dirHandler.getModuleFromAddress(%address);
+ if(%module !$= "")
+ {
+ //legit module, so set it as current target
+ AssetBrowser.SelectedModule = %module.moduleId;
+ }
+ }
+
+ %this.rebuildAssetArray();
+}
+
+function AssetBrowser::navigateHistoryForward(%this)
+{
+ %this.dirHandler.navigateHistoryForward();
+
+ %this.updateNavigationBreadcrumb();
+
+ %module = AssetBrowser.dirHandler.getModuleFromAddress(%address);
+ if(%module !$= "")
+ {
+ //legit module, so set it as current target
+ AssetBrowser.SelectedModule = %module.moduleId;
+ }
+
+ %this.rebuildAssetArray();
+}
+
+function AssetBrowser::navigateHistoryBack(%this)
+{
+ %this.dirHandler.navigateHistoryBack();
+
+ %this.updateNavigationBreadcrumb();
+
+ %module = AssetBrowser.dirHandler.getModuleFromAddress(%address);
+ if(%module !$= "")
+ {
+ //legit module, so set it as current target
+ AssetBrowser.SelectedModule = %module.moduleId;
+ }
+
+ %this.rebuildAssetArray();
+}
+
+function AssetBrowser::updateNavigationBreadcrumb(%this, %address)
+{
//clear the breadcrumb bar
AssetBrowser_BreadcrumbBar.clear();
@@ -1411,80 +1166,24 @@ function AssetBrowser::navigateTo(%this, %address, %historyNav)
}
}
- //find our folder tree and action on it tree
- %folderId = AssetBrowser.getFolderTreeItemFromAddress(%address);
-
- %oldAddress = AssetBrowser.currentAddress;
- AssetBrowser.currentAddress = %address;
- AssetBrowser.selectedItem = %folderId;
-
- AssetBrowser-->filterTree.clearSelection();
- AssetBrowser-->filterTree.selectItem(%folderId);
-
- //remove any history records that are 'newer' than this one
- if(%historyNav $= "")
- {
- AssetBrowser_NavForeHistoryList.empty();
-
- if(%oldAddress !$= "")
- AssetBrowser_NavPrevHistoryList.push_front(%oldAddress);
- }
-
//refresh the nav buttons to display the history
%backButtonHistory = "";
- for(%i=0; %i < AssetBrowser_NavPrevHistoryList.Count(); %i++)
+ for(%i=0; %i < AssetBrowser.dirHandler.prevHistoryList.Count(); %i++)
{
- %prevAddress = AssetBrowser_NavPrevHistoryList.getKey(%i);
+ %prevAddress = AssetBrowser.dirHandler.prevHistoryList.getKey(%i);
%backButtonHistory = %i==0 ? %prevAddress @ "\n" : %backButtonHistory @ %prevAddress @ "\n";
}
AssetBrowser_NavigateBackBtn.tooltip = %backButtonHistory;
%foreButtonHistory = "";
- for(%i=0; %i < AssetBrowser_NavForeHistoryList.Count(); %i++)
+ for(%i=0; %i < AssetBrowser.dirHandler.foreHistoryList.Count(); %i++)
{
- %prevAddress = AssetBrowser_NavForeHistoryList.getKey(%i);
+ %prevAddress = AssetBrowser.dirHandler.foreHistoryList.getKey(%i);
%foreButtonHistory = %i==0 ? %prevAddress @ "\n" : %foreButtonHistory @ %prevAddress @ "\n";
}
AssetBrowser_NavigateForwardBtn.tooltip = %foreButtonHistory;
-
- %module = AssetBrowser.getModuleFromAddress(%address);
- if(%module !$= "")
- {
- //legit module, so set it as current target
- AssetBrowser.SelectedModule = %module.moduleId;
- }
-
- %this.rebuildAssetArray();
-}
-
-function AssetBrowser::navigateHistoryForward(%this)
-{
- if(AssetBrowser_NavForeHistoryList.count() == 0)
- return;
-
- %newAddress = AssetBrowser_NavForeHistoryList.getKey(0);
- %prevHistory = AssetBrowser.currentAddress;
-
- AssetBrowser_NavPrevHistoryList.push_front(%prevHistory);
- AssetBrowser_NavForeHistoryList.pop_front();
-
- %this.navigateTo(%newAddress, true);
-}
-
-function AssetBrowser::navigateHistoryBack(%this)
-{
- if(AssetBrowser_NavPrevHistoryList.count() == 0)
- return;
-
- %newAddress = AssetBrowser_NavPrevHistoryList.getKey(0);
- %foreHistory = AssetBrowser.currentAddress;
-
- AssetBrowser_NavForeHistoryList.push_front(%foreHistory);
- AssetBrowser_NavPrevHistoryList.pop_front();
-
- %this.navigateTo(%newAddress, true);
}
//
@@ -1519,88 +1218,6 @@ function AssetBrowser::reloadModules(%this)
//ModuleDatabase.loadGroup("Game");
}
-function AssetBrowser::getModuleFromAddress(%this, %address)
-{
- //break down the address
- %folderCount = getTokenCount(%address, "/");
-
- for(%f=0; %f < %folderCount; %f++)
- {
- %folderName = getToken(%address, "/", %f);
-
- %module = ModuleDatabase.findModule(%folderName);
- if(%module !$= "")
- return %module;
- }
-
- return "";
-}
-
-//AssetBrowser.getFolderTreeItemFromAddress(AssetBrowser.currentAddress);
-function AssetBrowser::getFolderTreeItemFromAddress(%this, %address)
-{
- //break down the address
- %folderCount = getTokenCount(%address, "/");
-
- %curItem = 0;
- %rebuiltPath = "";
- for(%f=0; %f < %folderCount; %f++)
- {
- %folderName = getToken(%address, "/", %f);
- %curItem = AssetBrowser-->filterTree.findChildItemByName(%curItem, %folderName);
- }
-
- return %curItem;
-}
-
-function AssetBrowser::expandTreeToAddress(%this, %address)
-{
- //break down the address
- %folderCount = getTokenCount(%address, "/");
- AssetBrowser-->filterTree.expandItem(0);
-
- %curItem = 0;
- %rebuiltPath = "";
- for(%f=0; %f < %folderCount; %f++)
- {
- %folderName = getToken(%address, "/", %f);
- %curItem = AssetBrowser-->filterTree.findChildItemByName(%curItem, %folderName);
- AssetBrowser-->filterTree.expandItem(%curItem);
- }
-}
-//
-//
-//
-function AssetBrowser::createNewFolder(%this)
-{
- %newFolderIdx = "";
- %matched = true;
- %newFolderPath = "";
- while(%matched == true)
- {
- %newFolderPath = AssetBrowser.currentAddress @ "/NewFolder" @ %newFolderIdx;
- if(!isDirectory(%newFolderPath))
- {
- %matched = false;
- }
- else
- {
- %newFolderIdx++;
- }
- }
-
- //make a dummy file
- %file = new FileObject();
- %file.openForWrite(%newFolderPath @ "/test");
- %file.close();
-
- fileDelete(%newFolderPath @ "/test");
-
- //refresh the directory
- %this.loadFilters();
- %this.rebuildAssetArray();
-}
-
//
//
//
@@ -1749,7 +1366,14 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
%module = %payload.dragSourceControl.parentGroup.moduleName;
%asset = %payload.dragSourceControl.parentGroup.assetName;
- if(%assetType $= "ImageAsset")
+ if(AssetBrowser.isMethod("on" @ %assetType @ "EditorDropped"))
+ {
+ %assetDef = AssetDatabase.acquireAsset(%module @ ":" @ %asset);
+ %buildCommand = AssetBrowser @ ".on" @ %assetType @ "EditorDropped(" @ %assetDef @ ",\"" @ %position @ "\");";
+ eval(%buildCommand);
+ }
+
+ /*if(%assetType $= "ImageAsset")
{
echo("WorldEditor::onControlDropped - dropped an ImageAsset onto the editor window. Todo: Implement dropping image/material into scene");
}
@@ -1766,7 +1390,7 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
%newEntity.dirtyGameObject = true; //because if we're specifically setting the mesh asset, it's dirty*/
- %newEntity = new TSStatic()
+ /*%newEntity = new TSStatic()
{
position = %pos;
shapeAsset = %module @ ":" @ %asset;
@@ -1820,7 +1444,7 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
EWorldEditor.clearSelection();
EWorldEditor.selectObject(%newEntity);
- }
+ }*/
EWorldEditor.isDirty = true;
}
@@ -1850,7 +1474,7 @@ function AssetBrowserFilterTree::onControlDropped( %this, %payload, %position )
%path = %this.getItemValue(%item) @ "/" @ %this.getItemText(%item);
echo("DROPPED IT ON PATH " @ %path);
- if(%path !$= AssetBrowser.CurrentAddress)
+ if(%path !$= AssetBrowser.dirHandler.CurrentAddress)
{
//we're trying to move the asset to a different module!
MessageBoxYesNo( "Move Asset", "Do you wish to move asset " @ %assetName @ " to " @ %path @ "?",
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs
index 83fff992e..2d6408ddc 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs
@@ -203,10 +203,10 @@ function AssetBrowser::onEndDropFiles( %this )
MessageBoxOK( "Warning", "No base import config. Please create an import configuration set to simplify asset importing.");
}
}
-//
-//
-//
+//
+//
+//
function AssetBrowser::reloadImportingFiles(%this)
{
//Effectively, we re-import the files we were trying to originally. We'd only usually do this in the event we change our import config
@@ -423,6 +423,17 @@ function ImportAssetWindow::onWake(%this)
{
%this.assetValidationList = new ArrayObject();
}
+
+ AssetImportCtrl-->NewAssetsTree.buildIconTable( ":tools/classIcons/TSStatic:tools/classIcons/TSStatic" @
+ ":tools/classIcons/material:tools/classIcons/material"@
+ ":tools/classIcons/GuiBitmapCtrl:tools/classIcons/GuiBitmapCtrl"@
+ ":tools/classIcons/SFXEmitter:tools/classIcons/SFXEmitter"@
+ ":tools/gui/images/iconWarn:tools/gui/images/iconWarn"@
+ ":tools/gui/images/iconError:tools/gui/images/iconError");
+
+ AssetImportTargetAddress.text = AssetBrowser.dirHandler.currentAddress;
+ AssetImportTargetModule.text = AssetBrowser.dirHandler.getModuleFromAddress(AssetBrowser.dirHandler.currentAddress).ModuleId;
+ ImportAssetConfigList.setSelected(0);
}
function ImportAssetWindow::reloadImportOptionConfigs(%this)
@@ -466,69 +477,15 @@ function ImportAssetWindow::reloadImportOptionConfigs(%this)
if(%importConfigIdx $= "")
%importConfigIdx = 0;
- ImportAssetConfigList.setSelected(%importConfigIdx);
+ //ImportAssetConfigList.setSelected(%importConfigIdx);
}
-function ImportAssetWindow::setImportOptions(%this, %configName)
+//
+function assetImportUpdatePath(%newPath)
{
- //Todo, editor + load from files for preconfigs
-
- //General
- %optionsObj.treatWarningsAsErrors = false;
- %optionsObj.ignoreDuplicateAssets = false;
-
- //Meshes
- %optionsObj.ImportMesh = true;
- %optionsObj.UpAxisOverride = "Z_AXIS";
- %optionsObj.OverrideScale = 1.0;
- %optionsObj.IgnoreNodeScale = false;
- %optionsObj.AdjustCenter = false;
- %optionsObj.AdjustFloor = false;
- %optionsObj.CollapseSubmeshes = false;
- %optionsObj.LODType = "TrailingNumber";
- %optionsObj.TrailingNumber = 2;
- %optionsObj.ImportedNodes = "";
- %optionsObj.IgnoreNodes = "";
- %optionsObj.ImportMeshes = "";
- %optionsObj.IgnoreMeshes = "";
-
- //Materials
- %optionsObj.ImportMaterials = true;
- %optionsObj.CreateComposites = true;
-
- //Animations
- %optionsObj.ImportAnimations = true;
- %optionsObj.SeparateAnimations = true;
- %optionsObj.SeparateAnimationPrefix = "";
-
- //Collision
- %optionsObj.GenerateCollisions = true;
- %optionsObj.GenCollisionType = "CollisionMesh";
- %optionsObj.CollisionMeshPrefix = "Collision";
- %optionsObj.GenerateLOSCollisions = true;
- %optionsObj.GenLOSCollisionType = "CollisionMesh";
- %optionsObj.LOSCollisionMeshPrefix = "LOS";
-
- //Images
- %optionsObj.ImageType = "Diffuse";
- %optionsObj.DiffuseTypeSuffixes = "_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL";
- %optionsObj.NormalTypeSuffixes = "_NORMAL,_NORM";
- %optionsObj.SpecularTypeSuffixes = "_SPECULAR,_SPEC";
- %optionsObj.MetalnessTypeSuffixes = "_METAL,_MET,_METALNESS,_METALLIC";
- %optionsObj.RoughnessTypeSuffixes = "_ROUGH,_ROUGHNESS";
- %optionsObj.SmoothnessTypeSuffixes = "_SMOOTH,_SMOOTHNESS";
- %optionsObj.AOTypeSuffixes = "_AO,_AMBIENT,_AMBIENTOCCLUSION";
- %optionsObj.CompositeTypeSuffixes = "_COMP,_COMPOSITE";
- %optionsObj.TextureFilteringMode = "Bilinear";
- %optionsObj.UseMips = true;
- %optionsObj.IsHDR = false;
- %optionsObj.Scaling = 1.0;
- %optionsObj.Compressed = true;
-
- //Sounds
- %optionsObj.VolumeAdjust = 1.0;
- %optionsObj.PitchAdjust = 1.0;
- %optionsObj.Compressed = false;
+ AssetBrowser.navigateTo(%newPath);
+ AssetImportTargetAddress.text = %newPath;
+ AssetImportTargetModule.text = AssetBrowser.dirHandler.getModuleFromAddress(AssetBrowser.dirHandler.currentAddress).ModuleId;
}
//
@@ -818,11 +775,15 @@ function ImportAssetWindow::refresh(%this)
%this.processNewImportAssets(%id);
- %this.indentCount = 0;
+ %this.ImportingAssets = 0;
+ %this.FetchedAssets = 0;
+ %this.prunedDuplicateAssets = 0;
+ %this.autoRenamedAssets = 0;
%this.validateAssets();
- ImportingAssetList.clear();
+ AssetImportCtrl-->NewAssetsTree.clear();
+ AssetImportCtrl-->NewAssetsTree.insertItem(0, "Importing Assets");
if(AssetBrowser.importAssetUnprocessedListArray.count() == 0)
{
@@ -838,6 +799,31 @@ function ImportAssetWindow::refresh(%this)
//Continue processing
%this.refresh();
}
+
+ AssetImportCtrl-->NewAssetsTree.buildVisibleTree(true);
+
+ %ImportActionSummary = "";
+
+ if(%this.ImportingAssets != 0)
+ {
+ %ImportActionSummary = %ImportActionSummary SPC %this.ImportingAssets @ " Imported|";
+ }
+ if(%this.FetchedAssets != 0)
+ {
+ %ImportActionSummary = %ImportActionSummary SPC %this.FetchedAssets @ " Fetched|";
+ }
+ if(%this.prunedDuplicateAssets != 0)
+ {
+ %ImportActionSummary = %ImportActionSummary SPC %this.prunedDuplicateAssets @ " Duplicates Pruned|";
+ }
+ if(%this.autoRenamedAssets != 0)
+ {
+ %ImportActionSummary = %ImportActionSummary SPC %this.autoRenamedAssets @ " Auto Renamed|";
+ }
+
+ warn(%ImportActionSummary);
+
+ AssetImportSummarization.Text = %ImportActionSummary;
}
function ImportAssetWindow::refreshChildItem(%this, %id)
@@ -859,43 +845,35 @@ function ImportAssetWindow::refreshChildItem(%this, %id)
//Once validated, attempt any fixes for issues
%this.resolveIssue(%assetItem);
- //Make sure we size correctly
- ImportingAssetList.extent.x = ImportingAssetList.getParent().extent.x - 15;
-
//create!
- %width = mRound(mRound(ImportingAssetList.extent.x) / 2);
- %height = 20;
- %indent = %this.indentCount * 16;
%toolTip = "";
-
- %iconPath = "tools/gui/images/iconInformation";
%configCommand = "ImportAssetOptionsWindow.editImportSettings(" @ %assetItem @ ");";
if(%assetType $= "Model" || %assetType $= "Animation" || %assetType $= "Image" || %assetType $= "Sound")
{
if(%assetItem.status $= "Error")
{
- %iconPath = "tools/gui/images/iconError";
+ %iconIdx = 11;
}
else if(%assetItem.status $= "Warning")
{
- %iconPath = "tools/gui/images/iconWarn";
+ %iconIdx = 9;
}
%configCommand = "ImportAssetOptionsWindow.fixIssues(" @ %assetItem @ ");";
- if(%assetItem.statusType $= "DuplicateAsset" || %assetItem.statusType $= "DuplicateImportAsset")
- %assetName = %assetItem.assetName @ " ";
+ if(%assetItem.statusType $= "DuplicateAsset" || %assetItem.statusType $= "DuplicateImportAsset")
+ %assetName = %assetItem.assetName @ " ";
}
else
{
if(%assetItem.status $= "Error")
{
- %iconPath = "tools/gui/images/iconError";
+ %iconIdx = 11;
}
else if(%assetItem.status $= "Warning")
{
- %iconPath = "tools/gui/images/iconWarn";
+ %iconIdx = 9;
}
%configCommand = "";//"ImportAssetOptionsWindow.fixIssues(" @ %assetItem @ ");";
@@ -905,128 +883,26 @@ function ImportAssetWindow::refreshChildItem(%this, %id)
}
%toolTip = %assetItem.statusInfo;
+ %parentItem = ImportAssetTree.getParentItem(%id);
- %inputCellPos = %indent;
- %inputCellWidth = (ImportingAssetList.extent.x * 0.3) - %indent;
-
- %filePathBtnPos = %inputCellPos + %inputCellWidth - %height;
-
- %assetNameCellPos = %inputCellPos + %inputCellWidth;
- %assetNameCellWidth = ImportingAssetList.extent.x * 0.3;
-
- %assetTypeCellPos = %assetNameCellPos + %assetNameCellWidth;
- %assetTypeCellWidth = ImportingAssetList.extent.x * 0.3;
-
- %configBtnPos = %assetTypeCellPos + %assetTypeCellWidth - (%height * 2);
- %configBtnWidth = %height;
-
- %delBtnPos = %assetTypeCellPos + %assetTypeCellWidth - %height;
- %delBtnWidth = %height;
-
- %inputField = %filePath;
-
- //Check if it's a generated type, like materials
- %inputPathProfile = ToolsGuiTextEditProfile;
- %generatedField = false;
- if(%assetItem.generatedAsset)
+ if(%assetItem.status $= "")
{
- %generatedField = true;
- %inputField = "(Generated)";
- }
- else
- {
- //nope, so check that it's a valid file path. If not, flag it as such
- if(%assetItem.status $= "Error")
- {
- if(!isFile(%filePath))
- {
- %inputField = "File not found!";
- %inputPathProfile = ToolsGuiTextEditErrorProfile;
- }
- }
+ if(%assetType $= "Model")
+ %iconIdx = 1;
+ else if(%assetType $= "Material")
+ %iconIdx = 3;
+ else if(%assetType $= "Image")
+ %iconIdx = 5;
+ else if(%assetType $= "Sound")
+ %iconIdx = 7;
}
+
+ AssetImportCtrl-->NewAssetsTree.insertItem(%parentItem, %assetName, %assetItem, "", %iconIdx, %iconIdx+1);
- %importEntry = new GuiControl()
- {
- position = "0 0";
- extent = ImportingAssetList.extent.x SPC %height;
- horzSizing = "width";
- vertSizing = "bottom";
-
- new GuiTextEditCtrl()
- {
- Text = %inputField;
- position = %inputCellPos SPC "0";
- extent = %inputCellWidth SPC %height;
- internalName = "InputPath";
- active = false;
- profile = %inputPathProfile;
- horzSizing = "width";
- vertSizing = "bottom";
- };
-
- new GuiButtonCtrl()
- {
- position = %filePathBtnPos SPC "0";
- extent = %height SPC %height;
- command = "ImportAssetWindow.findMissingFile(" @ %assetItem @ ");";
- text = "...";
- internalName = "InputPathButton";
- tooltip = %toolTip;
- visible = !%generatedField;
- horzSizing = "width";
- vertSizing = "bottom";
- };
-
- new GuiTextEditCtrl()
- {
- Text = %assetName;
- position = %assetNameCellPos SPC "0";
- extent = %assetNameCellWidth SPC %height;
- internalName = "AssetName";
- horzSizing = "width";
- vertSizing = "bottom";
- };
-
- new GuiTextEditCtrl()
- {
- Text = %assetType;
- position = %assetTypeCellPos SPC "0";
- extent = %assetTypeCellWidth SPC %height;
- active = false;
- internalName = "AssetType";
- horzSizing = "width";
- vertSizing = "bottom";
- };
-
- new GuiBitmapButtonCtrl()
- {
- position = %configBtnPos SPC "0";
- extent = %height SPC %height;
- command = "ImportAssetWindow.importResolution(" @ %assetItem @ ");";
- bitmap = %iconPath;
- tooltip = %toolTip;
- horzSizing = "width";
- vertSizing = "bottom";
- };
- new GuiBitmapButtonCtrl()
- {
- position = %delBtnPos SPC "0";
- extent = %height SPC %height;
- command = "ImportAssetWindow.deleteImportingAsset(" @ %assetItem @ ");";
- bitmap = "tools/gui/images/iconDelete";
- horzSizing = "width";
- vertSizing = "bottom";
- };
- };
-
- ImportingAssetList.add(%importEntry);
AssetBrowser.importAssetFinalListArray.add(%assetItem);
if(ImportAssetTree.isParentItem(%id))
{
- %this.indentCount++;
-
%childItem = ImportAssetTree.getChild(%id);
//recurse!
@@ -1035,11 +911,123 @@ function ImportAssetWindow::refreshChildItem(%this, %id)
%id = ImportAssetTree.getNextSibling(%id);
}
-
- %this.indentCount--;
}
-//
+//
+function NewAssetsViewTree::onSelect(%this, %itemId)
+{
+ if(%itemId == 1)
+ //can't select root
+ return;
+
+ %assetItem = %this.getItemValue(%itemId);
+
+ AssetImportCtrl-->NewAssetsInspector.clearFields();
+
+ AssetImportCtrl-->NewAssetsInspector.startGroup("General");
+ AssetImportCtrl-->NewAssetsInspector.addField("assetName", "Asset Name", "string", "", %assetItem.assetName, "", %assetItem);
+ AssetImportCtrl-->NewAssetsInspector.addField("assetType", "Asset Type", "string", "", %assetItem.assetType, "", %assetItem);
+
+ if(!%assetItem.generatedAsset)
+ AssetImportCtrl-->NewAssetsInspector.addField("filePath", "File Path", "fileName", "", %assetItem.filePath, "", %assetItem);
+
+ //AssetImportCtrl-->NewAssetsInspector.addField("assetName", "Asset Name", "string", "", %assetItem.assetName, "", %assetItem);
+ //AssetImportCtrl-->NewAssetsInspector.addField("assetName", "Asset Name", "string", "", %assetItem.assetName, "", %assetItem);
+
+ AssetImportCtrl-->NewAssetsInspector.addField("status", "Status", "string", "", %assetItem.status, "", %assetItem);
+ AssetImportCtrl-->NewAssetsInspector.endGroup();
+
+ AssetImportCtrl-->NewAssetsInspector.setFieldEnabled("assetType", false);
+ //AssetImportCtrl-->NewAssetsInspector.setFieldEnabled("status", false);
+
+ /*moduleName = %moduleName;
+ dirty = true;
+ parentAssetItem = %parentAssetItem;
+ status = "";
+ statusType = "";
+ statusInfo = "";
+ skip = false;
+ processed = false;
+ generatedAsset = false;*/
+}
+
+function NewAssetsViewTree::onRightMouseDown(%this, %itemId)
+{
+ ImportAssetActions.enableItem(1, true);
+
+ if( %itemId != 1 && %itemId != -1)
+ {
+ ImportAssetActions.showPopup(Canvas);
+ ImportAssetActions.assetItem = %this.getItemValue(%itemId);
+ ImportAssetActions.itemId = %itemId;
+ }
+ else
+ {
+ ImportAssetActions.enableItem(1, false);
+ ImportAssetActions.showPopup(Canvas);
+ }
+}
+
+function NewAssetsPanelInputs::onRightMouseDown(%this)
+{
+ NewAssetsViewTree::onRightMouseDown(0, -1);
+}
+
+//
+function ImportAssetWindow::removeImportingAsset(%this)
+{
+ ImportAssetTree.removeAllChildren(ImportAssetActions.itemId);
+ ImportAssetTree.removeItem(ImportAssetActions.itemId);
+
+ ImportAssetWindow.refresh();
+}
+
+function ImportAssetWindow::addNewImportingAsset(%this)
+{
+ %dlg = new OpenFileDialog()
+ {
+ Filters = "Shape Files(*.dae, *.cached.dts)|*.dae;*.cached.dts|Images Files(*.jpg,*.png,*.tga,*.bmp,*.dds)|*.jpg;*.png;*.tga;*.bmp;*.dds|Any Files (*.*)|*.*|";
+ DefaultFile = "";
+ ChangePath = false;
+ MustExist = true;
+ MultipleFiles = false;
+ forceRelativePath = false;
+ };
+
+ if ( %dlg.Execute() )
+ {
+ %filePath = %dlg.FileName;
+ }
+
+ %dlg.delete();
+
+ //AssetBrowser.onDropFile( %path );
+
+ %fileExt = fileExt( %filePath );
+ //add it to our array!
+ if(isImageFormat(%fileExt))
+ %type = "Image";
+ else if( isShapeFormat(%fileExt))
+ %type = "Model";
+ else if( isSoundFormat(%fileExt))
+ %type = "Sound";
+ else if( %fileExt $= ".cs" || %fileExt $= ".cs.dso" )
+ %type = "Script";
+ else if( %fileExt $= ".gui" || %fileExt $= ".gui.dso" )
+ %type = "GUI";
+
+ AssetBrowser.addImportingAsset(%type, %filePath, ImportAssetActions.assetItem);
+
+ //Used to keep tabs on what files we were trying to import, used mainly in the event of
+ //adjusting configs and needing to completely reprocess the import
+ //ensure we're not doubling-up on files by accident
+ if(%this.importingFilesArray.getIndexFromKey(%filePath) == -1)
+ %this.importingFilesArray.add(%filePath);
+
+ AssetBrowser.onEndDropFiles();
+}
+
+//
function ImportAssetWindow::importResolution(%this, %assetItem)
{
if(%assetItem.status !$= "Error" && %assetItem.status !$= "Warning")
@@ -1086,8 +1074,7 @@ function ImportAssetWindow::validateAssets(%this)
function ImportAssetWindow::validateAsset(%this, %id)
{
-
- %moduleName = ImportAssetModuleList.getText();
+ %moduleName = AssetImportTargetModule.getText();
while (%id > 0)
{
@@ -1201,7 +1188,7 @@ function ImportAssetWindow::resetAssetsValidationStatus(%this)
function ImportAssetWindow::resetAssetValidationStatus(%this, %id)
{
- %moduleName = ImportAssetModuleList.getText();
+ %moduleName = AssetImportTargetModule.getText();
%id = ImportAssetTree.getChild(%id);
while (%id > 0)
@@ -1239,7 +1226,7 @@ function ImportAssetWindow::checkAssetsForCollision(%this, %assetItem)
function ImportAssetWindow::checkAssetForCollision(%this, %assetItem, %id)
{
- %moduleName = ImportAssetModuleList.getText();
+ %moduleName = AssetImportTargetModule.getText();
%id = ImportAssetTree.getChild(%id);
while (%id > 0)
@@ -1288,7 +1275,7 @@ function ImportAssetWindow::deleteImportingAsset(%this, %assetItem)
schedule(10, 0, "refreshImportAssetWindow");
//ImportAssetWindow.refresh();
- ImportAssetOptionsWindow.setVisible(0);
+ //ImportAssetOptionsWindow.setVisible(0);
}
//
@@ -1298,7 +1285,7 @@ function ImportAssetWindow::ImportAssets(%this)
%assetCount = AssetBrowser.importAssetFinalListArray.count();
//get the selected module data
- %moduleName = ImportAssetModuleList.getText();
+ %moduleName = AssetImportTargetModule.getText();
%module = ModuleDatabase.findModule(%moduleName, 1);
@@ -1313,8 +1300,7 @@ function ImportAssetWindow::ImportAssets(%this)
%this.doImportAssets(%id);
//force an update of any and all modules so we have an up-to-date asset list
- AssetBrowser.loadFilters();
- AssetBrowser.refreshPreviews();
+ AssetBrowser.refresh();
Canvas.popDialog(AssetImportCtrl);
AssetBrowser.isAssetReImport = false;
}
@@ -1486,6 +1472,7 @@ function ImportAssetWindow::resolveIssue(%this, %assetItem)
if(%resolutionAction $= "AutoPrune")
{
%this.deleteImportingAsset(%assetItem);
+ %this.prunedDuplicateAssets++;
}
else if(%resolutionAction $= "AutoRename")
{
@@ -1501,6 +1488,8 @@ function ImportAssetWindow::resolveIssue(%this, %assetItem)
%num++;
%assetItem.assetName = %noNum @ %num;
}
+
+ %this.autoRenamedAssets++;
}
}
else if(%assetItem.statusType $= "MissingFile")
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.cs
new file mode 100644
index 000000000..b4a5d4453
--- /dev/null
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.cs
@@ -0,0 +1,203 @@
+function AssetImportConfigEditor::onWake(%this)
+{
+ %this.refresh();
+}
+
+function AssetImportConfigEditor::refresh(%this)
+{
+ AssetImportConfigList.clear();
+
+ ImportAssetWindow.reloadImportOptionConfigs();
+ setupImportConfigSettingsList();
+
+ for(%i=0; %i < ImportAssetWindow.importConfigsList.count(); %i++)
+ {
+ %configName = ImportAssetWindow.importConfigsList.getKey(%i);
+ AssetImportConfigList.addRow(%i, %configName);
+ }
+
+ if(ESettingsWindow.isAwake())
+ ESettingsWindow.refresh();
+
+ if(AssetImportCtrl.isAwake())
+ ImportAssetConfigList.setSelected(0);
+}
+
+function AssetImportConfigList::onSelect( %this, %id, %text )
+{
+ ImportOptionsConfigList.clearFields();
+ ImportOptionsConfigList.setAutoUpdate(false); //we don't want to be updating every time we add a field in here
+
+ %this.currentConfig = %text;
+
+ %this.populateConfigListByGroup("General");
+ %this.populateConfigListByGroup("Meshes");
+ %this.populateConfigListByGroup("Materials");
+ //%this.populateConfigListByGroup("Animations");
+ //%this.populateConfigListByGroup("Images");
+ //%this.populateConfigListByGroup("Collision");
+ //%this.populateConfigListByGroup("Sound");
+
+ ImportOptionsConfigList.update();
+}
+
+function AssetImportConfigList::populateConfigListByGroup(%this, %groupName)
+{
+ AssetImportConfigEditorInspector.startGroup(%groupName);
+ for(%i=0; %i < ImportAssetConfigSettingsList.count(); %i++)
+ {
+ %settingName = getField(ImportAssetConfigSettingsList.getKey(%i),0);
+ if(startsWith(%settingName, %groupName@"/"))
+ {
+ %labelName = getField(ImportAssetConfigSettingsList.getKey(%i), 1);
+ %type = getField(ImportAssetConfigSettingsList.getKey(%i), 2);
+ %tooltip = getField(ImportAssetConfigSettingsList.getKey(%i), 3);
+
+ %defaultValue = getField(ImportAssetConfigSettingsList.getValue(%i), 0);
+ %dataValues = getField(ImportAssetConfigSettingsList.getValue(%i), 1);
+ AssetImportConfigEditorInspector.addSettingsField(%settingName, %labelName, %type, %tooltip, %defaultValue, %dataValues);
+ }
+ }
+ AssetImportConfigEditorInspector.endGroup();
+}
+
+function AssetImportConfigEditorInspector::addSettingsField(%this, %settingsFieldName, %labelText, %fieldType, %tooltip, %fieldValue, %fieldData)
+{
+ %moddedSettingsFieldName = strreplace(%settingsFieldName, "/", "-");
+
+ %configGroup = AssetImportConfigList.currentConfig;
+
+ %value = AssetImportSettings.value(%configGroup @ "/" @ %settingsFieldName);
+ if(%value $= "")
+ %value = %fieldValue;
+
+ //%this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", %value, %fieldData, %this @ ".changeEditorSetting");
+ %this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", %value, %fieldData, "changeEditorSetting");
+}
+
+function AssetImportConfigEditorInspector::changeEditorSetting(%this, %varName, %value)
+{
+ %varName = strreplace(%varName, "-", "/");
+
+ echo("Set " @ %varName @ " to be " @ %value);
+
+ %configGroup = AssetImportConfigList.currentConfig;
+
+ %oldValue = AssetImportSettings.value(%configGroup @ "/" @ %varName, %value);
+
+ AssetImportSettings.setValue(%configGroup @ "/" @ %varName, %value);
+
+ if(%oldValue !$= %value)
+ {
+ %scollPos = ImportAssetConfigEditorScroll.getScrollPosition();
+ ImportAssetConfigEditorWindow.populateConfigList(ImportAssetWindow.activeImportConfig);
+ ImportAssetConfigEditorScroll.setScrollPosition(%scollPos.x, %scollPos.y);
+ }
+}
+
+function AssetImportConfigEditorInspector::setDefaultValuesByGroup(%this, %groupName)
+{
+ %configList = ImportAssetConfigSettingsList;
+
+ for(%i=0; %i < %configList.count(); %i++)
+ {
+ %settingName = getField(%configList.getKey(%i),0);
+ if(startsWith(%settingName, %groupName @ "/"))
+ {
+ %defaultValue = getField(%configList.getValue(%i), 0);
+ AssetImportSettings.setValue(%settingName, %defaultValue);
+ }
+ }
+}
+
+function AssetImportConfigEditorInspector::ToggleImportMesh(%this, %fieldName, %newValue, %ownerObject)
+{
+ %this.setFieldEnabled("DoUpAxisOverride", %newValue);
+ %this.setFieldEnabled("UpAxisOverride", %newValue);
+ %this.setFieldEnabled("DoScaleOverride", %newValue);
+ %this.setFieldEnabled("ScaleOverride", %newValue);
+ %this.setFieldEnabled("IgnoreNodeScale", %newValue);
+ %this.setFieldEnabled("AdjustCenter", %newValue);
+ %this.setFieldEnabled("AdjustFloor", %newValue);
+ %this.setFieldEnabled("CollapseSubmeshes", %newValue);
+ %this.setFieldEnabled("LODType", %newValue);
+ %this.setFieldEnabled("ImportedNodes", %newValue);
+ %this.setFieldEnabled("IgnoreNodes", %newValue);
+ %this.setFieldEnabled("ImportMeshes", %newValue);
+ %this.setFieldEnabled("IgnoreMeshes", %newValue);
+}
+
+function AssetImportConfigEditor::addNewConfig(%this)
+{
+ //Ensure our list is set up
+ setupImportConfigSettingsList();
+
+ ImportAssetNewConfigEditorWindow.setVisible(1);
+ ImportAssetNewConfigEditorWindow.selectWindow();
+}
+
+function AssetImportConfigEditor::createNewImportConfig(%this)
+{
+ %configName = AssetImportNewConfigName.getText();
+ %configList = ImportAssetConfigSettingsList;
+
+ AssetImportSettings.beginGroup(%configName);
+
+ AssetImportConfigEditorInspector.setDefaultValuesByGroup("General");
+ AssetImportConfigEditorInspector.setDefaultValuesByGroup("Meshes");
+ AssetImportConfigEditorInspector.setDefaultValuesByGroup("Materials");
+ AssetImportConfigEditorInspector.setDefaultValuesByGroup("Animations");
+ AssetImportConfigEditorInspector.setDefaultValuesByGroup("Collision");
+ AssetImportConfigEditorInspector.setDefaultValuesByGroup("Images");
+ AssetImportConfigEditorInspector.setDefaultValuesByGroup("Sounds");
+
+ AssetImportSettings.endGroup();
+
+ %success = AssetImportSettings.write();
+
+ ImportAssetNewConfigEditorWindow.setVisible(0);
+
+ %this.refresh();
+}
+
+function AssetImportConfigEditor::deleteConfig(%this)
+{
+ %callback = "AssetImportConfigEditor.onDeleteConfig();";
+ MessageBoxOKCancel("Delete Import Config", "This will delete the " @ AssetImportConfigList.currentConfig @ " config. Continue?", %callback, "");
+}
+
+function AssetImportConfigEditor::onDeleteConfig(%this)
+{
+ %configGroup = AssetImportConfigList.currentConfig;
+
+ AssetImportConfigEditorInspector.removeSettingsByGroup("General");
+ AssetImportConfigEditorInspector.removeSettingsByGroup("Meshes");
+ AssetImportConfigEditorInspector.removeSettingsByGroup("Materials");
+ AssetImportConfigEditorInspector.removeSettingsByGroup("Animations");
+ AssetImportConfigEditorInspector.removeSettingsByGroup("Collision");
+ AssetImportConfigEditorInspector.removeSettingsByGroup("Images");
+ AssetImportConfigEditorInspector.removeSettingsByGroup("Sounds");
+}
+
+function AssetImportConfigEditorInspector::removeSettingsByGroup(%this, %groupName)
+{
+ %configList = ImportAssetConfigSettingsList;
+
+ %configGroup = AssetImportConfigList.currentConfig;
+
+ for(%i=0; %i < %configList.count(); %i++)
+ {
+ %settingName = getField(%configList.getKey(%i),0);
+ if(startsWith(%settingName, %groupName @ "/"))
+ {
+ %defaultValue = getField(%configList.getValue(%i), 0);
+
+ %targetSetting = %configGroup @ "/" @ %settingName;
+
+ AssetImportSettings.remove(%configGroup @ "/" @ %settingName);
+ }
+ }
+
+ %success = AssetImportSettings.write();
+ AssetImportConfigEditor.refresh();
+}
\ No newline at end of file
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.cs
index 56bc5ec06..c624850fc 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.cs
@@ -3,11 +3,13 @@ function AssetBrowser::createCppAsset(%this)
%moduleName = AssetBrowser.newAssetSettings.moduleName;
%modulePath = "data/" @ %moduleName;
- %assetName = AssetBrowser.newAssetSettings.assetName;
+ %assetName = AssetBrowser.newAssetSettings.assetName;
- %tamlpath = %modulePath @ "/source/" @ %assetName @ ".asset.taml";
- %codePath = %modulePath @ "/source/" @ %assetName @ ".cpp";
- %headerPath = %modulePath @ "/source/" @ %assetName @ ".h";
+ %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
+
+ %tamlpath = %assetPath @ %assetName @ ".asset.taml";
+ %codePath = %assetPath @ %assetName @ ".cpp";
+ %headerPath = %assetPath @ %assetName @ ".h";
//Do the work here
%assetType = AssetBrowser.newAssetSettings.assetType;
@@ -95,7 +97,7 @@ function AssetBrowser::createCppAsset(%this)
}
//Last, check that we have a C++ Module definition. If not, make one so anything important can be initialized on startup there
- %cppModuleFilePath = %modulePath @ "/source/" @ %moduleName @ ".cpp";
+ %cppModuleFilePath = %modulePath @ "/" @ %moduleName @ ".cpp";
if(!isFile(%cppModuleFilePath))
{
%file = new FileObject();
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.cs
index a684ec371..124384545 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.cs
@@ -1,3 +1,45 @@
+function AssetBrowser::createNewFolder(%this)
+{
+ AssetBrowser_newFolderNameTxt.text = "NewFolder";
+ Canvas.pushDialog(AssetBrowser_newFolder);
+}
+
+function AssetBrowser::doCreateNewFolder(%this)
+{
+ %newFolderName = AssetBrowser_newFolderNameTxt.getText();
+
+ if(%newFolderName $= "")
+ %newFolderName = "NewFolder";
+
+ %newFolderIdx = "";
+ %matched = true;
+ %newFolderPath = "";
+ while(%matched == true)
+ {
+ %newFolderPath = AssetBrowser.dirHandler.currentAddress @ "/" @ %newFolderName @ %newFolderIdx;
+ if(!isDirectory(%newFolderPath))
+ {
+ %matched = false;
+ }
+ else
+ {
+ %newFolderIdx++;
+ }
+ }
+
+ //make a dummy file
+ %file = new FileObject();
+ %file.openForWrite(%newFolderPath @ "/test");
+ %file.close();
+
+ fileDelete(%newFolderPath @ "/test");
+
+ //refresh the directory
+ AssetBrowser.loadDirectories();
+
+ %this.navigateTo(%newFolderPath);
+}
+
function AssetBrowser::buildFolderPreview(%this, %assetDef, %previewData)
{
%previewData.assetName = %assetDef.assetName;
@@ -26,7 +68,7 @@ function AssetBrowser::renameFolder(%this, %folderPath, %newFolderName)
//so, we nix any assets active for the module, do the delete action on the old folder, and then re-acquire our assets.
//This will have the added benefit of updating paths for asset items
- %module = AssetBrowser.getModuleFromAddress(AssetBrowser.currentAddress);
+ %module = AssetBrowser.getModuleFromAddress(AssetBrowser.dirHandler.currentAddress);
%moduleId = %module.ModuleId;
AssetDatabase.removeDeclaredAssets(%moduleId);
@@ -41,7 +83,7 @@ function AssetBrowser::deleteFolder(%this, %folderPath)
{
doDeleteFolder(%folderPath);
- %this.loadFilters();
+ %this.loadDirectories();
}
function doDeleteFolder(%folderPath)
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.cs
index d6c7dbdc6..a014e3aae 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.cs
@@ -5,7 +5,7 @@ function AssetBrowser::createGUIAsset(%this)
%assetName = AssetBrowser.newAssetSettings.assetName;
- %assetPath = AssetBrowser.currentAddress @ "/";
+ %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml";
%guipath = %assetPath @ %assetName @ ".gui";
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs
index 26616ab5d..438d5e22b 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs
@@ -109,7 +109,7 @@ function AssetBrowser::prepareImportImageAsset(%this, %assetItem)
function AssetBrowser::importImageAsset(%this, %assetItem)
{
- %moduleName = ImportAssetModuleList.getText();
+ %moduleName = AssetImportTargetModule.getText();
%assetType = %assetItem.AssetType;
%filePath = %assetItem.filePath;
@@ -117,7 +117,7 @@ function AssetBrowser::importImageAsset(%this, %assetItem)
%assetImportSuccessful = false;
%assetId = %moduleName@":"@%assetName;
- %assetPath = AssetBrowser.currentAddress @ "/";
+ %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%assetFullPath = %assetPath @ "/" @ fileName(%filePath);
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.cs
index 4ea263cf6..446708529 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.cs
@@ -5,7 +5,7 @@ function AssetBrowser::createLevelAsset(%this)
%assetName = AssetBrowser.newAssetSettings.assetName;
- %assetPath = AssetBrowser.currentAddress @ "/";
+ %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml";
%levelPath = %assetPath @ %assetName @ ".mis";
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs
index 05947e6e9..aebf07a64 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs
@@ -5,7 +5,7 @@ function AssetBrowser::createMaterialAsset(%this)
%moduleName = AssetBrowser.newAssetSettings.moduleName;
%modulePath = "data/" @ %moduleName;
- %assetPath = AssetBrowser.currentAddress @ "/";
+ %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml";
%sgfPath = %assetPath @ %assetName @ ".sgf";
@@ -234,7 +234,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
%assetItem.AOImageAsset.skip = true;
%assetItem.metalnessImageAsset.skip = true;
- %compositeAssetPath = AssetBrowser.currentAddress @ "/";
+ %compositeAssetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%saveAsPath = %compositeAssetPath @ "/" @ %assetItem.assetName @ "_composite.png";
%compositeAsset = AssetBrowser.addImportingAsset("Image", "", %assetItem, %assetItem.assetName @ "_composite");
%compositeAsset.generatedAsset = true;
@@ -279,7 +279,7 @@ function AssetBrowser::findMaterialMapFileWSuffix(%this, %fileDir, %filename, %f
function AssetBrowser::importMaterialAsset(%this, %assetItem)
{
- %moduleName = ImportAssetModuleList.getText();
+ %moduleName = AssetImportTargetModule.getText();
%assetType = %assetItem.AssetType;
%filePath = %assetItem.filePath;
@@ -287,7 +287,7 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem)
%assetImportSuccessful = false;
%assetId = %moduleName@":"@%assetName;
- %assetPath = AssetBrowser.currentAddress @ "/";
+ %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml";
%sgfPath = %assetPath @ %assetName @ ".sgf";
%scriptPath = %assetPath @ %assetName @ ".cs";
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.cs
index c6cf48e09..bee3ddaf2 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.cs
@@ -5,7 +5,7 @@ function AssetBrowser::createScriptAsset(%this)
%assetName = AssetBrowser.newAssetSettings.assetName;
- %assetPath = AssetBrowser.currentAddress @ "/";
+ %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml";
%scriptPath = %assetPath @ %assetName @ ".cs";
@@ -21,13 +21,6 @@ function AssetBrowser::createScriptAsset(%this)
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
-
- AssetBrowser.loadFilters();
-
- %treeItemId = AssetBrowserFilterTree.findItemByName(%moduleName);
- %smItem = AssetBrowserFilterTree.findChildItemByName(%treeItemId, "ScriptAsset");
-
- AssetBrowserFilterTree.onSelect(%smItem);
%file = new FileObject();
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs
index 6a03a1c83..a31069a63 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs
@@ -5,7 +5,7 @@ function AssetBrowser::createShapeAsset(%this)
%assetName = AssetBrowser.newAssetSettings.assetName;
- %assetPath = AssetBrowser.currentAddress @ "/";
+ %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml";
%shapeFilePath = %assetPath @ %assetName @ ".dae";
@@ -42,6 +42,11 @@ function AssetBrowser::editShapeAsset(%this, %assetDef)
ShapeEditorPlugin.openShapeAsset(%assetDef);
}
+function AssetBrowser::deleteShapeAsset(%this, %assetDef)
+{
+
+}
+
function AssetBrowser::prepareImportShapeAsset(%this, %assetItem)
{
%fileExt = fileExt(%assetItem.filePath);
@@ -166,7 +171,7 @@ function AssetBrowser::prepareImportShapeAsset(%this, %assetItem)
function AssetBrowser::importShapeAsset(%this, %assetItem)
{
- %moduleName = ImportAssetModuleList.getText();
+ %moduleName = AssetImportTargetModule.getText();
%assetType = %assetItem.AssetType;
%filePath = %assetItem.filePath;
@@ -174,7 +179,7 @@ function AssetBrowser::importShapeAsset(%this, %assetItem)
%assetImportSuccessful = false;
%assetId = %moduleName@":"@%assetName;
- %assetPath = AssetBrowser.currentAddress @ "/";
+ %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%assetFullPath = %assetPath @ fileName(%filePath);
%newAsset = new ShapeAsset()
@@ -309,6 +314,28 @@ function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData)
%previewData.tooltip = %assetDef.friendlyName @ "\n" @ %assetDef;
}
+function AssetBrowser::onShapeAssetEditorDropped(%this, %assetDef, %position)
+{
+ //echo("DROPPED A SHAPE ON THE EDITOR WINDOW!");
+
+ %assetId = %assetDef.getAssetId();
+
+ %pos = EWCreatorWindow.getCreateObjectPosition();
+
+ %newStatic = new TSStatic()
+ {
+ position = %pos;
+ shapeAsset = %assetId;
+ };
+
+ getScene(0).add(%newStatic);
+
+ EWorldEditor.clearSelection();
+ EWorldEditor.selectObject(%newStatic);
+
+ EWorldEditor.isDirty = true;
+}
+
function GuiInspectorTypeShapeAssetPtr::onControlDropped( %this, %payload, %position )
{
Canvas.popDialog(EditorDragAndDropLayer);
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs
index 1fca1943d..e608410ff 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.cs
@@ -6,7 +6,7 @@ function AssetBrowser::createTerrainAsset(%this)
%assetName = AssetBrowser.newAssetSettings.assetName;
%assetType = AssetBrowser.newAssetSettings.assetType;
- %assetPath = AssetBrowser.currentAddress @ "/";
+ %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml";
%terPath = %assetPath @ %assetName @ ".ter";
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs
index 5e249d59a..302480b57 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.cs
@@ -6,7 +6,7 @@ function AssetBrowser::createTerrainMaterialAsset(%this)
%assetName = AssetBrowser.newAssetSettings.assetName;
%assetType = AssetBrowser.newAssetSettings.assetType;
- %assetPath = AssetBrowser.currentAddress @ "/";
+ %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml";
%scriptPath = %assetPath @ %assetName @ ".cs";
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.cs
new file mode 100644
index 000000000..e6d8a6fb1
--- /dev/null
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.cs
@@ -0,0 +1,207 @@
+function makedirectoryHandler(%targetTree, %folderExclusionList, %searchFilter)
+{
+ %newHandler = new ScriptObject()
+ {
+ class = "directoryHandler";
+ };
+
+ %newHandler.currentAddress = "";
+ %newHandler.treeCtrl = %targetTree;
+ %newHandler.folderExclusionList = %folderExclusionList;
+ %newHandler.searchFilter = %searchFilter;
+
+ %newHandler.prevHistoryList = new ArrayObject();
+ %newHandler.foreHistoryList = new ArrayObject();
+
+ return %newHandler;
+}
+
+function directoryHandler::loadFolders(%this, %path, %parentId)
+{
+ //utilize home dir project setting here
+ %paths = getDirectoryList(%path);
+ for(%i=0; %i < getFieldCount(%paths); %i++)
+ {
+ %childPath = getField(%paths, %i);
+
+ %folderCount = getTokenCount(%childPath, "/");
+
+ for(%f=0; %f < %folderCount; %f++)
+ {
+ %folderName = getToken(%childPath, "/", %f);
+
+ //we don't need to display the shadercache folder
+ if(%parentId == 1 && (%folderName $= "shaderCache" || %folderName $= "cache"))
+ continue;
+
+ %iconIdx = 3;
+
+ if(ModuleDatabase.findModule(%folderName) !$= "")
+ %iconIdx = 1;
+
+ %searchFoldersText = %this.searchFilter;
+ if(%searchFoldersText !$= "Search Folders...")
+ {
+ if(strstr(strlwr(%folderName), strlwr(%searchFoldersText)) != -1)
+ {
+ %folderID = %this.treeCtrl.insertItem(%parentId, %folderName, %path, "", %iconIdx, %iconIdx+1);
+
+ %this.loadFolders(%path @ "/" @ %folderName, %folderID);
+ }
+ }
+ else
+ {
+ %folderID = %this.treeCtrl.insertItem(%parentId, %folderName, %path, "", %iconIdx, %iconIdx);
+
+ %this.loadFolders(%path @ "/" @ %folderName, %folderID);
+ }
+ }
+ }
+}
+
+function directoryHandler::navigateTo(%this, %address, %historyNav, %selectionNav)
+{
+ //Don't bother navigating if it's to the place we already are
+ if(%this.currentAddress $= %address)
+ return;
+
+ //clear the breadcrumb bar
+ AssetBrowser_BreadcrumbBar.clear();
+
+ //break down the address
+ %folderCount = getTokenCount(%address, "/");
+
+ /*%rebuiltPath = "";
+ for(%f=0; %f < %folderCount; %f++)
+ {
+ %folderName = getToken(%address, "/", %f);
+
+ %rebuiltPath = %f == 0 ? %folderName : %rebuiltPath @ "/" @ %folderName;
+
+ %folderNavButton = new GuiButtonCtrl()
+ {
+ profile = ToolsGuiButtonProfile;
+ text = %folderName;
+ command = "AssetBrowser.navigateTo(\"" @ %rebuiltPath @ "\");";
+ extent = "100" SPC AssetBrowser_BreadcrumbBar.extent.y;
+ };
+
+ AssetBrowser_BreadcrumbBar.add(%folderNavButton);
+
+ if(%f != %folderCount-1)
+ {
+ %folderSpacerButton = new GuiBitmapButtonCtrl()
+ {
+ profile = ToolsGuiButtonProfile;
+ bitmap = "tools/gui/images/rightArrowWhite";
+ bitmapMode = "Centered";
+ extent = "25" SPC AssetBrowser_BreadcrumbBar.extent.y;
+ //command = "AssetBrowser.navigateTo(\"" @ %rebuiltPath @ "\");";
+ };
+
+ AssetBrowser_BreadcrumbBar.add(%folderSpacerButton);
+ }
+ }*/
+
+ //find our folder tree and action on it tree
+ %folderId = %this.getFolderTreeItemFromAddress(%address);
+
+ %this.oldAddress = %this.currentAddress;
+ %this.currentAddress = %address;
+ %this.selectedItem = %folderId;
+
+ //This lets us update the tree selection if we didn't get here because of that
+ if(%selectionNav $= "")
+ {
+ %this.treeCtrl.clearSelection();
+ %this.treeCtrl.selectItem(%folderId);
+ }
+
+ //remove any history records that are 'newer' than this one
+ if(%historyNav $= "")
+ {
+ %this.foreHistoryList.empty();
+
+ if(%oldAddress !$= "")
+ %this.prevHistoryList.push_front(%this.oldAddress);
+ }
+
+ %this.treeCtrl.buildVisibleTree(true);
+}
+
+function directoryHandler::navigateHistoryForward(%this)
+{
+ if(%this.foreHistoryList.count() == 0)
+ return;
+
+ %newAddress = %this.foreHistoryList.getKey(0);
+ %prevHistory = %this.currentAddress;
+
+ %this.prevHistoryList.push_front(%prevHistory);
+ %this.foreHistoryList.pop_front();
+
+ %this.navigateTo(%newAddress, true);
+}
+
+function directoryHandler::navigateHistoryBack(%this)
+{
+ if(%this.prevHistoryList.count() == 0)
+ return;
+
+ %newAddress = %this.prevHistoryList.getKey(0);
+ %foreHistory = %this.currentAddress;
+
+ %this.foreHistoryList.push_front(%foreHistory);
+ %this.prevHistoryList.pop_front();
+
+ %this.navigateTo(%newAddress, true);
+}
+
+function directoryHandler::getModuleFromAddress(%this, %address)
+{
+ //break down the address
+ %folderCount = getTokenCount(%address, "/");
+
+ for(%f=0; %f < %folderCount; %f++)
+ {
+ %folderName = getToken(%address, "/", %f);
+
+ %module = ModuleDatabase.findModule(%folderName);
+ if(%module !$= "")
+ return %module;
+ }
+
+ return "";
+}
+
+function directoryHandler::getFolderTreeItemFromAddress(%this, %address)
+{
+ //break down the address
+ %folderCount = getTokenCount(%address, "/");
+
+ %curItem = 0;
+ %rebuiltPath = "";
+ for(%f=0; %f < %folderCount; %f++)
+ {
+ %folderName = getToken(%address, "/", %f);
+ %curItem = %this.treeCtrl.findChildItemByName(%curItem, %folderName);
+ }
+
+ return %curItem;
+}
+
+function directoryHandler::expandTreeToAddress(%this, %address)
+{
+ //break down the address
+ %folderCount = getTokenCount(%address, "/");
+ %this.treeCtrl.expandItem(0);
+
+ %curItem = 0;
+ %rebuiltPath = "";
+ for(%f=0; %f < %folderCount; %f++)
+ {
+ %folderName = getToken(%address, "/", %f);
+ %curItem = %this.treeCtrl.findChildItemByName(%curItem, %folderName);
+ %this.treeCtrl.expandItem(%curItem);
+ }
+}
\ No newline at end of file
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.cs
index 9128b75af..1203696d1 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.cs
@@ -68,7 +68,7 @@ function AssetBrowser::refreshAsset(%this, %assetId)
}
AssetDatabase.refreshAsset(%assetId);
- AssetBrowser.refreshPreviews();
+ %this.refresh();
}
//------------------------------------------------------------
@@ -129,7 +129,7 @@ function AssetBrowser::performRenameAsset(%this, %originalAssetName, %newName)
}
//Make sure everything is refreshed
- AssetBrowser.loadFilters();
+ %this.refresh();
//Update the selection to immediately jump to the new asset
AssetBrowser-->filterTree.clearSelection();
@@ -173,6 +173,8 @@ function AssetBrowser::moveAsset(%this, %assetId, %destination)
eval(%this @ ".move" @ %assetType @ "(" @ %assetDef @ ",\"" @ %destination @ "\");");
}
}
+
+ %this.refresh();
}
//------------------------------------------------------------
@@ -212,30 +214,30 @@ function AssetBrowser::confirmDeleteAsset(%this)
%currentSelectedItem = AssetBrowserFilterTree.getSelectedItem();
%currentItemParent = AssetBrowserFilterTree.getParentItem(%currentSelectedItem);
- if(EditAssetPopup.assetType $= "Folder")
+ if(EditFolderPopup.visible)
{
- //Do any cleanup required given the type
+ if(EditFolderPopup.dirPath !$= "")
+ %folderPath = EditFolderPopup.dirPath;
+ else
+ %folderPath = AssetBrowserFilterTree.getItemValue(%currentSelectedItem) @ "/" @ AssetBrowserFilterTree.getItemText(%currentSelectedItem);
+
if(%this.isMethod("deleteFolder"))
- eval(%this @ ".deleteFolder(\""@EditAssetPopup.assetId@"\");");
- }
+ eval(%this @ ".deleteFolder(\""@%folderPath@"\");");
+ }
else
{
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
%assetType = AssetDatabase.getAssetType(EditAssetPopup.assetType);
+ if(!isObject(%assetDef))
+ return;
+
//Do any cleanup required given the type
if(%this.isMethod("delete"@%assetType))
eval(%this @ ".delete"@%assetType@"("@%assetDef@");");
- AssetDatabase.deleteAsset(EditAssetPopup.assetId, false);
+ AssetDatabase.deleteAsset(EditAssetPopup.assetId, true, false);
}
- %this.loadFilters();
-
- if(!AssetBrowserFilterTree.selectItem(%currentSelectedItem))
- {
- //if it failed, that means we deleted the last item in that category, and we need to do the parent
- AssetBrowserFilterTree.selectItem(%currentItemParent);
- AssetBrowserFilterTree.expandItem(%currentItemParent);
- }
+ %this.refresh();
}
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/newAsset.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/newAsset.cs
index 602f6ce52..c6b78c3d7 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/newAsset.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/newAsset.cs
@@ -184,8 +184,6 @@ function CreateNewAsset()
%moduleDef = ModuleDatabase.findModule(%moduleName,1);
AssetDatabase.addDeclaredAsset(%moduleDef, %assetFilePath);
- AssetBrowser.loadFilters();
-
if(AssetBrowser_newAsset.callbackFunc !$= "")
{
%callbackCommand = "" @ AssetBrowser_newAsset.callbackFunc @ "(\"" @ %moduleName @ ":" @ %assetName @ "\");";
@@ -193,7 +191,7 @@ function CreateNewAsset()
}
//Update the selection to immediately jump to the new asset
- AssetBrowser-->filterTree.clearSelection();
+ /*AssetBrowser-->filterTree.clearSelection();
%ModuleItem = AssetBrowser-->filterTree.findItemByName(%moduleName);
%assetTypeId = AssetBrowser-->filterTree.findChildItemByName(%ModuleItem, %assetType);
@@ -202,7 +200,8 @@ function CreateNewAsset()
%selectedItem = AssetBrowser-->filterTree.getSelectedItem();
AssetBrowser-->filterTree.scrollVisibleByObjectId(%selectedItem);
- AssetBrowser-->filterTree.buildVisibleTree();
+ AssetBrowser-->filterTree.buildVisibleTree(); */
+ AssetBrowser.refresh();
}
function ParentComponentList::onWake(%this)
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs
index d76e20633..0232166ad 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs
@@ -340,6 +340,19 @@ function AssetBrowser::buildPopupMenus(%this)
};
}
+ //
+ //
+ if( !isObject( ImportAssetActions ) )
+ {
+ %this.ImportAssetActions = new PopupMenu( ImportAssetActions )
+ {
+ superClass = "MenuBuilder";
+ class = "EditorWorldMenu";
+
+ item[0] = "Add asset" TAB "" TAB "ImportAssetWindow.addNewImportingAsset();";
+ item[1] = "Remove asset" TAB "" TAB "ImportAssetWindow.removeImportingAsset();";
+ };
+ }
}
function AddNewScriptAssetPopupMenu::onSelectItem(%this, %id, %text)
diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/selectPath.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/selectPath.cs
new file mode 100644
index 000000000..943c5aa03
--- /dev/null
+++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/selectPath.cs
@@ -0,0 +1,47 @@
+function SelectAssetPath::onWake(%this)
+{
+}
+
+//SelectAssetPath.showDialog();
+function SelectAssetPath::showDialog(%this, %startingPath, %callback)
+{
+ if(!isObject(%this.dirHandler))
+ %this.dirHandler = makedirectoryHandler(SelectAssetPath-->folderTree, "Core,Tools,cache,shaderCache", "");
+
+ SelectAssetPath-->folderTree.clear();
+
+ SelectAssetPath-->folderTree.buildIconTable( ":tools/classIcons/Prefab:tools/classIcons/Prefab" @
+ ":tools/classIcons/SimSet:tools/classIcons/SimSet");
+
+ %this.dirHandler.currentPath = %startingPath;
+ %this.callback = %callback;
+
+ %dataItem = SelectAssetPath-->folderTree.insertItem(0, "Data");
+ %this.dirHandler.loadFolders("Data", %dataItem);
+
+ Canvas.pushDialog(SelectAssetPath);
+}
+
+function selectAssetPathTree::onSelect(%this, %itemId)
+{
+ if(%itemId == 1)
+ //can't select root
+ return;
+
+ SelectAssetPath.selectedTreeItem = %itemId;
+}
+
+
+function SelectAssetPath::selectPath(%this)
+{
+ //do callback
+ %selectedId = %this.selectedTreeItem;
+ %selectedPath = %this-->folderTree.getItemValue(%selectedId) @ "/" @ %this-->folderTree.getItemText(%selectedId);
+
+ if(%this.callback !$= "")
+ {
+ eval( "" @ %this.callback @ "(\"" @ %selectedPath @ "\");");
+ }
+
+ Canvas.popDialog(SelectAssetPath);
+}
\ No newline at end of file
diff --git a/Templates/BaseGame/game/tools/classIcons/material.png b/Templates/BaseGame/game/tools/classIcons/material.png
new file mode 100644
index 000000000..c8b2106c2
Binary files /dev/null and b/Templates/BaseGame/game/tools/classIcons/material.png differ
diff --git a/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs b/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs
index b3fa1f58e..188c7ed2c 100644
--- a/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs
+++ b/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs
@@ -459,6 +459,8 @@ function ESettingsWindow::getAssetEditingSettings(%this)
}
SettingsInspector.startGroup("Assets Importing");
+ SettingsInspector.addField("Edit Asset Configs", "Edit Asset Import Configs", "button", "Open Asset Import Config Editor", "", "Canvas.pushDialog(AssetImportConfigEditor);");
+ SettingsInspector.addSettingsField("Assets/AssetImporDefaultConfig", "Default Asset Import Config", "list", "", %formattedConfigList);
SettingsInspector.addSettingsField("Assets/AssetImporDefaultConfig", "Default Asset Import Config", "list", "", %formattedConfigList);
SettingsInspector.addSettingsField("Assets/AutoImport", "Automatically Import using default config", "bool", "If on, the asset importing process" @
"will attempt to automatically import any inbound assets"@
diff --git a/Templates/BaseGame/game/tools/gui/fieldTypes/buttonField.cs b/Templates/BaseGame/game/tools/gui/fieldTypes/buttonField.cs
new file mode 100644
index 000000000..c0a2392a2
--- /dev/null
+++ b/Templates/BaseGame/game/tools/gui/fieldTypes/buttonField.cs
@@ -0,0 +1,46 @@
+
+function GuiInspectorVariableGroup::buildButtonField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj)
+{
+ %extent = 200;
+
+ %fieldCtrl = %this.createInspectorField();
+
+ %extent = %this.stack.getExtent();
+
+ %width = mRound(%extent/2);
+ %height = 20;
+ %inset = 10;
+
+ %editControl = new GuiButtonCtrl() {
+ maxPopupHeight = "200";
+ sbUsesNAColor = "0";
+ reverseTextList = "0";
+ bitmapBounds = "16 16";
+ maxLength = "1024";
+ Margin = "0 0 0 0";
+ Padding = "0 0 0 0";
+ AnchorTop = "1";
+ AnchorBottom = "0";
+ AnchorLeft = "1";
+ AnchorRight = "0";
+ isContainer = "0";
+ Profile = "ToolsGuiButtonProfile";
+ HorizSizing = "right";
+ VertSizing = "bottom";
+ Position = %fieldCtrl.edit.position;
+ Extent = %fieldCtrl.edit.extent;
+ MinExtent = "8 2";
+ canSave = "1";
+ Visible = "1";
+ tooltipprofile = "ToolsGuiToolTipProfile";
+ tooltip = %tooltip;
+ text = %fieldName;
+ hovertime = "1000";
+ command = %fieldDataVals;
+ };
+
+ %fieldCtrl.setCaption(%fieldLabel);
+ %fieldCtrl.setEditControl(%editControl);
+
+ %this.addInspectorField(%fieldCtrl);
+}
\ No newline at end of file
diff --git a/Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs b/Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs
index c1e9fa5ac..9d2921e5e 100644
--- a/Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs
+++ b/Templates/BaseGame/game/tools/gui/guiDialogs.ed.cs
@@ -41,3 +41,4 @@ exec("./fieldTypes/assetDependencies.cs");
exec("./fieldTypes/fieldTypes.cs");
exec("./fieldTypes/listField.cs");
exec("./fieldTypes/moduleDependencies.cs");
+exec("./fieldTypes/buttonField.cs");
diff --git a/Templates/BaseGame/game/tools/gui/images/window.png b/Templates/BaseGame/game/tools/gui/images/window.png
index 9aff5d276..cc07494df 100644
Binary files a/Templates/BaseGame/game/tools/gui/images/window.png and b/Templates/BaseGame/game/tools/gui/images/window.png differ
diff --git a/Templates/BaseGame/game/tools/gui/postFxEditor.cs b/Templates/BaseGame/game/tools/gui/postFxEditor.cs
index f2e3f603b..aa2710a00 100644
--- a/Templates/BaseGame/game/tools/gui/postFxEditor.cs
+++ b/Templates/BaseGame/game/tools/gui/postFxEditor.cs
@@ -3,31 +3,22 @@ function PostFXEditor::onDialogPush( %this )
//Apply the settings to the controls
postVerbose("% - PostFX Editor - Loading GUI.");
- %this.initialOpen = true;
%this.refresh();
+
+ ESettingsWindowList.setSelectedById( 1 );
}
function PostFXEditor::refresh(%this)
{
- PostEffectEditorInspector.clearFields();
-
+ PostEffectEditorList.clear();
+
%count = PostFXManager.Count();
for(%i=0; %i < %count; %i++)
{
%postEffect = PostFXManager.getKey(%i);
- if(isObject(%postEffect) && %postEffect.isMethod("populatePostFXSettings"))
- {
- %postEffect.populatePostFXSettings();
- }
+ PostEffectEditorList.addRow( %i, %postEffect.getName() );
}
-
- //First time we open it this 'session', we'll go ahead and collapse the groups
- //so it's not too visually busy
- if(%this.initialOpen)
- PostEffectEditorInspector.setGroupsExpanded(false);
-
- %this.initialOpen = false;
}
function PostFXEditor::apply(%this)
@@ -47,4 +38,16 @@ function PostFXEditor::apply(%this)
function PostFXEditor::revert(%this)
{
PostFXManager::loadPresetHandler($PostFXManager::currentPreset);
+}
+
+function PostEffectEditorList::onSelect( %this, %id, %text )
+{
+ PostEffectEditorInspector.clearFields();
+
+ %postEffect = PostFXManager.getKey(%id);
+
+ if(isObject(%postEffect) && %postEffect.isMethod("populatePostFXSettings"))
+ {
+ %postEffect.populatePostFXSettings();
+ }
}
\ No newline at end of file
diff --git a/Templates/BaseGame/game/tools/gui/postFxEditor.gui b/Templates/BaseGame/game/tools/gui/postFxEditor.gui
index 5ee336536..e1eb8e179 100644
--- a/Templates/BaseGame/game/tools/gui/postFxEditor.gui
+++ b/Templates/BaseGame/game/tools/gui/postFxEditor.gui
@@ -14,21 +14,6 @@
canSave = "1";
canSaveDynamicFields = "1";
- new DbgFileView() {
- position = "0 0";
- extent = "8 2";
- minExtent = "8 2";
- horizSizing = "right";
- vertSizing = "bottom";
- profile = "GuiDefaultProfile";
- visible = "1";
- active = "1";
- tooltipProfile = "GuiToolTipProfile";
- hovertime = "1000";
- isContainer = "1";
- canSave = "1";
- canSaveDynamicFields = "0";
- };
new GuiWindowCtrl(ppOptionsWindow) {
text = "PostFX Editor";
resizeWidth = "1";
@@ -46,8 +31,8 @@
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
- position = "306 54";
- extent = "411 615";
+ position = "197 65";
+ extent = "642 615";
minExtent = "8 8";
horizSizing = "center";
vertSizing = "center";
@@ -60,27 +45,25 @@
canSave = "1";
canSaveDynamicFields = "0";
- new GuiScrollCtrl() {
- willFirstRespond = "1";
- hScrollBar = "dynamic";
- vScrollBar = "dynamic";
- lockHorizScroll = "0";
- lockVertScroll = "0";
- constantThumbHeight = "0";
- childMargin = "0 0";
- mouseWheelScrollSpeed = "-1";
+ new GuiSplitContainer() {
+ orientation = "Vertical";
+ splitterSize = "2";
+ splitPoint = "182 100";
+ fixedPanel = "None";
+ fixedSize = "100";
+ docking = "None";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
- position = "3 23";
- extent = "405 558";
- minExtent = "8 2";
+ position = "0 24";
+ extent = "642 562";
+ minExtent = "64 64";
horizSizing = "width";
vertSizing = "height";
- profile = "ToolsGuiScrollProfile";
+ profile = "ToolsGuiSolidDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
@@ -89,31 +72,158 @@
canSave = "1";
canSaveDynamicFields = "0";
- new GuiVariableInspector(PostEffectEditorInspector) {
- dividerMargin = "5";
- showCustomFields = "1";
- stackingType = "Vertical";
- horizStacking = "Left to Right";
- vertStacking = "Top to Bottom";
- padding = "1";
- dynamicSize = "1";
- dynamicNonStackExtent = "0";
- dynamicPos = "0";
- changeChildSizeToFit = "1";
- changeChildPosition = "1";
- position = "1 1";
- extent = "388 416";
+ new GuiPanel() {
+ docking = "Client";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "0 0";
+ extent = "180 562";
minExtent = "16 16";
- horizSizing = "width";
- vertSizing = "height";
- profile = "GuiDefaultProfile";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiSolidDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
+ internalName = "Panel1";
canSave = "1";
canSaveDynamicFields = "0";
+
+ new GuiScrollCtrl() {
+ willFirstRespond = "1";
+ hScrollBar = "alwaysOff";
+ vScrollBar = "dynamic";
+ lockHorizScroll = "0";
+ lockVertScroll = "0";
+ constantThumbHeight = "0";
+ childMargin = "0 0";
+ mouseWheelScrollSpeed = "-1";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "3 3";
+ extent = "177 643";
+ minExtent = "100 50";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiScrollProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiTextListCtrl(PostEffectEditorList) {
+ columns = "0";
+ fitParentWidth = "0";
+ clipColumnText = "0";
+ rowHeightPadding = "2";
+ position = "1 1";
+ extent = "9 2";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiListBoxProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "ToolsGuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "0";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ };
+ };
+ new GuiPanel() {
+ docking = "Client";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "184 0";
+ extent = "458 562";
+ minExtent = "16 16";
+ horizSizing = "right";
+ vertSizing = "bottom";
+ profile = "ToolsGuiSolidDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ internalName = "panel2";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiScrollCtrl() {
+ willFirstRespond = "1";
+ hScrollBar = "dynamic";
+ vScrollBar = "dynamic";
+ lockHorizScroll = "0";
+ lockVertScroll = "0";
+ constantThumbHeight = "0";
+ childMargin = "0 0";
+ mouseWheelScrollSpeed = "-1";
+ margin = "0 0 0 0";
+ padding = "0 0 0 0";
+ anchorTop = "1";
+ anchorBottom = "0";
+ anchorLeft = "1";
+ anchorRight = "0";
+ position = "0 0";
+ extent = "458 562";
+ minExtent = "8 2";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "ToolsGuiScrollProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+
+ new GuiVariableInspector(PostEffectEditorInspector) {
+ dividerMargin = "5";
+ showCustomFields = "1";
+ stackingType = "Vertical";
+ horizStacking = "Left to Right";
+ vertStacking = "Top to Bottom";
+ padding = "1";
+ dynamicSize = "1";
+ dynamicNonStackExtent = "0";
+ dynamicPos = "0";
+ changeChildSizeToFit = "1";
+ changeChildPosition = "1";
+ position = "1 1";
+ extent = "441 615";
+ minExtent = "16 16";
+ horizSizing = "width";
+ vertSizing = "height";
+ profile = "GuiDefaultProfile";
+ visible = "1";
+ active = "1";
+ tooltipProfile = "GuiToolTipProfile";
+ hovertime = "1000";
+ isContainer = "1";
+ canSave = "1";
+ canSaveDynamicFields = "0";
+ };
+ };
};
};
new GuiButtonCtrl(ppOptionsApply) {
@@ -121,7 +231,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- position = "309 587";
+ position = "547 588";
extent = "93 23";
minExtent = "8 8";
horizSizing = "right";
@@ -142,7 +252,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- position = "111 587";
+ position = "349 588";
extent = "93 23";
minExtent = "8 8";
horizSizing = "right";
@@ -163,7 +273,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- position = "12 587";
+ position = "250 588";
extent = "93 23";
minExtent = "8 8";
horizSizing = "right";
@@ -184,7 +294,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- position = "210 587";
+ position = "448 588";
extent = "93 23";
minExtent = "8 8";
horizSizing = "right";
diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs
index 2c57ce159..ac969bb91 100644
--- a/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs
+++ b/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs
@@ -350,7 +350,7 @@ function TerrainMaterialDlg::newMat( %this )
%module = AssetBrowser.getModuleFromAddress(%path);
AssetBrowser.selectedModule = %module.moduleID;
- AssetBrowser.currentAddress = "data/" @ %module.moduleID;
+ AssetBrowser.dirHandler.currentAddress = "data/" @ %module.moduleID;
AssetBrowser.setupCreateNewAsset("TerrainMaterialAsset", AssetBrowser.selectedModule);
}