From cac068d2c5b219749cef86f6ed097835c638003f Mon Sep 17 00:00:00 2001 From: JeffR Date: Sat, 17 May 2025 18:41:15 -0500 Subject: [PATCH] Adds the necessary ifdef flags to re-enable the ability to build with tools disabled --- Engine/source/T3D/SceneGroup.cpp | 3 +++ Engine/source/T3D/SubScene.cpp | 3 +++ Engine/source/T3D/assets/ImageAsset.cpp | 3 ++- Engine/source/T3D/assets/SubSceneAsset.cpp | 3 ++- Engine/source/T3D/sfx/sfxEmitter.cpp | 3 ++- Engine/source/T3D/sfx/sfxEmitter.h | 2 ++ 6 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Engine/source/T3D/SceneGroup.cpp b/Engine/source/T3D/SceneGroup.cpp index 4e250e02a..28f6fefb8 100644 --- a/Engine/source/T3D/SceneGroup.cpp +++ b/Engine/source/T3D/SceneGroup.cpp @@ -117,6 +117,8 @@ void SceneGroup::inspectPostApply() void SceneGroup::onInspect(GuiInspector* inspector) { Parent::onInspect(inspector); + +#ifdef TORQUE_TOOLS //Put the SubScene group before everything that'd be SubScene-effecting, for orginazational purposes GuiInspectorGroup* sceneGroupGrp = inspector->findExistentGroup(StringTable->insert("Editing")); @@ -154,6 +156,7 @@ void SceneGroup::onInspect(GuiInspector* inspector) regenButton->setConsoleCommand(rgBuffer); regenFieldGui->addObject(regenButton); +#endif } void SceneGroup::setTransform(const MatrixF& mat) diff --git a/Engine/source/T3D/SubScene.cpp b/Engine/source/T3D/SubScene.cpp index 2b773bfd6..02a0d8a54 100644 --- a/Engine/source/T3D/SubScene.cpp +++ b/Engine/source/T3D/SubScene.cpp @@ -129,6 +129,8 @@ void SubScene::onInspect(GuiInspector* inspector) { Parent::onInspect(inspector); +#ifdef TORQUE_TOOLS + //Put the SubScene group before everything that'd be SubScene-effecting, for orginazational purposes GuiInspectorGroup* subsceneGrp = inspector->findExistentGroup(StringTable->insert("SubScene")); if (!subsceneGrp) @@ -165,6 +167,7 @@ void SubScene::onInspect(GuiInspector* inspector) saveButton->setConsoleCommand(szBuffer); saveFieldGui->addObject(saveButton); +#endif } void SubScene::inspectPostApply() diff --git a/Engine/source/T3D/assets/ImageAsset.cpp b/Engine/source/T3D/assets/ImageAsset.cpp index 5bf4bdc3e..bf665f7f7 100644 --- a/Engine/source/T3D/assets/ImageAsset.cpp +++ b/Engine/source/T3D/assets/ImageAsset.cpp @@ -765,7 +765,7 @@ DefineEngineStaticMethod(ImageAsset, getAssetIdByFilename, const char*, (const c { return ImageAsset::getAssetIdByFilename(StringTable->insert(filePath)); } -#endif + //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- @@ -1048,3 +1048,4 @@ void GuiInspectorTypeImageAssetPtr::setPreviewImage(StringTableEntry assetId) if (mPreviewImage->getBitmapAsset().isNull()) mPreviewImage->_setBitmap(StringTable->insert("ToolsModule:genericAssetIcon_image")); } +#endif diff --git a/Engine/source/T3D/assets/SubSceneAsset.cpp b/Engine/source/T3D/assets/SubSceneAsset.cpp index a55af9cad..314cc3da3 100644 --- a/Engine/source/T3D/assets/SubSceneAsset.cpp +++ b/Engine/source/T3D/assets/SubSceneAsset.cpp @@ -72,7 +72,7 @@ void SubSceneAsset::initPersistFields() //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- - +#ifdef TORQUE_TOOLS IMPLEMENT_CONOBJECT(GuiInspectorTypeSubSceneAssetPtr); ConsoleDocClass(GuiInspectorTypeSubSceneAssetPtr, @@ -164,3 +164,4 @@ void GuiInspectorTypeSubSceneAssetId::consoleInit() ConsoleBaseType::getType(TypeSubSceneAssetId)->setInspectorFieldType("GuiInspectorTypeSubSceneAssetId"); } +#endif diff --git a/Engine/source/T3D/sfx/sfxEmitter.cpp b/Engine/source/T3D/sfx/sfxEmitter.cpp index b60efe226..04a371c50 100644 --- a/Engine/source/T3D/sfx/sfxEmitter.cpp +++ b/Engine/source/T3D/sfx/sfxEmitter.cpp @@ -102,6 +102,7 @@ ConsoleSetType(TypeSoundControls) { } +#ifdef TORQUE_TOOLS IMPLEMENT_CONOBJECT(GuiInspectorTypeSoundControls); ConsoleDocClass(GuiInspectorTypeSoundControls, "@brief Inspector field type for Controlling playback of sounds\n\n" @@ -201,7 +202,7 @@ bool GuiInspectorTypeSoundControls::updateRects() return resized; } - +#endif //----------------------------------------------------------------------------- diff --git a/Engine/source/T3D/sfx/sfxEmitter.h b/Engine/source/T3D/sfx/sfxEmitter.h index e4e05a386..562bb55c4 100644 --- a/Engine/source/T3D/sfx/sfxEmitter.h +++ b/Engine/source/T3D/sfx/sfxEmitter.h @@ -42,6 +42,7 @@ class SFXSource; class SFXTrack; DefineConsoleType(TypeSoundControls, bool) +#ifdef TORQUE_TOOLS class GuiInspectorTypeSoundControls : public GuiInspectorField { typedef GuiInspectorField Parent; @@ -56,6 +57,7 @@ public: GuiControl* constructEditControl() override; bool updateRects() override; }; +#endif //RDTODO: make 3D sound emitters yield their source when being culled /// The SFXEmitter is used to place 2D or 3D sounds into a