diff --git a/Engine/source/T3D/assets/CubemapAsset.cpp b/Engine/source/T3D/assets/CubemapAsset.cpp index 8c132ea74..0ecb56f8d 100644 --- a/Engine/source/T3D/assets/CubemapAsset.cpp +++ b/Engine/source/T3D/assets/CubemapAsset.cpp @@ -199,7 +199,7 @@ GuiControl* GuiInspectorTypeCubemapAssetPtr::constructEditControl() // Change filespec char szBuffer[512]; dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"CubemapAsset\", \"AssetBrowser.changeAsset\", %d, %s);", - mInspector->getInspectObject(), mCaption); + mInspector->getIdString(), mCaption); mBrowseButton->setField("Command", szBuffer); setDataField(StringTable->insert("object"), NULL, String::ToString(mInspector->getInspectObject()).c_str()); diff --git a/Engine/source/T3D/assets/GUIAsset.cpp b/Engine/source/T3D/assets/GUIAsset.cpp index cacc3f9be..acef864db 100644 --- a/Engine/source/T3D/assets/GUIAsset.cpp +++ b/Engine/source/T3D/assets/GUIAsset.cpp @@ -257,7 +257,7 @@ GuiControl* GuiInspectorTypeGUIAssetPtr::constructEditControl() // Change filespec char szBuffer[512]; dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"GUIAsset\", \"AssetBrowser.changeAsset\", %d, %s);", - mInspector->getComponentGroupTargetId(), mCaption); + mInspector->getIdString(), mCaption); mBrowseButton->setField("Command", szBuffer); // Create "Open in ShapeEditor" button diff --git a/Engine/source/T3D/assets/ImageAsset.cpp b/Engine/source/T3D/assets/ImageAsset.cpp index af55747ca..2c5f9f341 100644 --- a/Engine/source/T3D/assets/ImageAsset.cpp +++ b/Engine/source/T3D/assets/ImageAsset.cpp @@ -480,7 +480,7 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl() // Change filespec char szBuffer[512]; dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ImageAsset\", \"AssetBrowser.changeAsset\", %s, %s);", - mInspector->getInspectObject()->getIdString(), mCaption); + mInspector->getIdString(), mCaption); mBrowseButton->setField("Command", szBuffer); setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString()); @@ -488,11 +488,9 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl() // Create "Open in ShapeEditor" button mImageEdButton = new GuiBitmapButtonCtrl(); - dSprintf(szBuffer, sizeof(szBuffer), "ShapeEditorPlugin.openShapeAssetId(%d.getText());", retCtrl->getId()); - mImageEdButton->setField("Command", szBuffer); - char bitmapName[512] = "ToolsModule:GameTSCtrl_image"; mImageEdButton->setBitmap(StringTable->insert(bitmapName)); + mImageEdButton->setHidden(true); mImageEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); mImageEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); diff --git a/Engine/source/T3D/assets/MaterialAsset.cpp b/Engine/source/T3D/assets/MaterialAsset.cpp index e51f9a709..f2197cf01 100644 --- a/Engine/source/T3D/assets/MaterialAsset.cpp +++ b/Engine/source/T3D/assets/MaterialAsset.cpp @@ -432,8 +432,8 @@ GuiControl* GuiInspectorTypeMaterialAssetPtr::constructEditControl() // Change filespec char szBuffer[512]; - dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"MaterialAsset\", \"AssetBrowser.changeAsset\", %s, \"\");", - getIdString()); + dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"MaterialAsset\", \"AssetBrowser.changeAsset\", %s, %s);", + mInspector->getIdString(), mCaption); mBrowseButton->setField("Command", szBuffer); setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString()); diff --git a/Engine/source/T3D/assets/ParticleAsset.cpp b/Engine/source/T3D/assets/ParticleAsset.cpp index 566611355..24005973e 100644 --- a/Engine/source/T3D/assets/ParticleAsset.cpp +++ b/Engine/source/T3D/assets/ParticleAsset.cpp @@ -151,7 +151,7 @@ GuiControl* GuiInspectorTypeParticleAssetPtr::constructEditControl() // Change filespec char szBuffer[512]; dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ParticleAsset\", \"AssetBrowser.changeAsset\", %d, %s);", - mInspector->getComponentGroupTargetId(), mCaption); + mInspector->getIdString(), mCaption); mBrowseButton->setField("Command", szBuffer); // Create "Open in ShapeEditor" button diff --git a/Engine/source/T3D/assets/ShapeAsset.cpp b/Engine/source/T3D/assets/ShapeAsset.cpp index 7a8628238..99becc8a6 100644 --- a/Engine/source/T3D/assets/ShapeAsset.cpp +++ b/Engine/source/T3D/assets/ShapeAsset.cpp @@ -49,6 +49,7 @@ #ifdef TORQUE_TOOLS #include "ts/tsLastDetail.h" #endif +#include "util/imposterCapture.h" StringTableEntry ShapeAsset::smNoShapeAssetFallback = NULL; @@ -599,8 +600,8 @@ GuiControl* GuiInspectorTypeShapeAssetPtr::constructEditControl() // Change filespec char szBuffer[512]; - dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ShapeAsset\", \"AssetBrowser.changeAsset\", %s, %s);", - mInspector->getInspectObject()->getIdString(), mCaption); + dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ShapeAsset\", \"AssetBrowser.changeAsset\", %s, %s);", + mInspector->getIdString(), mCaption); mBrowseButton->setField("Command", szBuffer); setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString()); diff --git a/Engine/source/T3D/assets/TerrainAsset.cpp b/Engine/source/T3D/assets/TerrainAsset.cpp index 70ce8786b..2887cea2d 100644 --- a/Engine/source/T3D/assets/TerrainAsset.cpp +++ b/Engine/source/T3D/assets/TerrainAsset.cpp @@ -465,7 +465,7 @@ GuiControl* GuiInspectorTypeTerrainAssetPtr::constructEditControl() // Change filespec char szBuffer[512]; dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"TerrainAsset\", \"AssetBrowser.changeAsset\", %s, %s);", - mInspector->getInspectObject()->getIdString(), mCaption); + mInspector->getIdString(), mCaption); mBrowseButton->setField("Command", szBuffer); setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString()); diff --git a/Engine/source/T3D/assets/TerrainMaterialAsset.cpp b/Engine/source/T3D/assets/TerrainMaterialAsset.cpp index b4d0c4214..ee5a36004 100644 --- a/Engine/source/T3D/assets/TerrainMaterialAsset.cpp +++ b/Engine/source/T3D/assets/TerrainMaterialAsset.cpp @@ -264,7 +264,7 @@ GuiControl* GuiInspectorTypeTerrainMaterialAssetPtr::constructEditControl() // Change filespec char szBuffer[512]; dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"TerrainMaterialAsset\", \"AssetBrowser.changeAsset\", %d, %s);", - mInspector->getComponentGroupTargetId(), mCaption); + mInspector->getIdString(), mCaption); mMatPreviewButton->setField("Command", szBuffer); mMatPreviewButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); diff --git a/Engine/source/T3D/assets/assetImporter.cpp b/Engine/source/T3D/assets/assetImporter.cpp index 2ceb677af..5d3d66180 100644 --- a/Engine/source/T3D/assets/assetImporter.cpp +++ b/Engine/source/T3D/assets/assetImporter.cpp @@ -1820,6 +1820,32 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem) } else { + //Check to see if our target module has a matching assetId for this slot already + String testAssetId = targetModuleId + ":" + assetItem->cleanAssetName + StringUnit::getUnit(suffixList.c_str(), i, ",;\t"); + bool localAssetFound = false; + + if (AssetDatabase.isDeclaredAsset(testAssetId.c_str())) + localAssetFound = true; + + if (localAssetFound == false) + //Didn't work, try checking the common default type suffix + testAssetId = targetModuleId + ":" + assetItem->cleanAssetName + StringUnit::getUnit(suffixList.c_str(), i, ",;\t") + activeImportConfig->AddedImageSuffix; + + if (localAssetFound) + { + //got a match! + ImageAsset* foundImageAsset = AssetDatabase.acquireAsset(testAssetId.c_str()); + imagePath = foundImageAsset->getImagePath(); + + AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, ""); + + newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t); + newImageAssetObj->importStatus = AssetImportObject::UseForDependencies; //we aren't going to actually IMPORT an already imported asset, + //so mark it as dependency use only + matchedImageTypes[t] = newImageAssetObj; + break; + } + if (materialImageNoSuffix.isNotEmpty()) { testPath = assetItem->filePath.getRootAndPath(); @@ -1837,6 +1863,32 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem) matchedImageTypes[t] = newImageAssetObj; break; } + + //Check to see if our target module has a matching assetId for this slot already based on our trimmed mat name + testAssetId = targetModuleId + ":" + materialImageNoSuffix + StringUnit::getUnit(suffixList.c_str(), i, ",;\t"); + bool localAssetFound = false; + + if (AssetDatabase.isDeclaredAsset(testAssetId.c_str())) + localAssetFound = true; + + if (localAssetFound == false) + //Didn't work, try checking the common default type suffix + testAssetId = targetModuleId + ":" + materialImageNoSuffix + StringUnit::getUnit(suffixList.c_str(), i, ",;\t") + activeImportConfig->AddedImageSuffix; + + if (localAssetFound) + { + //got a match! + ImageAsset* foundImageAsset = AssetDatabase.acquireAsset(testAssetId.c_str()); + imagePath = foundImageAsset->getImagePath(); + + AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, ""); + + newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t); + newImageAssetObj->importStatus = AssetImportObject::UseForDependencies; //we aren't going to actually IMPORT an already imported asset, + //so mark it as dependency use only + matchedImageTypes[t] = newImageAssetObj; + break; + } } } } @@ -2538,6 +2590,9 @@ void AssetImporter::importAssets(AssetImportObject* assetItem) { bool registerSuccess = AssetDatabase.addDeclaredAsset(moduleDef, assetPath.getFullPath().c_str()); + String assetIdStr = item->moduleName + ":" + item->assetName; + StringTableEntry assetId = StringTable->insert(assetIdStr.c_str()); + if (!registerSuccess) { dSprintf(importLogBuffer, sizeof(importLogBuffer), "AssetImporter::importAssets - Failed to successfully register new asset at path %s to moduleId %s", assetPath.getFullPath().c_str(), targetModuleId.c_str()); @@ -2548,9 +2603,6 @@ void AssetImporter::importAssets(AssetImportObject* assetItem) //Any special-case post-reg stuff here if (item->assetType == String("ShapeAsset")) { - String assetIdStr = item->moduleName + ":" + item->assetName; - StringTableEntry assetId = StringTable->insert(assetIdStr.c_str()); - //forcefully update it's shape constructor TSShapeConstructor* tss = TSShapeConstructor::findShapeConstructorByAssetId(assetId); @@ -2558,6 +2610,10 @@ void AssetImporter::importAssets(AssetImportObject* assetItem) tss->setShapeAssetId(assetId); } } + + //Go ahead and force the asset to load now just to kick it for immediate use + AssetBase* assetDef = AssetDatabase.acquireAsset(assetId); + AssetDatabase.releaseAsset(assetId); } else { diff --git a/Engine/source/T3D/assets/stateMachineAsset.cpp b/Engine/source/T3D/assets/stateMachineAsset.cpp index 888898bf3..c35b34d51 100644 --- a/Engine/source/T3D/assets/stateMachineAsset.cpp +++ b/Engine/source/T3D/assets/stateMachineAsset.cpp @@ -185,7 +185,7 @@ GuiControl* GuiInspectorTypeStateMachineAssetPtr::constructEditControl() // Change filespec char szBuffer[512]; dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"StateMachineAsset\", \"AssetBrowser.changeAsset\", %d, %s);", - mInspector->getComponentGroupTargetId(), mCaption); + mInspector->getIdString(), mCaption); mBrowseButton->setField("Command", szBuffer); // Create "Open in ShapeEditor" button diff --git a/Engine/source/T3D/tsStatic.cpp b/Engine/source/T3D/tsStatic.cpp index 8e090ef9f..dc3200f18 100644 --- a/Engine/source/T3D/tsStatic.cpp +++ b/Engine/source/T3D/tsStatic.cpp @@ -1086,15 +1086,16 @@ void TSStatic::unpackUpdate(NetConnection* con, BitStream* stream) stream->read(&mForceDetail); - if (stream->readFlag()) - mAnimOffset = stream->readFloat(7); + if (stream->readFlag()) + mAnimOffset = stream->readFloat(7); - if (stream->readFlag()) - mAnimSpeed = stream->readSignedFloat(7) * AnimSpeedMax; + if (stream->readFlag()) + mAnimSpeed = stream->readSignedFloat(7) * AnimSpeedMax; mPlayAmbient = stream->readFlag(); - + //update our shape, figuring that it likely changed + _createShape(); } mUseAlphaFade = stream->readFlag(); diff --git a/Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp b/Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp index 23c451fab..8e5e0fd76 100644 --- a/Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp +++ b/Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp @@ -232,32 +232,7 @@ void GuiBitmapButtonCtrl::inspectPostApply() { Parent::inspectPostApply(); - Torque::Path path( mBitmapName ); - const String& fileName = path.getFileName(); - - if( mUseStates ) - { - // If the filename points to a single state, automatically - // cut off the state part. Makes it easy to select files in - // the editor without having to go in and manually cut off the - // state parts all the time. - - static String s_n = "_n"; - static String s_d = "_d"; - static String s_h = "_h"; - static String s_i = "_i"; - - if( fileName.endsWith( s_n ) - || fileName.endsWith( s_d ) - || fileName.endsWith( s_h ) - || fileName.endsWith( s_i ) ) - { - path.setFileName( fileName.substr( 0, fileName.length() - 2 ) ); - path.setExtension( String::EmptyString ); - } - } - - setBitmap( StringTable->insert(path.getFullPath().c_str()) ); + setBitmap(getBitmap()); // if the extent is set to (0,0) in the gui editor and appy hit, this control will // set it's extent to be exactly the size of the normal bitmap (if present) diff --git a/Engine/source/gui/buttons/guiBitmapButtonCtrl.h b/Engine/source/gui/buttons/guiBitmapButtonCtrl.h index 1791c563a..000a77d0b 100644 --- a/Engine/source/gui/buttons/guiBitmapButtonCtrl.h +++ b/Engine/source/gui/buttons/guiBitmapButtonCtrl.h @@ -157,7 +157,10 @@ class GuiBitmapButtonCtrl : public GuiButtonCtrl /// @} - void onBitmapChange() {} + void onBitmapChange() + { + setBitmap(getBitmap()); + } public: diff --git a/Templates/BaseGame/game/core/console/guis/console.gui b/Templates/BaseGame/game/core/console/guis/console.gui index 3c5c217a6..daf013102 100644 --- a/Templates/BaseGame/game/core/console/guis/console.gui +++ b/Templates/BaseGame/game/core/console/guis/console.gui @@ -66,7 +66,7 @@ $guiContent = new GuiControl(ConsoleDlg) { canSaveDynamicFields = "0"; new GuiBitmapCtrl() { - bitmap = "data/ui/art/hudfill.png"; + bitmapAsset = "Core_GUI:hudFill"; color = "255 255 255 255"; wrap = "0"; position = "0 0"; diff --git a/Templates/BaseGame/game/core/console/scripts/profiles.tscript b/Templates/BaseGame/game/core/console/scripts/profiles.tscript index b83dd4fa7..fa358c3ca 100644 --- a/Templates/BaseGame/game/core/console/scripts/profiles.tscript +++ b/Templates/BaseGame/game/core/console/scripts/profiles.tscript @@ -50,11 +50,13 @@ new GuiControlProfile(GuiConsoleTextProfile) category = "Core"; }; +$ConsoleDefaultFillColor = "0 0 0 175"; + if(!isObject(ConsoleScrollProfile)) new GuiControlProfile(ConsoleScrollProfile : GuiScrollProfile) { opaque = true; - fillColor = "0 0 0 175"; + fillColor = $ConsoleDefaultFillColor; border = 1; //borderThickness = 0; borderColor = "0 0 0"; diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/Camera.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/Camera.asset.taml index bd49ffbb6..0f15637ff 100644 --- a/Templates/BaseGame/game/core/gameObjects/shapes/Camera.asset.taml +++ b/Templates/BaseGame/game/core/gameObjects/shapes/Camera.asset.taml @@ -1,6 +1 @@ - diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/Green.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/Green.asset.taml new file mode 100644 index 000000000..4eaaebab9 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/Green.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/images/camera.png b/Templates/BaseGame/game/core/gameObjects/shapes/camera.png similarity index 100% rename from Templates/BaseGame/game/core/gameObjects/images/camera.png rename to Templates/BaseGame/game/core/gameObjects/shapes/camera.png diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/camera.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/camera.tscript index 87d053808..6211dea72 100644 --- a/Templates/BaseGame/game/core/gameObjects/shapes/camera.tscript +++ b/Templates/BaseGame/game/core/gameObjects/shapes/camera.tscript @@ -1,5 +1,5 @@ -singleton TSShapeConstructor(cameradts) +singleton TSShapeConstructor(cameradts2) { baseShapeAsset = "Core_GameObjects:Camera"; singleDetailSize = "0"; diff --git a/Templates/BaseGame/game/core/gameObjects/images/camera_image.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/camera_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/core/gameObjects/images/camera_image.asset.taml rename to Templates/BaseGame/game/core/gameObjects/shapes/camera_image.asset.taml diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/green.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/green.tscript new file mode 100644 index 000000000..9ea7a7bd0 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/green.tscript @@ -0,0 +1,196 @@ +//--- OBJECT WRITE BEGIN --- +new Material(OctahedronMat) { + mapTo = "green"; + diffuseColor[0] = "0 1 0 1"; + diffuseColor[1] = "1 1 1 1"; + diffuseColor[2] = "1 1 1 1"; + diffuseColor[3] = "1 1 1 1"; + DiffuseMap[0] = "core/gameObjects/images/camera"; + diffuseMapSRGB[0] = "1"; + diffuseMapSRGB[1] = "1"; + diffuseMapSRGB[2] = "1"; + diffuseMapSRGB[3] = "1"; + detailScale[0] = "2 2"; + detailScale[1] = "2 2"; + detailScale[2] = "2 2"; + detailScale[3] = "2 2"; + detailNormalMapStrength[0] = "1"; + detailNormalMapStrength[1] = "1"; + detailNormalMapStrength[2] = "1"; + detailNormalMapStrength[3] = "1"; + roughness[0] = "1"; + roughness[1] = "1"; + roughness[2] = "1"; + roughness[3] = "1"; + metalness[0] = "0"; + metalness[1] = "0"; + metalness[2] = "0"; + metalness[3] = "0"; + glowMul[0] = "0"; + glowMul[1] = "0"; + glowMul[2] = "0"; + glowMul[3] = "0"; + accuEnabled[0] = "0"; + accuEnabled[1] = "0"; + accuEnabled[2] = "0"; + accuEnabled[3] = "0"; + accuScale[0] = "1"; + accuScale[1] = "1"; + accuScale[2] = "1"; + accuScale[3] = "1"; + accuDirection[0] = "1"; + accuDirection[1] = "1"; + accuDirection[2] = "1"; + accuDirection[3] = "1"; + accuStrength[0] = "0.6"; + accuStrength[1] = "0.6"; + accuStrength[2] = "0.6"; + accuStrength[3] = "0.6"; + accuCoverage[0] = "0.9"; + accuCoverage[1] = "0.9"; + accuCoverage[2] = "0.9"; + accuCoverage[3] = "0.9"; + accuSpecular[0] = "16"; + accuSpecular[1] = "16"; + accuSpecular[2] = "16"; + accuSpecular[3] = "16"; + isSRGB[0] = "0"; + isSRGB[1] = "0"; + isSRGB[2] = "0"; + isSRGB[3] = "0"; + invertRoughness[0] = "0"; + invertRoughness[1] = "0"; + invertRoughness[2] = "0"; + invertRoughness[3] = "0"; + roughnessChan[0] = "0"; + roughnessChan[1] = "0"; + roughnessChan[2] = "0"; + roughnessChan[3] = "0"; + AOChan[0] = "1"; + AOChan[1] = "1"; + AOChan[2] = "1"; + AOChan[3] = "1"; + metalChan[0] = "2"; + metalChan[1] = "2"; + metalChan[2] = "2"; + metalChan[3] = "2"; + glow[0] = "0"; + glow[1] = "0"; + glow[2] = "0"; + glow[3] = "0"; + parallaxScale[0] = "0"; + parallaxScale[1] = "0"; + parallaxScale[2] = "0"; + parallaxScale[3] = "0"; + useAnisotropic[0] = "1"; + useAnisotropic[1] = "1"; + useAnisotropic[2] = "1"; + useAnisotropic[3] = "1"; + vertLit[0] = "0"; + vertLit[1] = "0"; + vertLit[2] = "0"; + vertLit[3] = "0"; + vertColor[0] = "0"; + vertColor[1] = "0"; + vertColor[2] = "0"; + vertColor[3] = "0"; + minnaertConstant[0] = "-1"; + minnaertConstant[1] = "-1"; + minnaertConstant[2] = "-1"; + minnaertConstant[3] = "-1"; + subSurface[0] = "0"; + subSurface[1] = "0"; + subSurface[2] = "0"; + subSurface[3] = "0"; + subSurfaceColor[0] = "1 0.2 0.2 1"; + subSurfaceColor[1] = "1 0.2 0.2 1"; + subSurfaceColor[2] = "1 0.2 0.2 1"; + subSurfaceColor[3] = "1 0.2 0.2 1"; + subSurfaceRolloff[0] = "0.2"; + subSurfaceRolloff[1] = "0.2"; + subSurfaceRolloff[2] = "0.2"; + subSurfaceRolloff[3] = "0.2"; + emissive[0] = "0"; + emissive[1] = "0"; + emissive[2] = "0"; + emissive[3] = "0"; + foreground[0] = "0"; + foreground[1] = "0"; + foreground[2] = "0"; + foreground[3] = "0"; + doubleSided = "0"; + animFlags[0] = "0x00000000"; + animFlags[1] = "0x00000000"; + animFlags[2] = "0x00000000"; + animFlags[3] = "0x00000000"; + scrollDir[0] = "0 0"; + scrollDir[1] = "0 0"; + scrollDir[2] = "0 0"; + scrollDir[3] = "0 0"; + scrollSpeed[0] = "0"; + scrollSpeed[1] = "0"; + scrollSpeed[2] = "0"; + scrollSpeed[3] = "0"; + rotSpeed[0] = "0"; + rotSpeed[1] = "0"; + rotSpeed[2] = "0"; + rotSpeed[3] = "0"; + rotPivotOffset[0] = "0 0"; + rotPivotOffset[1] = "0 0"; + rotPivotOffset[2] = "0 0"; + rotPivotOffset[3] = "0 0"; + waveType[0] = "Sin"; + waveType[1] = "Sin"; + waveType[2] = "Sin"; + waveType[3] = "Sin"; + waveFreq[0] = "0"; + waveFreq[1] = "0"; + waveFreq[2] = "0"; + waveFreq[3] = "0"; + waveAmp[0] = "0"; + waveAmp[1] = "0"; + waveAmp[2] = "0"; + waveAmp[3] = "0"; + sequenceFramePerSec[0] = "0"; + sequenceFramePerSec[1] = "0"; + sequenceFramePerSec[2] = "0"; + sequenceFramePerSec[3] = "0"; + sequenceSegmentSize[0] = "0"; + sequenceSegmentSize[1] = "0"; + sequenceSegmentSize[2] = "0"; + sequenceSegmentSize[3] = "0"; + cellIndex[0] = "0 0"; + cellIndex[1] = "0 0"; + cellIndex[2] = "0 0"; + cellIndex[3] = "0 0"; + cellLayout[0] = "0 0"; + cellLayout[1] = "0 0"; + cellLayout[2] = "0 0"; + cellLayout[3] = "0 0"; + cellSize[0] = "0"; + cellSize[1] = "0"; + cellSize[2] = "0"; + cellSize[3] = "0"; + bumpAtlas[0] = "0"; + bumpAtlas[1] = "0"; + bumpAtlas[2] = "0"; + bumpAtlas[3] = "0"; + castShadows = "0"; + planarReflection = "0"; + translucent = "1"; + translucentBlendOp = "PreMul"; + translucentZWrite = "0"; + alphaTest = "0"; + alphaRef = "1"; + dynamicCubemap = "0"; + showFootprints = "1"; + showDust = "0"; + effectColor[0] = "0 0 0 0"; + effectColor[1] = "0 0 0 0"; + footstepSoundId = "-1"; + impactSoundId = "-1"; + ImpactFXIndex = "-1"; + canSave = "1"; + canSaveDynamicFields = "1"; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/core/rendering/materials/moon_noglow.tscript b/Templates/BaseGame/game/core/rendering/materials/moon_noglow.tscript new file mode 100644 index 000000000..b9e69c0da --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/moon_noglow.tscript @@ -0,0 +1,9 @@ +//--- OBJECT WRITE BEGIN --- +singleton Material(moon_noglow) { + mapTo="moon_noglow"; + DiffuseMapAsset = "Core_Rendering:moon_noglow_image"; + emissive = true; + translucent = true; + vertColor[ 0 ] = true; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/core/rendering/materials/moon_wglow.tscript b/Templates/BaseGame/game/core/rendering/materials/moon_wglow.tscript new file mode 100644 index 000000000..ad87ba5a3 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/moon_wglow.tscript @@ -0,0 +1,9 @@ +//--- OBJECT WRITE BEGIN --- +singleton Material(moon_wglow) { + mapTo="moon_wglow"; + DiffuseMapAsset = "Core_Rendering:moon_wglow_image"; + emissive = true; + translucent = true; + vertColor[ 0 ] = true; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml b/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml index ad9de2677..8417b1fa4 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml +++ b/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml @@ -19,6 +19,7 @@ 0 0 AutoPrune + AutoPrune 1 0 diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui index 59e7beb10..e03d27ecb 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui @@ -1084,6 +1084,22 @@ $guiContent = new GuiControl(AssetBrowser) { canSave = "1"; canSaveDynamicFields = "0"; }; + new GuiBitmapCtrl() { + bitmapAsset = "ToolsModule:smaller_image"; + position = "5 588"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "top"; + profile = "ToolsGuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; new GuiSliderCtrl() { range = "0 2"; ticks = "5"; @@ -1092,7 +1108,7 @@ $guiContent = new GuiControl(AssetBrowser) { useFillBar = "0"; fillBarColor = "255 255 255 255"; renderTicks = "0"; - position = "8 588"; + position = "28 590"; extent = "75 20"; minExtent = "8 2"; horizSizing = "right"; @@ -1109,6 +1125,22 @@ $guiContent = new GuiControl(AssetBrowser) { canSave = "1"; canSaveDynamicFields = "0"; }; + new GuiBitmapCtrl() { + bitmapAsset = "ToolsModule:larger_image"; + position = "103 588"; + extent = "20 20"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "top"; + profile = "ToolsGuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; }; }; //--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui index 0f725dbd8..ccac94a50 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui @@ -14,522 +14,6 @@ $guiContent = new GuiControl(AssetImportCtrl) { canSave = "1"; canSaveDynamicFields = "1"; - 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 = "132 80"; - extent = "733 582"; - minExtent = "48 92"; - horizSizing = "center"; - vertSizing = "center"; - profile = "ToolsGuiWindowProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - 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 = "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() { - bitmapAsset = "ToolsModule:iconOpen_image"; - 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\");\nSelectAssetPathWindow.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() { - bitmapAsset = "ToolsModule:save_as_n_image"; - 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 = "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 447"; - 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 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(DoAssetImportButton) { - 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 GuiBitmapButtonCtrl(ImportLogButton) { - bitmapAsset = "ToolsModule:iconInformation_image"; - bitmapMode = "Centered"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - masked = "0"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "5 555"; - extent = "22 22"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - command = "ImportAssetWindow.toggleLogWindow();"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "View Import Log"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; new GuiWindowCtrl(ImportAssetConfigEditorWindow) { text = "Import Options Config"; resizeWidth = "1"; @@ -689,5 +173,544 @@ $guiContent = new GuiControl(AssetImportCtrl) { }; }; }; + 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 93"; + extent = "733 582"; + minExtent = "48 92"; + horizSizing = "center"; + vertSizing = "center"; + profile = "ToolsGuiWindowProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + 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 = "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 = "*"; + text = "data/"; + 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() { + BitmapAsset = "ToolsModule:iconOpen_image"; + 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\");\nSelectAssetPathWindow.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"; + text = "DefaultImportConfig"; + 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() { + BitmapAsset = "ToolsModule:save_as_n_image"; + 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 = "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 447"; + 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(ImportLogButton) { + bitmapAsset = "ToolsModule:iconInformation_image"; + bitmapMode = "Centered"; + autoFitExtents = "0"; + useModifiers = "0"; + useStates = "1"; + masked = "0"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "5 0"; + extent = "22 22"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + command = "ImportAssetWindow.toggleLogWindow();"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "View Import Log"; + hovertime = "1000"; + isContainer = "0"; + 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 22"; + extent = "180 426"; + 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 449"; + 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 = "102 21"; + 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(DoAssetImportButton) { + 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 GuiCheckBoxCtrl(toggleImportWindowVizBtn) { + text = "Don\'t show this every time"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "416 551"; + extent = "177 30"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "top"; + profile = "ToolsGuiCheckBoxProfile"; + visible = "1"; + active = "1"; + command = "toggleImportWindowViz();"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "If checked, this will make the importer run silently without prompting the window each time, using the Default Import Config"; + 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 index 7030b5e40..924b1a256 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/newFolder.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/newFolder.gui @@ -47,7 +47,7 @@ $guiContent = new GuiControl(AssetBrowser_newFolder) { canSaveDynamicFields = "0"; new GuiButtonCtrl() { - text = "Select"; + text = "OK"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -65,6 +65,7 @@ $guiContent = new GuiControl(AssetBrowser_newFolder) { isContainer = "0"; canSave = "1"; canSaveDynamicFields = "0"; + accelerator = "return"; }; new GuiButtonCtrl() { text = "Cancel"; @@ -85,6 +86,7 @@ $guiContent = new GuiControl(AssetBrowser_newFolder) { isContainer = "0"; canSave = "1"; canSaveDynamicFields = "0"; + accelerator = "escape"; }; new GuiTextEditCtrl(AssetBrowser_newFolderNameTxt) { historySize = "0"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript index 3dd803a62..283030684 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript @@ -279,6 +279,7 @@ function AssetBrowser::selectAsset( %this, %asset ) %this.changeAsset(); } + if(isObject(Inspector)) Inspector.refresh(); AssetBrowser.hideDialog(); @@ -985,14 +986,31 @@ function AssetBrowser::toggleTagFilterPopup(%this) function AssetBrowser::changeAsset(%this) { + %targetObject = %this.fieldTargetObject; + %inspectorObject = ""; + + if(%this.fieldTargetObject.isInNamespaceHierarchy("GuiInspector")) + { + %inspectorObject = %this.fieldTargetObject; + %targetObject = %inspectorObject.getInspectObject(); + } + //alright, we've selectd an asset for a field, so time to set it! if(%this.fieldTargetName $= "") - %cmd = %this.fieldTargetObject @ ".apply(\""@ %this.selectedAsset @ "\");"; + %cmd = %targetObject @ ".apply(\""@ %this.selectedAsset @ "\");"; else - %cmd = %this.fieldTargetObject @ "." @ %this.fieldTargetName @ "=\"" @ %this.selectedAsset @ "\";"; - echo("Changing asset via the " @ %cmd @ " command"); + %cmd = %targetObject @ "." @ %this.fieldTargetName @ "=\"" @ %this.selectedAsset @ "\";"; + //echo("Changing asset via the " @ %cmd @ " command"); eval(%cmd); + //Force update our object with the field change + %targetObject.inspectPostApply(); + + if(isObject(%inspectorObject)) + { + %inspectorObject.refresh(); + } + //Flag us as dirty for editing purposes EWorldEditor.setSceneAsDirty(); } @@ -2317,6 +2335,53 @@ function EWorldEditor::onControlDropped( %this, %payload, %position ) EWorldEditor.isDirty = true; } +function GuiEditor::onControlDropped(%this, %payload, %position) +{ + Canvas.popDialog(EditorDragAndDropLayer); + // Make sure we have the right kind of D&D. + + if( !%payload.parentGroup.isInNamespaceHierarchy( "GuiDragAndDropControlType_GuiControl" ) && + !%payload.parentGroup.isInNamespaceHierarchy( "AssetPreviewControlType_AssetDrop" )) + return; + + if( %payload.dragSourceControl == %this ) + return; + + %pos = %payload.getGlobalPosition(); + %x = getWord(%pos, 0); + %y = getWord(%pos, 1); + + if(%payload.assetType !$= "Creator") + { + //dealing with an actual asset, so build the assetName + %assetId = %payload.moduleName @ ":" @ %payload.assetName; + %assetType = AssetDatabase.getAssetType(%assetId); + + if(%assetType $= "ImageAsset") + { + %cmd = "return new guiBitmapCtrl();"; + %ctrl = eval( %cmd ); + %ctrl.bitmap = %assetId; + } + } + else + { + %className = %payload.assetName; + %cmd = "return new " @ %className @ "();"; + %ctrl = eval( %cmd ); + } + + %this.addNewCtrl(%ctrl); + + %ctrl.setPositionGlobal(%x, %y); + %this.setFirstResponder(); + + if(EditorSettings.value("AssetManagement/Assets/closeBrowserOnDragAction", false)) + { + AssetBrowser.hideDialog(); + } +} + function AssetBrowserFilterTree::onControlDropped( %this, %payload, %position ) { Canvas.popDialog(EditorDragAndDropLayer); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.tscript index f96b1b645..89f294486 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.tscript @@ -181,6 +181,20 @@ function AssetBrowser::onBeginDropFiles( %this ) function AssetBrowser::onDropFile( %this, %filePath ) { + if(fileExt(%filePath) $= "") + { + //we're dealing with a folder, so we gotta parse through it + + %file = findFirstFile( %filePath @ "/*" ); + while( %file !$= "" ) + { + %this.onDropFile(%file); + %file = findNextFile( %filePath @ "/*" ); + } + + return; + } + if(!AssetBrowser.isAwake() || !AssetBrowser.isVisible()) { if(GuiEditorIsActive()) @@ -501,7 +515,7 @@ function ImportAssetWindow::doRefresh(%this) } if(%this.autoRenamedAssets != 0) { - %ImportActionSummary = %ImportActionSummary SPC %this.autoRenamedAssets @ " Auto Renamed|"; + %ImportActionSummary = %ImportActionSummary SPC %this.autoRenamedAssets @ " Automatically Renamed|"; } if(%ImportActionSummary !$= "") diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfig.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfig.tscript index 175d0f4d5..787983fe1 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfig.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfig.tscript @@ -109,6 +109,7 @@ function setupImportConfigSettingsList() ImportAssetConfigSettingsList.addNewConfigSetting("Images/GenerateMaterialOnImport", "Generate Material On Import", "bool", "", "1", ""); //Sounds + ImportAssetConfigSettingsList.addNewConfigSetting("Images/ImportSounds", "Import Sounds", "bool", "", "1", ""); ImportAssetConfigSettingsList.addNewConfigSetting("Sounds/VolumeAdjust", "Volume Adjustment", "float", "", "1.0", ""); ImportAssetConfigSettingsList.addNewConfigSetting("Sounds/PitchAdjust", "Pitch Adjustment", "float", "", "1.0", ""); ImportAssetConfigSettingsList.addNewConfigSetting("Sounds/Compressed", "Is Compressed", "bool", "", "0", ""); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.tscript index effa43f52..929c1ddfe 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfigEditor.tscript @@ -1,6 +1,9 @@ function AssetImportConfigEditor::onWake(%this) { %this.refresh(); + + %index = AssetImportConfigList.findTextIndex(EditorSettings.value("Assets/AssetImporDefaultConfig", "")); + AssetImportConfigList.setSelectedRow(%index); } function AssetImportConfigEditor::refresh(%this) @@ -41,7 +44,7 @@ function AssetImportConfigList::onSelect( %this, %id, %text ) %this.populateConfigListByGroup("Images"); %this.populateConfigListByGroup("Sounds"); %this.populateConfigListByGroup("Animations"); - %this.populateConfigListByGroup("Collision"); + //%this.populateConfigListByGroup("Collision"); ImportOptionsConfigList.update(); } diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/creatorObj.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/creatorObj.tscript index 1dec09e34..44c84bec7 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/creatorObj.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/creatorObj.tscript @@ -6,6 +6,7 @@ function AssetBrowser::buildCreatorPreview(%this, %assetDef, %previewData) %previewData.assetName = %name; %previewData.assetPath = ""; + %previewData.moduleName = ""; %previewData.previewImage = "ToolsModule:" @ %class @ "_image"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.tscript index 33dd9a98b..8817cc337 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.tscript @@ -1,7 +1,9 @@ function AssetBrowser::createNewFolder(%this) { AssetBrowser_newFolderNameTxt.text = "NewFolder"; - Canvas.pushDialog(AssetBrowser_newFolder); + Canvas.pushDialog(AssetBrowser_newFolder, 99, true); + + AssetBrowser_newFolderNameTxt.selectAllText(); } function AssetBrowser::doCreateNewFolder(%this) diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/larger.png b/Templates/BaseGame/game/tools/gui/images/stencilIcons/larger.png index 4f5d73310..b7aba1dad 100644 Binary files a/Templates/BaseGame/game/tools/gui/images/stencilIcons/larger.png and b/Templates/BaseGame/game/tools/gui/images/stencilIcons/larger.png differ diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/smaller.png b/Templates/BaseGame/game/tools/gui/images/stencilIcons/smaller.png index c1520a512..de6acb30c 100644 Binary files a/Templates/BaseGame/game/tools/gui/images/stencilIcons/smaller.png and b/Templates/BaseGame/game/tools/gui/images/stencilIcons/smaller.png differ diff --git a/Templates/BaseGame/game/tools/gui/images/window.png b/Templates/BaseGame/game/tools/gui/images/window.png index cc07494df..d9e9a9d6d 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/guiEditor/scripts/guiEditor.ed.tscript b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditor.ed.tscript index 823fa39b3..bdbab3018 100644 --- a/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditor.ed.tscript @@ -668,30 +668,6 @@ function GuiEditor::onControlDragged( %this, %payload, %position ) //--------------------------------------------------------------------------------------------- -function GuiEditor::onControlDropped(%this, %payload, %position) -{ - // Make sure we have the right kind of D&D. - - if( !%payload.parentGroup.isInNamespaceHierarchy( "GuiDragAndDropControlType_GuiControl" ) && - !%payload.parentGroup.isInNamespaceHierarchy( "AssetPreviewControlType_AssetDrop" )) - return; - - %pos = %payload.getGlobalPosition(); - %x = getWord(%pos, 0); - %y = getWord(%pos, 1); - - %asset = %payload.assetName; - %cmd = "return new " @ %asset @ "();"; - %ctrl = eval( %cmd ); - - %this.addNewCtrl(%ctrl); - - %ctrl.setPositionGlobal(%x, %y); - %this.setFirstResponder(); -} - -//--------------------------------------------------------------------------------------------- - function GuiEditor::onGainFirstResponder(%this) { %this.enableMenuItems(true); diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript index 124ae856a..2af4b9795 100644 --- a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript @@ -816,9 +816,9 @@ function MaterialEditorGui::guiSync( %this, %material ) MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( getAssetPreviewImage(%normalMap) ); //ORM Config - %ormMap = (%material).getNormalMap(%layer); + %ormMap = (%material).getORMConfigMap(%layer); %hasOrmMap = (%ormMap !$= "" && %ormMap !$=$MaterialEditor::emptyMaterialImage); - %ormMapText = %hasOrmMap ? (%material).getNormalMapAsset(%layer) : "None"; + %ormMapText = %hasOrmMap ? (%material).getORMConfigMapAsset(%layer) : "None"; MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText(%ormMapText ); MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap( getAssetPreviewImage(%ormMap) );