Merge pull request #1465 from Areloch/NoToolsBuildFix

Adds the necessary ifdef flags to re-enable the ability to build with tools disabled
This commit is contained in:
Brian Roberts 2025-05-17 18:42:28 -05:00 committed by GitHub
commit 70502d1b0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 3 deletions

View file

@ -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)

View file

@ -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()

View file

@ -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

View file

@ -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

View file

@ -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
//-----------------------------------------------------------------------------

View file

@ -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