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 cfb8eec01..62283f15a 100644 Binary files a/Templates/BaseGame/game/core/gui/scripts/fonts/ArialItalic 14 (ansi).uft and b/Templates/BaseGame/game/core/gui/scripts/fonts/ArialItalic 14 (ansi).uft differ diff --git a/Templates/BaseGame/game/core/gui/scripts/fonts/Lucida Console 12 (ansi).uft b/Templates/BaseGame/game/core/gui/scripts/fonts/Lucida Console 12 (ansi).uft index 30d11e7ce..e8bc0375f 100644 Binary files a/Templates/BaseGame/game/core/gui/scripts/fonts/Lucida Console 12 (ansi).uft and b/Templates/BaseGame/game/core/gui/scripts/fonts/Lucida Console 12 (ansi).uft differ 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)