diff --git a/Engine/source/T3D/assets/GameObjectAsset.cpp b/Engine/source/T3D/assets/GameObjectAsset.cpp index 43b17f3de..df711875f 100644 --- a/Engine/source/T3D/assets/GameObjectAsset.cpp +++ b/Engine/source/T3D/assets/GameObjectAsset.cpp @@ -40,6 +40,8 @@ #include "assets/assetPtr.h" #endif +#include "T3D/entity.h" + // Debug Profiling. #include "platform/profiler.h" @@ -133,12 +135,14 @@ void GameObjectAsset::copyTo(SimObject* object) void GameObjectAsset::initializeAsset() { //Ensure we have an expanded filepath - mScriptFile = expandAssetFilePath(mScriptFile); + if (!Platform::isFullPath(mScriptFile)) + mScriptFile = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptFile; if (Platform::isFile(mScriptFile)) Con::executeFile(mScriptFile, false, false); - mTAMLFile = expandAssetFilePath(mTAMLFile); + if (!Platform::isFullPath(mTAMLFile)) + mTAMLFile = getOwned() ? expandAssetFilePath(mTAMLFile) : mTAMLFile; } void GameObjectAsset::onAssetRefresh() @@ -165,7 +169,7 @@ void GameObjectAsset::setScriptFile(const char* pScriptFile) return; // Update. - mScriptFile = expandAssetFilePath(pScriptFile); + mScriptFile = getOwned() ? expandAssetFilePath(pScriptFile) : pScriptFile; // Refresh the asset. refreshAsset(); @@ -185,7 +189,7 @@ void GameObjectAsset::setTAMLFile(const char* pTAMLFile) return; // Update. - mTAMLFile = expandAssetFilePath(pTAMLFile); + mTAMLFile = getOwned() ? expandAssetFilePath(pTAMLFile) : pTAMLFile; // Refresh the asset. refreshAsset(); @@ -218,7 +222,12 @@ const char* GameObjectAsset::create() } //Flag it so we know where it came from - pSimObject->setDataField("GameObject", nullptr, getAssetId()); + //Entity* e = dynamic_cast(pSimObject); + //e->_setGameObject(getAssetId()); + + StringTableEntry assetId = getAssetId(); + + pSimObject->setDataField(StringTable->insert("GameObject"), nullptr, getAssetId()); return pSimObject->getIdString(); } diff --git a/Engine/source/T3D/assets/ShapeAsset.cpp b/Engine/source/T3D/assets/ShapeAsset.cpp index 1766dea7c..93ca9d5c1 100644 --- a/Engine/source/T3D/assets/ShapeAsset.cpp +++ b/Engine/source/T3D/assets/ShapeAsset.cpp @@ -86,6 +86,7 @@ ConsoleSetType(TypeShapeAssetPtr) ShapeAsset::ShapeAsset() { + mFileName = StringTable->EmptyString(); } //----------------------------------------------------------------------------- @@ -129,6 +130,10 @@ void ShapeAsset::initializeAsset() ResourceManager::get().getChangedSignal().notify(this, &ShapeAsset::_onResourceChanged); + //Ensure our path is expando'd if it isn't already + if (!Platform::isFullPath(mFileName)) + mFileName = getOwned() ? expandAssetFilePath(mFileName) : mFileName; + loadShape(); } @@ -144,8 +149,7 @@ void ShapeAsset::setShapeFile(const char* pShapeFile) if (pShapeFile == mFileName) return; - // Update. - mFileName = getOwned() ? expandAssetFilePath(pShapeFile) : StringTable->insert(pShapeFile); + mFileName = pShapeFile; // Refresh the asset. refreshAsset(); @@ -156,6 +160,8 @@ void ShapeAsset::_onResourceChanged(const Torque::Path &path) if (path != Torque::Path(mFileName) ) return; + refreshAsset(); + loadShape(); } @@ -268,9 +274,13 @@ void ShapeAsset::copyTo(SimObject* object) void ShapeAsset::onAssetRefresh(void) { - if (dStrcmp(mFileName, "") == 0) + if (mFileName == StringTable->EmptyString()) return; + // Update. + if(!Platform::isFullPath(mFileName)) + mFileName = getOwned() ? expandAssetFilePath(mFileName) : mFileName; + loadShape(); } @@ -405,4 +415,4 @@ bool GuiInspectorTypeShapeAssetPtr::updateRects() } return resized; -} \ No newline at end of file +} diff --git a/Engine/source/T3D/entity.cpp b/Engine/source/T3D/entity.cpp index 25f3c9e53..cf4885f9f 100644 --- a/Engine/source/T3D/entity.cpp +++ b/Engine/source/T3D/entity.cpp @@ -157,8 +157,7 @@ void Entity::initPersistFields() endGroup("Misc"); addGroup("GameObject"); - addProtectedField("GameObject", TypeGameObjectAssetPtr, Offset(mGameObjectAsset, Entity), &_setGameObject, &defaultProtectedGetFn, - "The asset Id used for the game object this entity is based on."); + addField("GameObject", TypeGameObjectAssetPtr, Offset(mGameObjectAsset, Entity), "The asset Id used for the game object this entity is based on."); addField("dirtyGameObject", TypeBool, Offset(mDirtyGameObject, Entity), "If this entity is a GameObject, it flags if this instance delinates from the template.", AbstractClassRep::FieldFlags::FIELD_HideInInspectors); @@ -246,7 +245,7 @@ bool Entity::onAdd() if (isServerObject()) { setMaskBits(TransformMask); - setMaskBits(NamespaceMask); + //setMaskBits(NamespaceMask); } else { @@ -2019,4 +2018,4 @@ DefineEngineFunction(findEntitiesByTag, const char*, (SimGroup* searchingGroup, } object->notifyComponents(signalFunction, argA, argB, argC, argD, argE);*/ -} \ No newline at end of file +} diff --git a/Engine/source/T3D/entity.h b/Engine/source/T3D/entity.h index b26814b17..0b1831a04 100644 --- a/Engine/source/T3D/entity.h +++ b/Engine/source/T3D/entity.h @@ -85,9 +85,6 @@ private: StringTableEntry mGameObjectAssetId; AssetPtr mGameObjectAsset; - //Marked if this entity is a GameObject and deliniates from the parent GO asset - bool mDirtyGameObject; - ContainerQueryInfo containerInfo; bool mInitialized; @@ -100,6 +97,8 @@ private: S32 mLifetimeMS; protected: + //Marked if this entity is a GameObject and deliniates from the parent GO asset + bool mDirtyGameObject; virtual void processTick(const Move* move); virtual void advanceTime(F32 dt); diff --git a/Engine/source/T3D/gameObjects/aiPlayerObject.cpp b/Engine/source/T3D/gameObjects/aiPlayerObject.cpp index 2eca3e0b8..1742c5dff 100644 --- a/Engine/source/T3D/gameObjects/aiPlayerObject.cpp +++ b/Engine/source/T3D/gameObjects/aiPlayerObject.cpp @@ -3,9 +3,9 @@ IMPLEMENT_CO_NETOBJECT_V1(AIPlayerObject); AIPlayerObject::AIPlayerObject() - : mAIControllerComponent(nullptr) + //: mAIControllerComponent(nullptr) { - + mSuperClassName = StringTable->insert("Entity"); } AIPlayerObject::~AIPlayerObject() { @@ -21,7 +21,7 @@ bool AIPlayerObject::onAdd() if (!mDirtyGameObject) { //AI Controller - mAIControllerComponent = new AIControllerComponent(); + /*mAIControllerComponent = new AIControllerComponent(); if (!mAIControllerComponent->registerObject()) { Con::errorf("PlayerObject::onAdd - unable to add mAIControllerComponent!"); @@ -30,7 +30,7 @@ bool AIPlayerObject::onAdd() mAIControllerComponent->setInternalName("aiControllerComponent"); - addComponent(mAIControllerComponent); + addComponent(mAIControllerComponent);*/ } return true; @@ -39,4 +39,4 @@ bool AIPlayerObject::onAdd() void AIPlayerObject::onRemove() { Parent::onRemove(); -} \ No newline at end of file +} diff --git a/Engine/source/T3D/gameObjects/aiPlayerObject.h b/Engine/source/T3D/gameObjects/aiPlayerObject.h index 72aeb3ff0..f79dd2b60 100644 --- a/Engine/source/T3D/gameObjects/aiPlayerObject.h +++ b/Engine/source/T3D/gameObjects/aiPlayerObject.h @@ -1,13 +1,13 @@ #pragma once #include "playerObject.h" -#include "T3D/components/ai/aiControllerComponent.h" +//#include "T3D/components/ai/aiControllerComponent.h" class AIPlayerObject : public PlayerObject { typedef PlayerObject Parent; - AIControllerComponent* mAIControllerComponent; + //AIControllerComponent* mAIControllerComponent; public: AIPlayerObject(); @@ -17,4 +17,4 @@ public: virtual void onRemove(); DECLARE_CONOBJECT(AIPlayerObject); -}; \ No newline at end of file +}; diff --git a/Engine/source/T3D/gameObjects/playerObject.cpp b/Engine/source/T3D/gameObjects/playerObject.cpp index 1ee38bf3a..1028ba0f9 100644 --- a/Engine/source/T3D/gameObjects/playerObject.cpp +++ b/Engine/source/T3D/gameObjects/playerObject.cpp @@ -5,10 +5,10 @@ IMPLEMENT_CO_NETOBJECT_V1(PlayerObject); PlayerObject::PlayerObject() : mMeshComponent(nullptr), mCollisionComponent(nullptr), - mAnimationComponent(nullptr), + //mAnimationComponent(nullptr), mPhysicsComponent(nullptr) { - + mSuperClassName = StringTable->insert("Entity"); } PlayerObject::~PlayerObject() { @@ -48,7 +48,7 @@ bool PlayerObject::onAdd() addComponent(mCollisionComponent); //Animation - mAnimationComponent = new ActionAnimationComponent(); + /*mAnimationComponent = new ActionAnimationComponent(); if (!mAnimationComponent->registerObject()) { Con::errorf("PlayerObject::onAdd - unable to add ActionAnimationComponent!"); @@ -69,7 +69,7 @@ bool PlayerObject::onAdd() mArmAnimationComponent->setInternalName("armAnimationComponent"); - addComponent(mArmAnimationComponent); + addComponent(mArmAnimationComponent);*/ //Physics control mPhysicsComponent = new PlayerControllerComponent(); @@ -162,4 +162,4 @@ bool PlayerObject::onAdd() void PlayerObject::onRemove() { Parent::onRemove(); -} \ No newline at end of file +} diff --git a/Engine/source/T3D/gameObjects/playerObject.h b/Engine/source/T3D/gameObjects/playerObject.h index 8c089f77b..04f88d94a 100644 --- a/Engine/source/T3D/gameObjects/playerObject.h +++ b/Engine/source/T3D/gameObjects/playerObject.h @@ -3,8 +3,8 @@ #include "T3D/entity.h" #include "T3D/components/render/meshComponent.h" #include "T3D/components/collision/shapeCollisionComponent.h" -#include "T3D/components/animation/actionAnimationComponent.h" -#include "T3D/components/animation/armAnimationComponent.h" +//#include "T3D/components/animation/actionAnimationComponent.h" +//#include "T3D/components/animation/armAnimationComponent.h" #include "T3D/components/physics/playerControllerComponent.h" #include "T3D/components/game/stateMachineComponent.h" #include "T3D/components/camera/cameraComponent.h" @@ -19,8 +19,8 @@ class PlayerObject : public Entity MeshComponent* mMeshComponent; ShapeCollisionComponent* mCollisionComponent; - ActionAnimationComponent* mAnimationComponent; - ArmAnimationComponent* mArmAnimationComponent; + //ActionAnimationComponent* mAnimationComponent; + //ArmAnimationComponent* mArmAnimationComponent; PlayerControllerComponent* mPhysicsComponent; StateMachineComponent* mStateMachineComponent; CameraComponent* mCameraComponent; @@ -37,4 +37,4 @@ public: virtual void onRemove(); DECLARE_CONOBJECT(PlayerObject); -}; \ No newline at end of file +}; diff --git a/Engine/source/T3D/gameObjects/soundEmitterObject.cpp b/Engine/source/T3D/gameObjects/soundEmitterObject.cpp index 2ce1eeafb..383643964 100644 --- a/Engine/source/T3D/gameObjects/soundEmitterObject.cpp +++ b/Engine/source/T3D/gameObjects/soundEmitterObject.cpp @@ -1,11 +1,11 @@ -#include "SoundEmitterObject.h" +#include "soundEmitterObject.h" IMPLEMENT_CO_NETOBJECT_V1(SoundEmitterObject); SoundEmitterObject::SoundEmitterObject() : mSoundComponent(nullptr) { - + mSuperClassName = StringTable->insert("Entity"); } SoundEmitterObject::~SoundEmitterObject() { @@ -35,4 +35,4 @@ bool SoundEmitterObject::onAdd() void SoundEmitterObject::onRemove() { Parent::onRemove(); -} \ No newline at end of file +} diff --git a/Engine/source/T3D/gameObjects/soundEmitterObject.h b/Engine/source/T3D/gameObjects/soundEmitterObject.h index f877ced1c..e3a3c10b8 100644 --- a/Engine/source/T3D/gameObjects/soundEmitterObject.h +++ b/Engine/source/T3D/gameObjects/soundEmitterObject.h @@ -1,7 +1,7 @@ #pragma once #include "T3D/entity.h" -#include "T3D/components/audio/soundComponent.h" +#include "T3D/components/audio/SoundComponent.h" class SoundEmitterObject : public Entity { @@ -17,4 +17,4 @@ public: virtual void onRemove(); DECLARE_CONOBJECT(SoundEmitterObject); -}; \ No newline at end of file +}; diff --git a/Engine/source/T3D/gameObjects/staticShapeObject.cpp b/Engine/source/T3D/gameObjects/staticShapeObject.cpp index 037e089b1..b389a3211 100644 --- a/Engine/source/T3D/gameObjects/staticShapeObject.cpp +++ b/Engine/source/T3D/gameObjects/staticShapeObject.cpp @@ -7,7 +7,6 @@ StaticShapeObject::StaticShapeObject() mCollisionComponent(nullptr), mAnimationComponent(nullptr) { - } StaticShapeObject::~StaticShapeObject() { @@ -65,4 +64,4 @@ bool StaticShapeObject::onAdd() void StaticShapeObject::onRemove() { Parent::onRemove(); -} \ No newline at end of file +} diff --git a/Engine/source/assets/assetManager.cpp b/Engine/source/assets/assetManager.cpp index 2018dd57c..a2a51803f 100644 --- a/Engine/source/assets/assetManager.cpp +++ b/Engine/source/assets/assetManager.cpp @@ -70,6 +70,9 @@ #ifndef MATERIALASSET_H #include "T3D/assets/MaterialAsset.h" #endif +#ifndef GAME_OBJECT_ASSET_H +#include "T3D/assets/GameObjectAsset.h" +#endif // Script bindings. #include "assetManager_ScriptBinding.h" @@ -272,10 +275,16 @@ bool AssetManager::loadModuleAutoLoadAssets(ModuleDefinition* pModuleDefinition) { assetBase = mTaml.read(assetDef->mAssetBaseFilePath); } + else if (assetDef->mAssetType == StringTable->insert("GameObjectAsset")) + { + assetBase = mTaml.read(assetDef->mAssetBaseFilePath); + } //load the asset now if valid if (assetBase) - addPrivateAsset(assetBase); + { + assetBase->setOwned(this, assetDef); + } } } } diff --git a/Engine/source/renderInstance/renderProbeMgr.cpp b/Engine/source/renderInstance/renderProbeMgr.cpp index bced3a345..dfe01b332 100644 --- a/Engine/source/renderInstance/renderProbeMgr.cpp +++ b/Engine/source/renderInstance/renderProbeMgr.cpp @@ -658,8 +658,11 @@ void RenderProbeMgr::_update4ProbeConsts(const SceneData &sgData, shaderConsts->setSafe(probeShaderConsts->mProbeBoxMinSC, probeBoxMinArray); shaderConsts->setSafe(probeShaderConsts->mProbeBoxMaxSC, probeBoxMaxArray); shaderConsts->setSafe(probeShaderConsts->mProbeConfigDataSC, probeConfigArray); - GFX->setCubeArrayTexture(probeShaderConsts->mProbeSpecularCubemapSC->getSamplerRegister(), mPrefilterArray); - GFX->setCubeArrayTexture(probeShaderConsts->mProbeIrradianceCubemapSC->getSamplerRegister(), mIrradianceArray); + + if(probeShaderConsts->mProbeSpecularCubemapSC->getSamplerRegister() != -1) + GFX->setCubeArrayTexture(probeShaderConsts->mProbeSpecularCubemapSC->getSamplerRegister(), mPrefilterArray); + if(probeShaderConsts->mProbeIrradianceCubemapSC->getSamplerRegister() != -1) + GFX->setCubeArrayTexture(probeShaderConsts->mProbeIrradianceCubemapSC->getSamplerRegister(), mIrradianceArray); } if (probeShaderConsts->mBRDFTextureMap->isValid()) diff --git a/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.cs b/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.cs index 204352142..93362577e 100644 --- a/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.cs +++ b/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.cs @@ -1,4 +1,3 @@ - function Core_GameObjects::onCreate(%this) { } diff --git a/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.module b/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.module index 48c225a50..87ba2231f 100644 --- a/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.module +++ b/Templates/BaseGame/game/core/gameObjects/Core_GameObjects.module @@ -10,10 +10,10 @@ canSave="true" canSaveDynamicFields="true" Extension="asset.taml" - Recurse="true" /> + Recurse="true"/> + Recurse="true"/> \ No newline at end of file diff --git a/Templates/BaseGame/game/core/gameObjects/gameObjects/AIPlayerObject.asset.taml b/Templates/BaseGame/game/core/gameObjects/gameObjects/AIPlayerObject.asset.taml index f8b4829c6..71659bdc7 100644 --- a/Templates/BaseGame/game/core/gameObjects/gameObjects/AIPlayerObject.asset.taml +++ b/Templates/BaseGame/game/core/gameObjects/gameObjects/AIPlayerObject.asset.taml @@ -3,6 +3,6 @@ canSaveDynamicFields="true" AssetName="AIPlayerObject" gameObjectName="AIPlayerObject" - scriptFilePath="core/gameObjects/gameObjects/AIPlayerObject.cs" - TAMLFilePath="core/gameObjects/gameObjects/AIPlayerObject.taml" + scriptFile="AIPlayerObject.cs" + TAMLFile="AIPlayerObject.taml" description="A basic AI Player Object example." /> diff --git a/Templates/BaseGame/game/core/gameObjects/gameObjects/PlayerObject.asset.taml b/Templates/BaseGame/game/core/gameObjects/gameObjects/PlayerObject.asset.taml index 67c2b6e1d..a8f127099 100644 --- a/Templates/BaseGame/game/core/gameObjects/gameObjects/PlayerObject.asset.taml +++ b/Templates/BaseGame/game/core/gameObjects/gameObjects/PlayerObject.asset.taml @@ -3,6 +3,6 @@ canSaveDynamicFields="true" AssetName="PlayerObject" gameObjectName="PlayerObject" - scriptFilePath="core/gameObjects/gameObjects/PlayerObject.cs" - TAMLFilePath="core/gameObjects/gameObjects/PlayerObject.taml" + scriptFile="PlayerObject.cs" + TAMLFile="PlayerObject.taml" description="A basic Player Object example." /> diff --git a/Templates/BaseGame/game/core/gameObjects/gameObjects/soundEmitterObject.asset.taml b/Templates/BaseGame/game/core/gameObjects/gameObjects/soundEmitterObject.asset.taml index 279f4fc6d..786a68398 100644 --- a/Templates/BaseGame/game/core/gameObjects/gameObjects/soundEmitterObject.asset.taml +++ b/Templates/BaseGame/game/core/gameObjects/gameObjects/soundEmitterObject.asset.taml @@ -3,5 +3,5 @@ canSaveDynamicFields="true" AssetName="soundEmitterObject" gameObjectName="soundEmitterObject" - TAMLFilePath="core/gameObjects/gameObjects/soundEmitterObject.taml" + TAMLFile="soundEmitterObject.taml" description="A basic sound emitter example." /> \ No newline at end of file diff --git a/Templates/BaseGame/game/core/gameObjects/gameObjects/staticShapeObject.asset.taml b/Templates/BaseGame/game/core/gameObjects/gameObjects/staticShapeObject.asset.taml index 659b4c9bb..8374939a9 100644 --- a/Templates/BaseGame/game/core/gameObjects/gameObjects/staticShapeObject.asset.taml +++ b/Templates/BaseGame/game/core/gameObjects/gameObjects/staticShapeObject.asset.taml @@ -3,5 +3,5 @@ canSaveDynamicFields="true" AssetName="StaticShapeObject" gameObjectName="StaticShapeObject" - TAMLFilePath="core/gameObjects/gameObjects/staticShapeObject.taml" + TAMLFile="staticShapeObject.taml" description="A basic static shape example." /> \ No newline at end of file diff --git a/Templates/BaseGame/game/core/utility/scripts/helperFunctions.cs b/Templates/BaseGame/game/core/utility/scripts/helperFunctions.cs index d620d08b1..a12e902c5 100644 --- a/Templates/BaseGame/game/core/utility/scripts/helperFunctions.cs +++ b/Templates/BaseGame/game/core/utility/scripts/helperFunctions.cs @@ -198,56 +198,6 @@ function getPrefpath() return $prefPath; } -function updateTSShapeLoadProgress(%progress, %msg) -{ - // Check if the loading GUI is visible and use that instead of the - // separate import progress GUI if possible - /* if ( isObject(LoadingGui) && LoadingGui.isAwake() ) - { - // Save/Restore load progress at the start/end of the import process - if ( %progress == 0 ) - { - ColladaImportProgress.savedProgress = LoadingProgress.getValue(); - ColladaImportProgress.savedText = LoadingProgressTxt.getValue(); - - ColladaImportProgress.msgPrefix = "Importing " @ %msg; - %msg = "Reading file into memory..."; - } - else if ( %progress == 1.0 ) - { - LoadingProgress.setValue( ColladaImportProgress.savedProgress ); - LoadingProgressTxt.setValue( ColladaImportProgress.savedText ); - } - - %msg = ColladaImportProgress.msgPrefix @ ": " @ %msg; - - %progressCtrl = LoadingProgress; - %textCtrl = LoadingProgressTxt; - } - else - { - //it's probably the editors using it - if(isFunction("updateToolTSShapeLoadProgress")) - { - updateToolTSShapeLoadProgress(%progress, %msg); - } - } - - // Update progress indicators - if (%progress == 0) - { - %progressCtrl.setValue(0.001); - %textCtrl.setText(%msg); - } - else if (%progress != 1.0) - { - %progressCtrl.setValue(%progress); - %textCtrl.setText(%msg); - } - - Canvas.repaint(33);*/ -} - /// A helper function which will return the ghosted client object /// from a server object when connected to a local server. function serverToClientObject( %serverObject ) diff --git a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/materials.cs b/Templates/BaseGame/game/data/StaticShapeTest/Shapes/materials.cs index 859c1cc94..a0d4bf684 100644 --- a/Templates/BaseGame/game/data/StaticShapeTest/Shapes/materials.cs +++ b/Templates/BaseGame/game/data/StaticShapeTest/Shapes/materials.cs @@ -3,9 +3,17 @@ singleton Material(Grid_512_Orange) { mapTo = "Grid_512_orange"; diffuseColor[0] = "0.8 0.8 0.8 1"; - diffuseMap[0] = "E:/Gamedev/T3DMIT/clangtest/Templates/Full/game/core/art/grids/Grid_512_orange.png"; + diffuseMap[0] = "tools/base/images/512_orange.png"; specular[0] = "0.8 0.8 0.8 1"; specularPower[0] = "0.25"; specularStrength[0] = "25"; - translucentBlendOp = "None"; + translucentBlendOp = "Add"; + smoothness[0] = "0.941176"; + metalness[0] = "1"; + DiffuseMapAsset0 = "StaticShapeTest:Grid_512_orange_ALBEDO"; + specularStrength0 = "25"; + specular0 = "0.8 0.8 0.8 1"; + specularPower0 = "0.25"; + emissive[0] = "1"; + translucent = "1"; }; diff --git a/Templates/BaseGame/game/data/shaderCache/autogenConditioners.h b/Templates/BaseGame/game/data/shaderCache/autogenConditioners.h index ce64bfb4b..e8b089810 100644 --- a/Templates/BaseGame/game/data/shaderCache/autogenConditioners.h +++ b/Templates/BaseGame/game/data/shaderCache/autogenConditioners.h @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // Autogenerated 'GBuffer Conditioner' Condition Method //------------------------------------------------------------------------------ -inline float4 autogenCondition_55070f7a(in float4 unconditionedOutput) +vec4 autogenCondition_55070f7a(vec4 unconditionedOutput) { // g-buffer conditioner: float4(normal.X, normal.Y, depth Hi, depth Lo) float4 _gbConditionedOutput = float4(sqrt(half(2.0/(1.0 - unconditionedOutput.y))) * half2(unconditionedOutput.xz), 0.0, unconditionedOutput.a); @@ -18,10 +18,10 @@ inline float4 autogenCondition_55070f7a(in float4 unconditionedOutput) //------------------------------------------------------------------------------ // Autogenerated 'GBuffer Conditioner' Uncondition Method //------------------------------------------------------------------------------ -inline float4 autogenUncondition_55070f7a(SamplerState deferredSamplerVar, Texture2D deferredTexVar, float2 screenUVVar) +float4 autogenUncondition_55070f7a(sampler2D deferredSamplerVar, float2 screenUVVar) { // Sampler g-buffer - float4 bufferSample = deferredTexVar.SampleLevel(deferredSamplerVar, screenUVVar,0); +float4 bufferSample = tex2Dlod(deferredSamplerVar, float4(screenUVVar,0,0)); // g-buffer unconditioner: float4(normal.X, normal.Y, depth Hi, depth Lo) float2 _inpXY = bufferSample.xy; float _xySQ = dot(_inpXY, _inpXY); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs index 1d23574b9..8ff07e492 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImport.cs @@ -71,6 +71,9 @@ function AssetBrowser::onBeginDropFiles( %this ) %this.importAssetUnprocessedListArray.empty(); %this.importAssetFinalListArray.empty(); + //prep the import control + Canvas.pushDialog(AssetImportCtrl); + AssetImportCtrl.setHidden(true); ImportAssetTree.clear(); AssetBrowser.unprocessedAssetsCount = 0; } @@ -270,7 +273,7 @@ function AssetBrowser::onEndDropFiles( %this ) return; //we have assets to import, so go ahead and display the window for that now - Canvas.pushDialog(AssetImportCtrl); + AssetImportCtrl.setHidden(false); ImportAssetWindow.visible = true; //ImportAssetWindow.validateAssets(); ImportAssetWindow.refresh(); diff --git a/Templates/BaseGame/game/tools/settings.xml b/Templates/BaseGame/game/tools/settings.xml index 55d6d5d80..e099e13cf 100644 --- a/Templates/BaseGame/game/tools/settings.xml +++ b/Templates/BaseGame/game/tools/settings.xml @@ -1,84 +1,84 @@ - - 0 - WorldEditorInspectorPlugin - 6 - screenCenter - 50 - 40 - 1 - - 8 - 20 - 255 - 0 - 1 - - - 255 255 0 255 - 255 0 0 255 - 255 255 0 255 - 0 255 0 255 - 0 0 255 255 - 100 100 100 255 - White - - - 1 - 1 - 1 - 1 - 1 - - - tools/worldEditor/images/SelectHandle - tools/worldEditor/images/DefaultHandle - tools/worldEditor/images/LockedHandle - - - 1 - 0 - 102 102 102 100 - 255 255 255 100 - 51 51 51 100 - - - 2 - 0 - 0 - 1 - 1 - 100 - 0 - - - http://www.garagegames.com/products/torque-3d/forums - ../../../Documentation/Torque 3D - Script Manual.chm - http://www.garagegames.com/products/torque-3d/documentation/user - ../../../Documentation/Official Documentation.html - - - - AIPlayer - + 100 + 0.8 15 0 0 1 0.8 - 100 - 0.8 - 0 - 10 10 10 500 - 0 255 255 255 20 0 + 10 10 10 + 0 + 0 + + 6 + screenCenter + 50 + 40 + 1 + 0 + WorldEditorInspectorPlugin + + 0 + 51 51 51 100 + 102 102 102 100 + 1 + 255 255 255 100 + + + http://www.garagegames.com/products/torque-3d/forums + http://www.garagegames.com/products/torque-3d/documentation/user + ../../../Documentation/Torque 3D - Script Manual.chm + ../../../Documentation/Official Documentation.html + + + 1 + 1 + 1 + 1 + 1 + + + 255 0 0 255 + 255 255 0 255 + 255 255 255 255 + 100 100 100 255 + 0 0 255 255 + 255 255 0 255 + 0 255 0 255 + + + 1 + 0 + 255 + 20 + 8 + + + tools/worldEditor/images/SelectHandle + tools/worldEditor/images/LockedHandle + tools/worldEditor/images/DefaultHandle + + + 1 + 0 + 0 + 0 + 2 + 100 + 1 + + + + AIPlayer + data/FPSGameplay/levels diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs index 4a1f114c3..b4d843345 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs @@ -854,6 +854,11 @@ function WorldEditorPlugin::onActivated( %this ) EWorldEditor.makeFirstResponder(true); EditorTree.open($scenesRootGroup,true); EWCreatorWindow.setNewObjectGroup(getScene(0)); + + EditorTree.expandItem(1); + EditorTree.buildVisibleTree(true); + EditorTree.expandItem(2); + EditorTree.buildVisibleTree(true); EWorldEditor.syncGui(); diff --git a/Tools/CMake/basics.cmake b/Tools/CMake/basics.cmake index 970518f0f..5b040520c 100644 --- a/Tools/CMake/basics.cmake +++ b/Tools/CMake/basics.cmake @@ -29,7 +29,7 @@ elseif( CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 4 ) endif() if(NOT TORQUE_TEMPLATE) - set(TORQUE_TEMPLATE "Full" CACHE STRING "the template to use") + set(TORQUE_TEMPLATE "BaseGame" CACHE STRING "the template to use") endif() if(NOT TORQUE_APP_DIR) set(TORQUE_APP_DIR "${CMAKE_SOURCE_DIR}/My Projects/${TORQUE_APP_NAME}") diff --git a/Tools/CMake/torque3d.cmake b/Tools/CMake/torque3d.cmake index 2a0f187b0..0af729549 100644 --- a/Tools/CMake/torque3d.cmake +++ b/Tools/CMake/torque3d.cmake @@ -338,6 +338,7 @@ addPath("${srcDir}/T3D/sfx") addPath("${srcDir}/T3D/gameBase") addPath("${srcDir}/T3D/turret") addPath("${srcDir}/T3D/lighting") +addPath("${srcDir}/T3D/gameObjects") addPathRec("${srcDir}/T3D/components/") addPathRec("${srcDir}/T3D/systems")