Ver código fonte

Merge pull request #1465 from Areloch/NoToolsBuildFix

Adds the necessary ifdef flags to re-enable the ability to build with tools disabled
Brian Roberts 4 meses atrás
pai
commit
70502d1b0f

+ 3 - 0
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)

+ 3 - 0
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()

+ 2 - 1
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

+ 2 - 1
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

+ 2 - 1
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
 
 //-----------------------------------------------------------------------------
 

+ 2 - 0
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