From 7b5e1c3c5859e86a2a7601ec0ea7be759affe3f3 Mon Sep 17 00:00:00 2001 From: Areloch Date: Mon, 18 Nov 2019 03:30:04 -0600 Subject: [PATCH] @rextimmy fix for GuiWindowCtrl so they snap correctly again Added asset loose files for editor and bake level files on level asset Correct return of ConsoleGetType on TypeShapeAssetPtr Adds shape asset support to TSStatic, now will support either raw shape file or ShapeAsset Adds onInspect function behavior, so when object is inspected, it can do special editor behavior Adds callback for when editTSCtrl is resized Added editor setting to force the world editor sidebar(scene tree and inspector windows) to resize to fit to the right side of the screen automatically instead of float If assimp loader encounters error, it's output into the console log Makes root Data item in folder hierarchy tree in Asset Browser able to support right mouse popup menu action Material and Shape assets now correctly base on current browsed folder Material asset generation now more properly fills out common maps, as well as handles skipped dependencies better More theme corrections Updated TestGrid images asset defs to have proper loose file handling --- Engine/source/T3D/assets/LevelAsset.cpp | 46 ++ Engine/source/T3D/assets/LevelAsset.h | 14 + Engine/source/T3D/assets/ShapeAsset.cpp | 3 +- Engine/source/T3D/tsStatic.cpp | 122 +++++- Engine/source/T3D/tsStatic.h | 17 +- Engine/source/console/simObject.h | 5 +- .../source/gui/containers/guiWindowCtrl.cpp | 22 +- Engine/source/gui/editor/guiInspector.cpp | 4 +- Engine/source/gui/editor/guiInspector.h | 7 +- Engine/source/gui/worldEditor/editTSCtrl.cpp | 12 + Engine/source/gui/worldEditor/editTSCtrl.h | 2 + Engine/source/ts/assimp/assimpShapeLoader.cpp | 3 + .../scripts/fonts/ArialItalic 14 (ansi).uft | Bin 2481 -> 2540 bytes .../fonts/Lucida Console 12 (ansi).uft | Bin 5372 -> 5423 bytes .../tools/assetBrowser/assetImportConfigs.xml | 91 ++-- .../assetBrowser/scripts/assetBrowser.cs | 15 +- .../tools/assetBrowser/scripts/assetImport.cs | 4 +- .../assetBrowser/scripts/assetTypes/image.cs | 1 + .../scripts/assetTypes/material.cs | 41 +- .../assetBrowser/scripts/assetTypes/shape.cs | 2 +- .../tools/assetBrowser/scripts/popupMenus.cs | 1 - .../game/tools/gui/editorSettingsWindow.ed.cs | 7 +- .../BaseGame/game/tools/gui/profiles.ed.cs | 18 +- .../gui/guiMaterialPropertiesWindow.ed.gui | 8 + .../game/tools/navEditor/NavEditorGui.gui | 1 + Templates/BaseGame/game/tools/settings.xml | 408 +++++++++--------- .../game/tools/shapeEditor/gui/Profiles.ed.cs | 11 +- .../gui/shapeEdAdvancedWindow.ed.gui | 4 + .../shapeEditor/gui/shapeEdAnimWindow.ed.gui | 1 + .../shapeEditor/gui/shapeEdPropWindow.ed.gui | 6 + .../tools/worldEditor/gui/EditorGui.ed.gui | 2 +- .../gui/ObjectSnapOptionsWindow.ed.gui | 3 + .../gui/WorldEditorInspectorWindow.ed.gui | 2 +- .../tools/worldEditor/scripts/EditorGui.ed.cs | 30 ++ Tools/CMake/libraries/assimp.cmake | 1 + 35 files changed, 619 insertions(+), 295 deletions(-) diff --git a/Engine/source/T3D/assets/LevelAsset.cpp b/Engine/source/T3D/assets/LevelAsset.cpp index 088b80045..6fd73db92 100644 --- a/Engine/source/T3D/assets/LevelAsset.cpp +++ b/Engine/source/T3D/assets/LevelAsset.cpp @@ -94,6 +94,9 @@ LevelAsset::LevelAsset() : AssetBase(), mIsSubLevel(false) mGamemodeName = StringTable->EmptyString(); mMainLevelAsset = StringTable->EmptyString(); + + mEditorFile = StringTable->EmptyString(); + mBakedSceneFile = StringTable->EmptyString(); } //----------------------------------------------------------------------------- @@ -128,6 +131,11 @@ void LevelAsset::initPersistFields() addProtectedField("NavmeshFile", TypeAssetLooseFilePath, Offset(mNavmeshFile, LevelAsset), &setLevelFile, &getLevelFile, "Path to the navmesh file."); + addProtectedField("EditorFile", TypeAssetLooseFilePath, Offset(mEditorFile, LevelAsset), + &setEditorFile, &getEditorFile, "Path to the level file with objects that were removed as part of the baking process. Loaded when the editor is loaded for ease of editing."); + addProtectedField("BakedSceneFile", TypeAssetLooseFilePath, Offset(mBakedSceneFile, LevelAsset), + &setBakedSceneFile, &getBakedSceneFile, "Path to the level file with the objects generated as part of the baking process"); + addField("isSubScene", TypeBool, Offset(mIsSubLevel, LevelAsset), "Is this a sublevel to another Scene"); addField("gameModeName", TypeString, Offset(mGamemodeName, LevelAsset), "Name of the Game Mode to be used with this level"); } @@ -189,3 +197,41 @@ void LevelAsset::setImageFile(const char* pImageFile) // Refresh the asset. refreshAsset(); } + +void LevelAsset::setEditorFile(const char* pEditorFile) +{ + // Sanity! + AssertFatal(pEditorFile != NULL, "Cannot use a NULL level file."); + + // Fetch image file. + pEditorFile = StringTable->insert(pEditorFile); + + // Ignore no change, + if (pEditorFile == mEditorFile) + return; + + // Update. + mEditorFile = getOwned() ? expandAssetFilePath(pEditorFile) : StringTable->insert(pEditorFile); + + // Refresh the asset. + refreshAsset(); +} + +void LevelAsset::setBakedSceneFile(const char* pBakedSceneFile) +{ + // Sanity! + AssertFatal(pBakedSceneFile != NULL, "Cannot use a NULL level file."); + + // Fetch image file. + pBakedSceneFile = StringTable->insert(pBakedSceneFile); + + // Ignore no change, + if (pBakedSceneFile == mBakedSceneFile) + return; + + // Update. + mBakedSceneFile = getOwned() ? expandAssetFilePath(pBakedSceneFile) : StringTable->insert(pBakedSceneFile); + + // Refresh the asset. + refreshAsset(); +} diff --git a/Engine/source/T3D/assets/LevelAsset.h b/Engine/source/T3D/assets/LevelAsset.h index 17aff3fc9..358852080 100644 --- a/Engine/source/T3D/assets/LevelAsset.h +++ b/Engine/source/T3D/assets/LevelAsset.h @@ -52,6 +52,9 @@ class LevelAsset : public AssetBase StringTableEntry mNavmeshFile; StringTableEntry mPreviewImage; + StringTableEntry mEditorFile; + StringTableEntry mBakedSceneFile; + bool mIsSubLevel; StringTableEntry mMainLevelAsset; @@ -81,6 +84,11 @@ public: void setImageFile(const char* pImageFile); inline StringTableEntry getImageFile(void) const { return mPreviewImage; }; + void setEditorFile(const char* pEditorFile); + inline StringTableEntry getEditorFile(void) const { return mEditorFile; }; + void setBakedSceneFile(const char* pBakedSceneFile); + inline StringTableEntry getBakedSceneFile(void) const { return mBakedSceneFile; }; + SimObjectId load(); protected: @@ -89,6 +97,12 @@ protected: static bool setPreviewImageFile(void *obj, const char *index, const char *data) { static_cast(obj)->setImageFile(data); return false; } static const char* getPreviewImageFile(void* obj, const char* data) { return static_cast(obj)->getImageFile(); } + static bool setEditorFile(void* obj, const char* index, const char* data) { static_cast(obj)->setEditorFile(data); return false; } + static const char* getEditorFile(void* obj, const char* data) { return static_cast(obj)->getEditorFile(); } + static bool setBakedSceneFile(void* obj, const char* index, const char* data) { static_cast(obj)->setBakedSceneFile(data); return false; } + static const char* getBakedSceneFile(void* obj, const char* data) { return static_cast(obj)->getBakedSceneFile(); } + + virtual void initializeAsset(void); virtual void onAssetRefresh(void) {} }; diff --git a/Engine/source/T3D/assets/ShapeAsset.cpp b/Engine/source/T3D/assets/ShapeAsset.cpp index 93ca9d5c1..1262b13ee 100644 --- a/Engine/source/T3D/assets/ShapeAsset.cpp +++ b/Engine/source/T3D/assets/ShapeAsset.cpp @@ -56,7 +56,8 @@ ConsoleType(assetIdString, TypeShapeAssetPtr, String, ASSET_ID_FIELD_PREFIX) ConsoleGetType(TypeShapeAssetPtr) { // Fetch asset Id. - return *((StringTableEntry*)dptr); + //return *((StringTableEntry*)dptr); + return (*((AssetPtr*)dptr)).getAssetId(); } //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/tsStatic.cpp b/Engine/source/T3D/tsStatic.cpp index 9cc40968e..16a3f49e6 100644 --- a/Engine/source/T3D/tsStatic.cpp +++ b/Engine/source/T3D/tsStatic.cpp @@ -55,6 +55,8 @@ #include "console/engineAPI.h" #include "T3D/accumulationVolume.h" +#include "gui/editor/inspector/group.h" + using namespace Torque; extern bool gEditingMission; @@ -140,6 +142,9 @@ TSStatic::TSStatic() #ifdef TORQUE_AFX_ENABLED afxZodiacData::convertGradientRangeFromDegrees(mGradientRange, mGradientRangeUser); #endif + + mShapeAsset = StringTable->EmptyString(); + mShapeAssetId = StringTable->EmptyString(); } TSStatic::~TSStatic() @@ -162,6 +167,10 @@ void TSStatic::initPersistFields() { addGroup("Media"); + addProtectedField("shapeAsset", TypeShapeAssetPtr, Offset(mShapeAsset, TSStatic), + &TSStatic::_setShapeAsset, &defaultProtectedGetFn, + "The source shape asset."); + addField("shapeName", TypeShapeFilename, Offset( mShapeName, TSStatic ), "%Path and filename of the model file (.DTS, .DAE) to use for this TSStatic." ); @@ -250,6 +259,15 @@ void TSStatic::initPersistFields() Parent::initPersistFields(); } +bool TSStatic::_setShapeAsset(void* obj, const char* index, const char* data) +{ + TSStatic* ts = static_cast(obj);// ->setFile(FileName(data)); + + ts->setShapeAsset(StringTable->insert(data)); + + return false; +} + bool TSStatic::_setFieldSkin( void *object, const char *index, const char *data ) { TSStatic *ts = static_cast( object ); @@ -344,6 +362,14 @@ bool TSStatic::onAdd() return true; } +bool TSStatic::setShapeAsset(const StringTableEntry shapeAssetId) +{ + mShapeAssetId = shapeAssetId; + + _createShape(); + return true; +} + bool TSStatic::_createShape() { // Cleanup before we create. @@ -356,15 +382,37 @@ bool TSStatic::_createShape() mAmbientThread = NULL; mShape = NULL; - if (!mShapeName || mShapeName[0] == '\0') + if (mShapeAssetId != StringTable->EmptyString()) { - Con::errorf( "TSStatic::_createShape() - No shape name!" ); - return false; + mShapeAsset = mShapeAssetId; + + if (mShapeAsset.isNull()) + { + Con::errorf("[TSStatic] Failed to load shape asset."); + return false; + } + + mShape = mShapeAsset->getShapeResource(); + + if(!mShape) + { + Con::errorf("TSStatic::_createShape() - Shape Asset had no valid shape!"); + return false; + } + } + else + { + if (!mShapeName || mShapeName[0] == '\0') + { + Con::errorf("TSStatic::_createShape() - No shape name!"); + return false; + } + + mShapeHash = _StringTable::hashString(mShapeName); + + mShape = ResourceManager::get().load(mShapeName); } - mShapeHash = _StringTable::hashString(mShapeName); - - mShape = ResourceManager::get().load(mShapeName); if ( bool(mShape) == false ) { Con::errorf( "TSStatic::_createShape() - Unable to load shape: %s", mShapeName ); @@ -831,7 +879,9 @@ U32 TSStatic::packUpdate(NetConnection *con, U32 mask, BitStream *stream) if (stream->writeFlag(mask & AdvancedStaticOptionsMask)) { + stream->writeString(mShapeAssetId); stream->writeString(mShapeName); + stream->write((U32)mDecalType); stream->writeFlag(mAllowPlayerStep); @@ -923,6 +973,10 @@ void TSStatic::unpackUpdate(NetConnection *con, BitStream *stream) if (stream->readFlag()) // AdvancedStaticOptionsMask { + char buffer[256]; + stream->readString(buffer); + mShapeAssetId = StringTable->insert(buffer); + mShapeName = stream->readSTString(); stream->read((U32*)&mDecalType); @@ -1409,6 +1463,62 @@ U32 TSStatic::getNumDetails() //They each function a little differently; but achieve the same purpose of gathering //target names/counts without polluting simObject. +void TSStatic::onInspect(GuiInspector* inspector) +{ + //Put the GameObject group before everything that'd be gameobject-effecting, for orginazational purposes + GuiInspectorGroup* tsStaticInspGroup = new GuiInspectorGroup("Shape", inspector); + + tsStaticInspGroup->registerObject(); + inspector->addInspectorGroup(tsStaticInspGroup); + inspector->addObject(tsStaticInspGroup); + + //Do this on both the server and client + /*S32 materialCount = mShapeAsset->getShape()->materialList->getMaterialNameList().size(); //mMeshAsset->getMaterialCount(); + + if (isServerObject()) + { + //we need to update the editor + for (U32 i = 0; i < mFields.size(); i++) + { + //find any with the materialslot title and clear them out + if (FindMatch::isMatch("MaterialSlot*", mFields[i].mFieldName, false)) + { + setDataField(mFields[i].mFieldName, NULL, ""); + mFields.erase(i); + continue; + } + } + + //next, get a listing of our materials in the shape, and build our field list for them + char matFieldName[128]; + + if (materialCount > 0) + mComponentGroup = StringTable->insert("Materials"); + + for (U32 i = 0; i < materialCount; i++) + { + StringTableEntry materialname = StringTable->insert(mMeshAsset->getShape()->materialList->getMaterialName(i).c_str()); + + //Iterate through our assetList to find the compliant entry in our matList + for (U32 m = 0; m < mMeshAsset->getMaterialCount(); m++) + { + AssetPtr matAsset = mMeshAsset->getMaterialAsset(m); + + if (matAsset->getMaterialDefinitionName() == materialname) + { + dSprintf(matFieldName, 128, "MaterialSlot%d", i); + + addComponentField(matFieldName, "A material used in the shape file", "Material", matAsset->getAssetId(), ""); + break; + } + } + } + + if (materialCount > 0) + mComponentGroup = ""; + }*/ +} + DefineEngineMethod( TSStatic, getTargetName, const char*, ( S32 index ),(0), "Get the name of the indexed shape material.\n" "@param index index of the material to get (valid range is 0 - getTargetCount()-1).\n" diff --git a/Engine/source/T3D/tsStatic.h b/Engine/source/T3D/tsStatic.h index 4dbcb6920..bcfdba9ad 100644 --- a/Engine/source/T3D/tsStatic.h +++ b/Engine/source/T3D/tsStatic.h @@ -48,6 +48,13 @@ #include "scene/reflector.h" #endif +#ifndef _ASSET_PTR_H_ +#include "assets/assetPtr.h" +#endif +#ifndef SHAPEASSET_H +#include "T3D/assets/ShapeAsset.h" +#endif + class TSShapeInstance; class TSThread; class TSStatic; @@ -140,7 +147,9 @@ protected: bool buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &box, const SphereF& sphere); bool buildExportPolyList(ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &); void buildConvex(const Box3F& box, Convex* convex); - + + bool setShapeAsset(const StringTableEntry shapeAssetId); + bool _createShape(); void _updatePhysics(); @@ -173,6 +182,9 @@ protected: Vector mLOSDetails; TSShapeInstance *mShapeInstance; + AssetPtr mShapeAsset; + StringTableEntry mShapeAssetId; + NetStringHandle mSkinNameHandle; String mAppliedSkinName; @@ -210,6 +222,7 @@ public: DECLARE_CONOBJECT(TSStatic); static void initPersistFields(); + static bool _setShapeAsset(void* obj, const char* index, const char* data); static bool _setFieldSkin( void *object, const char* index, const char* data ); static const char *_getFieldSkin( void *object, const char *data ); @@ -246,6 +259,8 @@ public: const Vector& getLOSDetails() const { return mLOSDetails; } + virtual void onInspect(GuiInspector*); + private: virtual void onStaticModified(const char* slotName, const char*newValue = NULL); protected: diff --git a/Engine/source/console/simObject.h b/Engine/source/console/simObject.h index 39201966c..beda61739 100644 --- a/Engine/source/console/simObject.h +++ b/Engine/source/console/simObject.h @@ -45,7 +45,7 @@ class Stream; class LightManager; class SimFieldDictionary; class SimPersistID; - +class GuiInspector; /// Base class for objects involved in the simulation. /// @@ -647,6 +647,9 @@ class SimObject: public ConsoleObject, public TamlCallbacks /// Called when the editor is deactivated. virtual void onEditorDisable(){}; + /// Called when the object is inspected via a GuiInspector control + virtual void onInspect(GuiInspector*) {}; + /// @} /// Find a named sub-object of this object. diff --git a/Engine/source/gui/containers/guiWindowCtrl.cpp b/Engine/source/gui/containers/guiWindowCtrl.cpp index 5077ae348..20af7fc2e 100644 --- a/Engine/source/gui/containers/guiWindowCtrl.cpp +++ b/Engine/source/gui/containers/guiWindowCtrl.cpp @@ -31,7 +31,7 @@ #include "gfx/gfxDevice.h" #include "gfx/gfxDrawUtil.h" #include "gui/containers/guiRolloutCtrl.h" - +#include "gui/editor/guiMenuBar.h" IMPLEMENT_CONOBJECT( GuiWindowCtrl ); @@ -855,6 +855,18 @@ void GuiWindowCtrl::onMouseDragged(const GuiEvent &event) snapZone.point.y -= SnapDistance; snapZone.extent.x += SnapDistance + SnapDistance; snapZone.extent.y += SnapDistance + SnapDistance; + + //check if we need to offset because of the menubar + U32 menuBarHeight = 0; + GuiCanvas* guiCanvas = getRoot(); + if (guiCanvas) + { + GuiMenuBar* menuBar = dynamic_cast(guiCanvas->getMenuBar()); + if (menuBar) + { + menuBarHeight = menuBar->getHeight(); + } + } // Build valid snap and window vectors to compare against Vector< GuiWindowCtrl* > windowList; @@ -864,11 +876,15 @@ void GuiWindowCtrl::onMouseDragged(const GuiEvent &event) { // Make sure the window is both horizontally and vertically // within the snap zone for this window. - if( !snapZone.overlaps( windowList[i]->getGlobalBounds() ) ) + RectI windowBounds = windowList[i]->getGlobalBounds(); + //offset position by menubar height + windowBounds.point.y -= menuBarHeight; + + if( !snapZone.overlaps(windowBounds) ) continue; // Build edges for snap detection - EdgeRectI snapRect( windowList[i]->getGlobalBounds(), mResizeMargin ); + EdgeRectI snapRect(windowBounds, mResizeMargin ); if( snapRect.right.position.x <= edges.left.position.x + SnapDistance && snapRect.right.position.x >= edges.left.position.x - SnapDistance ) diff --git a/Engine/source/gui/editor/guiInspector.cpp b/Engine/source/gui/editor/guiInspector.cpp index 06e06d996..b6414d45c 100644 --- a/Engine/source/gui/editor/guiInspector.cpp +++ b/Engine/source/gui/editor/guiInspector.cpp @@ -589,6 +589,8 @@ void GuiInspector::refresh() mGroups.push_back(general); addObject(general); + mTargets.first()->onInspect(this); + //Entity inspector group if (mTargets.first()->getClassRep()->isSubclassOf("Entity")) { @@ -669,7 +671,7 @@ void GuiInspector::refresh() #endif // The group ended up having no fields. Remove it. - newGroup->deleteObject(); + newGroup->deleteObject(); } else { diff --git a/Engine/source/gui/editor/guiInspector.h b/Engine/source/gui/editor/guiInspector.h index 1896b55dc..7bf20f7e0 100644 --- a/Engine/source/gui/editor/guiInspector.h +++ b/Engine/source/gui/editor/guiInspector.h @@ -106,6 +106,11 @@ public: /// @note Only valid in single-object mode. void setName( StringTableEntry newName ); + void addInspectorGroup(GuiInspectorGroup* group) + { + mGroups.push_back(group); + } + /// Deletes all GuiInspectorGroups void clearGroups(); @@ -163,4 +168,4 @@ protected: void refresh(); }; -#endif \ No newline at end of file +#endif diff --git a/Engine/source/gui/worldEditor/editTSCtrl.cpp b/Engine/source/gui/worldEditor/editTSCtrl.cpp index 032e29a1f..8d9f98809 100644 --- a/Engine/source/gui/worldEditor/editTSCtrl.cpp +++ b/Engine/source/gui/worldEditor/editTSCtrl.cpp @@ -284,6 +284,18 @@ void EditTSCtrl::consoleInit() //------------------------------------------------------------------------------ +bool EditTSCtrl::resize(const Point2I& newPosition, const Point2I& newExtent) +{ + if (!Parent::resize(newPosition, newExtent)) + return false; + + // Notify the scripts + if (isMethod("onResize")) + Con::executef(this, "onResize", newPosition, newExtent); + + return true; +} +//------------------------------------------------------------------------------ void EditTSCtrl::make3DMouseEvent(Gui3DMouseEvent & gui3DMouseEvent, const GuiEvent & event) { (GuiEvent&)(gui3DMouseEvent) = event; diff --git a/Engine/source/gui/worldEditor/editTSCtrl.h b/Engine/source/gui/worldEditor/editTSCtrl.h index 7fdc6782f..70ee00705 100644 --- a/Engine/source/gui/worldEditor/editTSCtrl.h +++ b/Engine/source/gui/worldEditor/editTSCtrl.h @@ -191,6 +191,8 @@ class EditTSCtrl : public GuiTSCtrl virtual bool isMiddleMouseDown() {return mMiddleMouseDown;} + virtual bool resize(const Point2I& newPosition, const Point2I& newExtent); + S32 getDisplayType() const {return mDisplayType;} virtual void setDisplayType(S32 type); diff --git a/Engine/source/ts/assimp/assimpShapeLoader.cpp b/Engine/source/ts/assimp/assimpShapeLoader.cpp index 9dc561aba..2ba567878 100644 --- a/Engine/source/ts/assimp/assimpShapeLoader.cpp +++ b/Engine/source/ts/assimp/assimpShapeLoader.cpp @@ -302,7 +302,10 @@ bool AssimpShapeLoader::fillGuiTreeView(const char* sourceShapePath, GuiTreeView & ~aiProcess_RemoveRedundantMaterials & ~aiProcess_GenSmoothNormals); if (!shapeScene) + { + Con::printf("AssimpShapeLoader::fillGuiTreeView - Assimp Error: %s", importer.GetErrorString()); return false; + } mScene = shapeScene; // Initialize tree diff --git a/Templates/BaseGame/game/core/gui/scripts/fonts/ArialItalic 14 (ansi).uft b/Templates/BaseGame/game/core/gui/scripts/fonts/ArialItalic 14 (ansi).uft index cfb8eec01dc71fd11272b2ffebf9d638e9e4289d..62283f15aa7769f0e0f90ff52194025594422520 100644 GIT binary patch delta 1082 zcmdle{6=_!2BYdmO=}ir28QF4WtpWXr?6O9+@wJE#&=D&P*`R>)p?^$Z=4cDHU@ZRfwvW9$=S$^o+2zOeev#J{`}4iEn*|Iq9=jLkF3dgjW zH#=QDHYjs0jNKr`Eb94!>z3#Y$qTE`$$sc4SK;(b3!Oc^Wz;H>K%XTW7f;OeD#8|3tfE4LGlXnF>je;{QjSAcDvYE^^o`U=Vxo$<}z=OPc(}9 zwq3ye?V7V6`{Mqd<-IX;X6(~Qp$N3B6ednvcV4~7NRubd>@k4riR zy0vgtEdR*$VS6Hz!;A^mpY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{OA%7XZ`|?uV>JUFqKFKV+RTfQah-sDFgzC%zXIA~lL;fSqE$PG6)Cmug zUKNBKcmv=bpfN!1Yq&E-knqEgDCH+%of66BsRz#8vP%1%VH*aGsEK>t*(=X>^^7tF6OH$J7Y!$Fd^VF1l}^V=DiLmrZYFY0 zTW8><2jg7)6=!^dSlv1K;M7iHb%mZSV7Yd0!+?@)P1(((FJ0L+JT;A$0x#?{oF zUi}cj&Brzm_5I#&#AOJwvm~(1>{HPUm=>nr2Cyytv@BK*cOaHk!SvS@4oQII;WB{4 zpa;!f+<&2`7Kq~7@16tbK7sB#;UAK=rMRTJ;;o8E)MxQEKOPc5PC0<5E*C!C0>ur$ zrpU`v_E5lwhQHs}PXV~|9FW>)wuHmZ%$Q}q3!u1F_S^AajWeq}qPi56R60LGFKz*M zScKFn0nx#D0#@Q7k=!IfymsPI#94r|uWg-ATYsl<)EAvky$k@dV;~VIC;^lL9TT+H zg)!Ij!1MNT0M2_E*hcmIbphdwJMk#q+i_Xn?}MPa{c`o_lHI3^WA$)R%)3r|e4YV|7nf;JaOc^^m)8L-TfU49z?x;}gpz_SNb27=o-fOrjv9)l;l3`Ebyu=9)K?li{m zMi#isP85KPgB3Ql43M`y#*`=KE4z&rj>_-8Tyer>0>+x7nJTSBy*3oW$!v*`onZ}%ubdnX;b zKNQ-2-;?nZSCh~aIT`<^{{ZoXX4GMpDq8>m002ovPDHLkV1n+GVH6X8wEzGBc-o!L z$4&xJ6a>&`Z(#3&*bCSjiWSA)yCUlUe+8Tb7VJ!% ze@3^7Rc`p;mlvKnVv97lyfVol{bbprj||i7Ged%1MmeC7JMKBg|fnf{0U%CJQ diff --git a/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml b/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml index b5ffe874e..889e72ce0 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml +++ b/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml @@ -1,59 +1,60 @@ - - 1 - 1 - - - ColorEffect*, - 1 - 1 - 1 - 1 + + 1 + _ROUGH,_ROUGHNESS + _AO,_AMBIENT,_AMBIENTOCCLUSION + 0 + 1.0 + 1 + 1 + _NORMAL,_NORM + Bilinear + _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a, + _METAL,_MET,_METALNESS,_METALLIC + _SMOOTH,_SMOOTHNESS + _COMP,_COMPOSITE + N/A + 1 - 0 - 0 - 0 Z_AXIS - 1 + 0 TrailingNumber - 0 + 0 0 - - - 1.0 - 1 - Bilinear - 0 - _METAL,_MET,_METALNESS,_METALLIC - _NORMAL,_NORM - _AO,_AMBIENT,_AMBIENTOCCLUSION - N/A - 1 - _ROUGH,_ROUGHNESS - _SMOOTH,_SMOOTHNESS - _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a, - 1 - 1 - _COMP,_COMPOSITE - - - 1 - Col - CollisionMesh - 1 - LOS - CollisionMesh - - - 1.0 - 1.0 - 0 + 0 + 1 + 0 AutoPrune + + CollisionMesh + Col + CollisionMesh + 1 + LOS + 1 + + + ColorEffect*, + 1 + 1 + 1 + 1 + 1 + + + 1.0 + 0 + 1.0 + + + 1 + 1 + diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs index cd9c2ccd0..aa95fa029 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.cs @@ -1109,6 +1109,7 @@ function AssetListPanelInputs::onRightMouseDown(%this) function AssetBrowserFilterTree::onRightMouseDown(%this, %itemId) { + %count = %this.getSelectedItemsCount(); if( %this.getSelectedItemsCount() > 0 && %itemId != 1) { //AddNewAssetPopup.showPopup(Canvas); @@ -1127,6 +1128,10 @@ function AssetBrowserFilterTree::onRightMouseDown(%this, %itemId) EditFolderPopup.showPopup(Canvas); } } + else if(%itemId == 1) + { + AddNewModulePopup.showPopup(Canvas); + } } // @@ -1743,14 +1748,20 @@ function EWorldEditor::onControlDropped( %this, %payload, %position ) { echo("DROPPED A SHAPE ON THE EDITOR WINDOW!"); - %staticShapeObjDef = AssetDatabase.acquireAsset("Core_GameObjects:StaticShapeObject"); + /*%staticShapeObjDef = AssetDatabase.acquireAsset("Core_GameObjects:StaticShapeObject"); %newEntity = %staticShapeObjDef.createObject(); %newEntity.position = %pos; %newEntity-->MeshComponent.MeshAsset = %module @ ":" @ %asset; - %newEntity.dirtyGameObject = true; //because if we're specifically setting the mesh asset, it's dirty + %newEntity.dirtyGameObject = true; //because if we're specifically setting the mesh asset, it's dirty*/ + + %newEntity = new TSStatic() + { + position = %pos; + shapeAsset = %module @ ":" @ %asset; + }; getScene(0).add(%newEntity); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs index ab5e1832d..83fff992e 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs @@ -289,7 +289,7 @@ function AssetBrowser::addImportingAsset( %this, %assetType, %filePath, %parentA }; //little bit of interception here - if(%assetItem.assetType $= "Model") + /*if(%assetItem.assetType $= "Model") { %fileExt = fileExt(%assetItem.filePath); %shapeInfo = new GuiTreeViewCtrl(); @@ -328,7 +328,7 @@ function AssetBrowser::addImportingAsset( %this, %assetType, %filePath, %parentA %assetItem.delete(); return 0; } - } + }*/ if(%assetType $= "Material") { diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs index 7b65619cf..b41b67e87 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.cs @@ -118,6 +118,7 @@ function AssetBrowser::importImageAsset(%this, %assetItem) %assetId = %moduleName@":"@%assetName; %assetPath = AssetBrowser.currentAddress @ "/"; + %assetFullPath = %assetPath @ "/" @ fileName(%filePath); %newAsset = new ImageAsset() diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs index 6463da6e4..31bce609c 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.cs @@ -5,8 +5,10 @@ function AssetBrowser::createMaterialAsset(%this) %moduleName = AssetBrowser.newAssetSettings.moduleName; %modulePath = "data/" @ %moduleName; - %tamlpath = %modulePath @ "/materials/" @ %assetName @ ".asset.taml"; - %sgfPath = %modulePath @ "/materials/" @ %assetName @ ".sgf"; + %assetPath = AssetBrowser.currentAddress @ "/"; + + %tamlpath = %assetPath @ %assetName @ ".asset.taml"; + %sgfPath = %assetPath @ %assetName @ ".sgf"; %asset = new MaterialAsset() { @@ -225,7 +227,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem) %assetItem.AOImageAsset.skip = true; %assetItem.metalnessImageAsset.skip = true; - %compositeAssetPath = "data/" @ %assetItem.moduleName @ "/images"; + %compositeAssetPath = AssetBrowser.currentAddress @ "/"; %saveAsPath = %compositeAssetPath @ "/" @ %assetItem.assetName @ "_composite.png"; %compositeAsset = AssetBrowser.addImportingAsset("Image", "", %assetItem, %assetItem.assetName @ "_composite"); %compositeAsset.generatedAsset = true; @@ -303,6 +305,12 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem) { %dependencyAssetItem = ImportAssetTree.getItemObject(%childId); + if(%dependencyAssetItem.skip) + { + %childId = ImportAssetTree.getNextSibling(%childId); + continue; + } + %depAssetType = %dependencyAssetItem.assetType; if(%depAssetType $= "Image") { @@ -351,44 +359,45 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem) if(%assetItem.diffuseImageAsset !$= "") { - %diffuseAssetPath = "data/" @ %moduleName @ "/Images/" @ fileName(%assetItem.diffuseImageAsset.filePath); + %diffuseAssetPath = %assetPath @ fileName(%assetItem.diffuseImageAsset.filePath); + %file.writeline(" DiffuseMap[0] = \"" @ %diffuseAssetPath @"\";"); %file.writeline(" DiffuseMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.diffuseImageAsset.assetName @"\";"); } if(%assetItem.normalImageAsset) { - %normalAssetPath = "data/" @ %moduleName @ "/Images/" @ fileName(%assetItem.normalImageAsset.filePath); + %normalAssetPath = %assetPath @ fileName(%assetItem.normalImageAsset.filePath); %file.writeline(" NormalMap[0] = \"" @ %normalAssetPath @"\";"); %file.writeline(" NormalMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.normalImageAsset.assetName @"\";"); } - /*if(%assetItem.specularImageAsset) - { - %file.writeline(" SpecularMap[0] = \"" @ %assetItem.specularImageAsset.filePath @"\";"); - %file.writeline(" SpecularMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.specularImageAsset.assetName @"\";"); - }*/ if(%assetItem.roughnessImageAsset && %assetItem.roughnessImageAsset.skip == false) { - %file.writeline(" RoughMap[0] = \"" @ %assetItem.roughnessImageAsset.filePath @"\";"); + %roughAssetPath = %assetPath @ fileName(%assetItem.roughnessImageAsset.filePath); + %file.writeline(" RoughMap[0] = \"" @ %roughAssetPath @"\";"); %file.writeline(" RoughMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.roughnessImageAsset.assetName @"\";"); } if(%assetItem.smoothnessImageAsset && %assetItem.smoothnessImageAsset.skip == false) { - %file.writeline(" SmoothnessMap[0] = \"" @ %assetItem.smoothnessImageAsset.filePath @"\";"); + %smoothnessAssetPath = %assetPath @ fileName(%assetItem.smoothnessImageAsset.filePath); + %file.writeline(" SmoothnessMap[0] = \"" @ %smoothnessAssetPath @"\";"); %file.writeline(" SmoothnessMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.smoothnessImageAsset.assetName @"\";"); } if(%assetItem.metalnessImageAsset && %assetItem.metalnessImageAsset.skip == false) { - %file.writeline(" MetalMap[0] = \"" @ %assetItem.metalnessImageAsset.filePath @"\";"); + %metalAssetPath = %assetPath @ fileName(%assetItem.metalnessImageAsset.filePath); + %file.writeline(" MetalMap[0] = \"" @ %metalAssetPath @"\";"); %file.writeline(" MetalMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.metalnessImageAsset.assetName @"\";"); } if(%assetItem.AOImageAsset && %assetItem.AOImageAsset.skip == false) { - %file.writeline(" AOMap[0] = \"" @ %assetItem.AOImageAsset.filePath @"\";"); + %AOAssetPath = %assetPath @ fileName(%assetItem.AOImageAsset.filePath); + %file.writeline(" AOMap[0] = \"" @ %AOAssetPath @"\";"); %file.writeline(" AOMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.AOImageAsset.assetName @"\";"); } if(%assetItem.compositeImageAsset) { - %file.writeline(" CompositeMap[0] = \"" @ %assetItem.compositeImageAsset.filePath @"\";"); - %file.writeline(" CompositeMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.compositeImageAsset.assetName @"\";"); + %compAssetPath = %assetPath @ fileName(%assetItem.compositeImageAsset.filePath); + %file.writeline(" PBRConfigMap[0] = \"" @ %compAssetPath @"\";"); + %file.writeline(" PBRConfigMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.compositeImageAsset.assetName @"\";"); } %file.writeline("};"); %file.writeline("//--- OBJECT WRITE END ---"); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs index 81e56e18a..343456ab0 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.cs @@ -174,7 +174,7 @@ function AssetBrowser::importShapeAsset(%this, %assetItem) %assetImportSuccessful = false; %assetId = %moduleName@":"@%assetName; - %assetPath = "data/" @ %moduleName @ "/Shapes"; + %assetPath = AssetBrowser.currentAddress @ "/"; %assetFullPath = %assetPath @ "/" @ fileName(%filePath); %newAsset = new ShapeAsset() diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs index 88f2662c6..be2365bd9 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/popupMenus.cs @@ -15,7 +15,6 @@ function AssetBrowser::buildPopupMenus(%this) AddNewModulePopup.enableItem(1, false); } - if( !isObject( EditAssetPopup ) ) { new PopupMenu( EditAssetPopup ) diff --git a/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs b/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs index 6137b0f64..b3fa1f58e 100644 --- a/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs +++ b/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs @@ -324,7 +324,7 @@ function ESettingsWindow::getNavEditorSettings(%this) SettingsInspector.startGroup("Colors"); SettingsInspector.addSettingsField("WorldEditor/newLevelFile", "Hover Spline", "colorI", ""); - SettingsInspector.addSettingsField("WorldEditor/torsionPath", "Select Spline", "colorI", ""); + SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Select Spline", "colorI", ""); SettingsInspector.endGroup(); } @@ -348,10 +348,15 @@ function ESettingsWindow::getSceneEditorSettings(%this) SettingsInspector.endGroup(); SettingsInspector.startGroup("Misc"); + //SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Force Load DAE", "bool", ""); SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Force Load DAE", "bool", ""); SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterScalar", "Screen Center Scalar", "float", ""); SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterMax", "Screen Center Max", "float", ""); SettingsInspector.endGroup(); + + SettingsInspector.startGroup("Layout"); + SettingsInspector.addSettingsField("WorldEditor/forceSidebarToSide", "Force Sidebar Window(s) to side", "bool", "1"); + SettingsInspector.endGroup(); } function ESettingsWindow::getShapeEditorSettings(%this) diff --git a/Templates/BaseGame/game/tools/gui/profiles.ed.cs b/Templates/BaseGame/game/tools/gui/profiles.ed.cs index 313f0a70d..ba636263f 100644 --- a/Templates/BaseGame/game/tools/gui/profiles.ed.cs +++ b/Templates/BaseGame/game/tools/gui/profiles.ed.cs @@ -235,8 +235,12 @@ new GuiControlProfile (ToolsGuiAutoSizeTextProfile) if( !isObject( ToolsGuiMLTextProfile ) ) new GuiControlProfile( ToolsGuiMLTextProfile ) { - fontColorLink = "100 100 100"; - fontColorLinkHL = "255 255 255"; + fontColor = EditorSettings.value("Theme/fieldTextColor"); + fontColorHL = EditorSettings.value("Theme/fieldTextHLColor"); + fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor"); + + fontColorLink = EditorSettings.value("Theme/fieldTextColor"); + fontColorLinkHL = EditorSettings.value("Theme/fieldTextHLColor"); autoSizeWidth = true; autoSizeHeight = true; border = false; @@ -744,6 +748,8 @@ singleton GuiControlProfile( GuiInspectorTextEditProfile ) opaque = true; fillColor = EditorSettings.value("Theme/fieldBGColor"); fillColorHL = EditorSettings.value("Theme/fieldBGHLColor"); + fillColorSEL = EditorSettings.value("Theme/fieldBGSELColor"); + fillColorNA = EditorSettings.value("Theme/fieldBGSELColor"); // No Border (Rendered by field control) border = false; @@ -756,7 +762,7 @@ singleton GuiControlProfile( GuiInspectorTextEditProfile ) fontSize = 14; fontColor = EditorSettings.value("Theme/fieldTextColor"); - fontColorSEL = EditorSettings.value("Theme/fieldTextHLColor"); + fontColorSEL = EditorSettings.value("Theme/fieldBGSELColor"); fontColorHL = EditorSettings.value("Theme/fieldTextSELColor"); fontColorNA = EditorSettings.value("Theme/fieldTextSELColor"); category = "Editor"; @@ -798,6 +804,7 @@ singleton GuiControlProfile( GuiInspectorFieldProfile) opaque = true; fillColor = EditorSettings.value("Theme/fieldBGColor"); fillColorHL = EditorSettings.value("Theme/fieldBGHLColor"); + fillColorSEL = EditorSettings.value("Theme/fieldBGSELColor"); fillColorNA = EditorSettings.value("Theme/fieldBGSELColor"); // border color @@ -1203,6 +1210,7 @@ singleton GuiControlProfile (IconDropdownProfile) { border = -2; category = "Editor"; - bitmap = "./icon-dropdownbar"; - category = "Editor"; + //bitmap = "./icon-dropdownbar"; + + fillColor = "0 0 0"; }; \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui index ee92ab0c0..380e744ce 100644 --- a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui +++ b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui @@ -2775,6 +2775,7 @@ HorizSizing = "width"; new GuiTextCtrl() { + profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "9 4"; @@ -2783,6 +2784,7 @@ }; new GuiTextCtrl() { + profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "9 26"; @@ -3201,6 +3203,7 @@ Extent = "135 20"; new GuiTextCtrl(){ // u + profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "11 1"; @@ -3243,6 +3246,7 @@ Extent = "135 20"; new GuiTextCtrl(){ // v + profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "11 1"; @@ -3317,6 +3321,7 @@ Extent = "187 20"; new GuiTextCtrl(){ // Speed + profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "11 0"; @@ -3418,6 +3423,7 @@ Extent = "135 20"; new GuiTextCtrl(){ // u + profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "11 1"; @@ -3458,6 +3464,7 @@ Extent = "135 20"; new GuiTextCtrl(){ // v + profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "11 1"; @@ -3538,6 +3545,7 @@ Extent = "187 20"; new GuiTextCtrl(){ // Speed + profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "11 0"; diff --git a/Templates/BaseGame/game/tools/navEditor/NavEditorGui.gui b/Templates/BaseGame/game/tools/navEditor/NavEditorGui.gui index 2b96ce8af..e00dbf991 100644 --- a/Templates/BaseGame/game/tools/navEditor/NavEditorGui.gui +++ b/Templates/BaseGame/game/tools/navEditor/NavEditorGui.gui @@ -408,6 +408,7 @@ Margin = "0 0 3 3"; new GuiTextCtrl(){ + profile = "ToolsGuiTextProfile"; Profile = "GuiDefaultProfile"; HorizSizing = "right"; VertSizing = "bottom"; diff --git a/Templates/BaseGame/game/tools/settings.xml b/Templates/BaseGame/game/tools/settings.xml index fd6ac7bb7..53d9a8704 100644 --- a/Templates/BaseGame/game/tools/settings.xml +++ b/Templates/BaseGame/game/tools/settings.xml @@ -1,61 +1,192 @@ - + + 72 70 68 255 + 234 232 230 255 + 32 31 30 255 + 43 43 43 255 + 37 36 35 255 + 255 255 255 255 + 50 49 48 255 + 50 49 48 255 + 17 16 15 255 + 77 77 77 255 + 72 70 68 255 + 100 98 96 255 + 178 175 172 255 + 236 234 232 255 + 59 58 57 255 + 50 49 48 255 + 96 94 92 255 + 59 58 57 255 + 255 255 255 255 + + + 1 + 135 + 0 0 0 100 + 1 + 1 + 0 + 180 180 180 255 + 1 + 1 + 255 255 255 255 + 0.1 + 40 40 + 1 + 0 + 45 + + + Modern + screenCenter + 1 + 6 + WorldEditorInspectorPlugin + 0 + AssetWork_Debug.exe + 50 + 40 + + 1 + 8 + 20 + 0 + 255 + + + 1 + 1 + 1 + 1 + 1 + + + 50 50 50 255 + 180 180 180 255 + 255 255 255 255 + 215 215 215 255 + 48 48 48 255 + + + 1 + 1 + 102 102 102 100 + 255 255 255 100 + 51 51 51 100 + + + ../../../Documentation/Torque 3D - Script Manual.chm + http://www.garagegames.com/products/torque-3d/forums + ../../../Documentation/Official Documentation.html + http://www.garagegames.com/products/torque-3d/documentation/user + + + 255 255 255 255 + 100 100 100 255 + 255 0 0 255 + 0 0 255 255 + 255 255 0 255 + 0 255 0 255 + 255 255 0 255 + + + 0 + 0 + 0 + 2 + 0 + 100 + 1 + 1 + 0.01 + + + tools/worldEditor/images/LockedHandle + tools/worldEditor/images/DefaultHandle + tools/worldEditor/images/SelectHandle + + + Classic + + + + 15 + 0 + 0.8 + 0.8 + 0 + 100 + 1 + + 1 + 0 + 255 255 255 20 + 1 1 1 + 500 + 0 + + + 255 0 0 255 - 0 255 0 255 - DefaultRoadMaterialOther 10 - DefaultRoadMaterialTop + 5 + 0 255 0 255 + 255 255 255 255 0 0 1 lowerHeight - - 50 - 1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000 - 100 - 1 - 1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000 - 90 - 0 - 0.1 - 1 - 10 - - 40 40 40 40 1 1 + 40 40 ellipse + + 50 + 10 + 90 + 1 + 0 + 0.1 + 100 + 1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000 + 1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000 + 1 + - - 17 16 15 255 - 234 232 230 255 - 178 175 172 255 - 255 255 255 255 - 72 70 68 255 - 50 49 48 255 - 43 43 43 255 - 32 31 30 255 - 59 58 57 255 - 100 98 96 255 - 37 36 35 255 - 50 49 48 255 - 50 49 48 255 - 77 77 77 255 - 255 255 255 255 - 236 234 232 255 - 72 70 68 255 - 59 58 57 255 - 96 94 92 255 + + <AssetType>/ + <AssetType>/ + 1 + <AssetType>/ + <AssetType>/<SpecialAssetTag>/ + <AssetType>/OtherFolder/ + <AssetType>/ + <AssetType>/ + <AssetType>/<AssetName>/ + <AssetType>/<SpecialAssetTag>/ + TestConfig - tools/worldEditor/gui + tools/gui/messageBoxes 1024 768 - - Categorized + + 0 + 0 + 0 + + + ../../../Documentation/Official Documentation.html + http://www.garagegames.com/products/torque-3d/documentation/user + ../../../Documentation/Torque 3D - Script Manual.chm + + + 1 + 1 1 @@ -67,188 +198,57 @@ 1 1 - - 1 - 1 - - - http://www.garagegames.com/products/torque-3d/documentation/user - ../../../Documentation/Torque 3D - Script Manual.chm - ../../../Documentation/Official Documentation.html + + Categorized 0 - - 0 - 0 - 0 - - - 135 - 40 40 - 0.1 - 1 - 1 - 1 - 1 - 255 255 255 255 - 45 - 1 - 0 0 0 100 - 1 - 0 - 0 - 180 180 180 255 - - - 0 - AssetWork_Debug.exe - 50 - 40 - Modern - screenCenter - 1 - 6 - TerrainPainterPlugin - - tools/worldEditor/images/SelectHandle - tools/worldEditor/images/LockedHandle - tools/worldEditor/images/DefaultHandle - - - http://www.garagegames.com/products/torque-3d/documentation/user - http://www.garagegames.com/products/torque-3d/forums - ../../../Documentation/Official Documentation.html - ../../../Documentation/Torque 3D - Script Manual.chm - - - 215 215 215 255 - 255 255 255 255 - 50 50 50 255 - 48 48 48 255 - 180 180 180 255 - - - 102 102 102 100 - 255 255 255 100 - 51 51 51 100 - 1 - 1 - - - 1 - 8 - 20 - 0 - 255 - - - 1 - 0 - 0.01 - 1 - 0 - 100 - 0 - 0 - 2 - - - 1 - 1 - 1 - 1 - 1 - - - 0 0 255 255 - 255 0 0 255 - 0 255 0 255 - 255 255 0 255 - 255 255 255 255 - 255 255 0 255 - 100 100 100 255 - - - Classic - - - - <AssetType>/ - <AssetType>/<AssetName>/ - TestConfig - <AssetType>/ - <AssetType>/<SpecialAssetTag>/ - <AssetType>/ - <AssetType>/ - <AssetType>/<SpecialAssetTag>/ - 1 - <AssetType>/ - <AssetType>/OtherFolder/ - - - data/FPSGameplay/levels - - - 25 - - - 5 - - + + 10 + DefaultRoadMaterialTop + DefaultRoadMaterialOther + 0 0 1 + 255 0 0 255 + 0 255 0 255 + 1 TestConfig - 0 small - - 1 - DefaultPlayerData - AIPlayer - - - 0 0 1 - 255 0 0 255 - 10 - 5 - 255 255 255 255 - 0 255 0 255 - - - 15 - 0.8 - 0 - 0.8 - 1 - 0 - 100 - - 1 1 1 - 500 - 255 255 255 20 - 0 - 1 - 0 + + data/FPSGameplay/levels + + + 5 + + + 25 + - - Small - - - DefaultDecalRoadMaterial - 10 - 0 255 0 255 - 255 255 255 255 - Grid_512_Orange + + DefaultDecalRoadMaterial + 255 255 255 255 + 10 + 0 255 0 255 + + + AIPlayer + 1 + DefaultPlayerData + 1 + + Small + diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/Profiles.ed.cs b/Templates/BaseGame/game/tools/shapeEditor/gui/Profiles.ed.cs index cb42ef169..74a871479 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/Profiles.ed.cs +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/Profiles.ed.cs @@ -34,8 +34,15 @@ singleton GuiControlProfile(GuiShapeEdScrollProfile : GuiEditorScrollProfile) singleton GuiControlProfile(GuiShapeEdTextListProfile : ToolsGuiTextListProfile) { - // Customise the not-active font used for the header row - fontColorNA = "75 75 75"; + fontColor = EditorSettings.value("Theme/fieldTextColor"); + fontColorHL = EditorSettings.value("Theme/fieldTextHLColor"); + fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor"); + fontColorNA = EditorSettings.value("Theme/fieldTextNAColor"); + + fillColor = EditorSettings.value("Theme/fieldBGColor"); + fillColorHL = EditorSettings.value("Theme/fieldBGHLColor"); + fillColorSEL = EditorSettings.value("Theme/fieldBGSELColor"); + category = "Editor"; }; diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui index 4a4793072..405ce3ebc 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui @@ -431,6 +431,7 @@ canSaveDynamicFields = "0"; }; new GuiTextCtrl() { + Profile = "ToolsGuiTextProfile"; text = "Col Meshes"; position = "7 120"; extent = "56 16"; @@ -446,6 +447,7 @@ Variable = "ShapeEdShapeView.colMeshes"; }; new GuiTextCtrl() { + Profile = "ToolsGuiTextProfile"; text = "Col Polys"; position = "108 120"; extent = "43 16"; @@ -1417,6 +1419,7 @@ canSaveDynamicFields = "0"; new GuiTextCtrl() { + Profile = "ToolsGuiTextProfile"; text = "Fit Type"; position = "5 5"; extent = "41 16"; @@ -1434,6 +1437,7 @@ internalName = "colType"; }; new GuiTextCtrl() { + Profile = "ToolsGuiTextProfile"; text = "Fit Target"; position = "5 25"; extent = "45 16"; diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui index 79c298a27..8785db315 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui @@ -59,6 +59,7 @@ hovertime = "1000"; new GuiTextCtrl() { + Profile = "ToolsGuiTextProfile"; HorizSizing = "left"; VertSizing = "top"; position = "740 19"; diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui index 804706089..5e9f9b128 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui @@ -197,6 +197,7 @@ isContainer = true; new GuiTextCtrl() { // Header + Profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "5 1"; @@ -204,6 +205,7 @@ text = "Sequence Properties"; }; new GuiTextCtrl() { // Name + Profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "16 22"; @@ -402,6 +404,7 @@ // Triggers new GuiTextCtrl() { + Profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "5 0"; @@ -698,6 +701,7 @@ isContainer = true; new GuiTextCtrl() { + Profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "5 1"; @@ -1059,6 +1063,7 @@ isContainer = "1"; new GuiTextCtrl() { // Header + Profile = "ToolsGuiTextProfile"; text = "Detail/Object Properties"; position = "4 1"; extent = "112 16"; @@ -1321,6 +1326,7 @@ isContainer = true; new GuiTextCtrl() { // Header + Profile = "ToolsGuiTextProfile"; HorizSizing = "right"; VertSizing = "bottom"; position = "5 1"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui index 1e1a0c879..c2330f6de 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui @@ -853,7 +853,7 @@ canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "1"; - Profile = "ToolsGuiTransparentProfile"; + Profile = "ToolsGuiSolidDefaultProfile"; HorizSizing = "width"; VertSizing = "height"; Position = "5 5"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui index 64332f8a3..9805d31dd 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui @@ -347,6 +347,7 @@ }; }; new GuiCheckBoxCtrl() { + profile = "ToolsGuiCheckBoxProfile"; text = "Snap to object bounding box"; groupNum = "1"; useMouseEvents = "0"; @@ -775,6 +776,7 @@ }; }; new GuiCheckBoxCtrl() { + profile = "ToolsGuiCheckBoxProfile"; text = "Grid Snapping"; groupNum = "1"; useMouseEvents = "0"; @@ -794,6 +796,7 @@ canSaveDynamicFields = "0"; }; new GuiCheckBoxCtrl() { + profile = "ToolsGuiCheckBoxProfile"; text = "Use Group Center"; groupNum = "1"; useMouseEvents = "0"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorInspectorWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorInspectorWindow.ed.gui index bba30b60a..0063c9d01 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorInspectorWindow.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorInspectorWindow.ed.gui @@ -20,7 +20,7 @@ isContainer = "1"; Profile = "ToolsGuiWindowProfile"; Position = getWord($pref::Video::mode, 0) - 330 SPC - getWord(EditorGuiToolbar.extent, 1) + getWord(EWTreeWindow.extent, 1) + 40; + getWord(EditorGuiToolbar.extent, 1) + getWord(EWTreeWindow.extent, 1) + 40; Extent = "300 250"; MinExtent = "200 150"; HorizSizing = "windowRelative"; diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs index a3a883b64..c78b6743f 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs @@ -58,6 +58,12 @@ function EditorGui::init(%this) %this.add( EWTreeWindow ); EWTreeWindow-->EditorTree.selectPage( 0 ); EWTreeWindow.setVisible( false ); + + if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1) + { + EWTreeWindow.position = %this.extent.x - EWTreeWindow.Extent.x SPC EditorGuiToolbar.extent.y; + EWTreeWindow.extent = EWTreeWindow.extent.x SPC %this.extent.y - EditorGuiToolbar.extent.y - EditorGuiStatusBar.extent.y - 25; + } } } @@ -70,6 +76,12 @@ function EditorGui::init(%this) { %this.add( EWInspectorWindow ); EWInspectorWindow.setVisible( false ); + + if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1) + { + EWInspectorWindow.position = EWTreeWindow.position.x SPC EWTreeWindow.extent.y; + EWInspectorWindow.extent = EWTreeWindow.extent.x SPC EWTreeWindow.extent.y; + } } } @@ -1425,6 +1437,24 @@ function EWorldEditorAlignPopup::onSelect(%this, %id, %text) //----------------------------------------------------------------------------- +function EWorldEditor::onResize(%this, %newPosition, %newExtent) +{ + //if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1) + //{ + %treePos = %this.extent.x - (%this.extent.x * 0.2) SPC EditorGuiToolbar.extent.y; + %treeExt = %this.extent.x * 0.2 SPC (%this.extent.y * 0.5) - EditorGuiToolbar.extent.y - EditorGuiStatusBar.extent.y - 25; + + EWTreeWindow.resize(%treePos.x, %treePos.y, %treeExt.x, %treeExt.y); + //} + + //if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1) + //{ + %inspPos = EWTreeWindow.position.x SPC EWTreeWindow.position.y + EWTreeWindow.extent.y; + %inspExt = EWTreeWindow.extent.x SPC %this.extent.y - EWTreeWindow.extent.y - (EditorGuiStatusBar.extent.y * 2); + + EWInspectorWindow.resize(%inspPos.x, %inspPos.y, %inspExt.x, %inspExt.y); + //} +} //----------------------------------------------------------------------------- diff --git a/Tools/CMake/libraries/assimp.cmake b/Tools/CMake/libraries/assimp.cmake index e15687721..d9871b630 100644 --- a/Tools/CMake/libraries/assimp.cmake +++ b/Tools/CMake/libraries/assimp.cmake @@ -85,6 +85,7 @@ addDef(ASSIMP_BUILD_NO_MDL_IMPORTER) addDef(ASSIMP_BUILD_NO_MMD_IMPORTER) addDef(ASSIMP_BUILD_NO_NDO_IMPORTER) addDef(ASSIMP_BUILD_NO_NFF_IMPORTER) +#addDef(ASSIMP_BUILD_NO_OBJ_IMPORTER) addDef(ASSIMP_BUILD_NO_OFF_IMPORTER) addDef(ASSIMP_BUILD_NO_OGRE_IMPORTER) addDef(ASSIMP_BUILD_NO_OPENGEX_IMPORTER)