Merge pull request #815 from Azaezel/alpha40/TORQUE_TOOLS

fix TORQUE_TOOLS = off compilation
This commit is contained in:
Brian Roberts 2022-06-16 21:23:38 -05:00 committed by GitHub
commit 41f5350173
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 80 additions and 56 deletions

View file

@ -169,7 +169,7 @@ void CubemapAsset::setScriptFile(const char* pScriptFile)
// Refresh the asset.
refreshAsset();
}
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
//-----------------------------------------------------------------------------
@ -249,3 +249,4 @@ bool GuiInspectorTypeCubemapAssetPtr::updateRects()
return resized;
}
#endif

View file

@ -92,7 +92,7 @@ protected:
};
DefineConsoleType(TypeCubemapAssetPtr, CubemapAsset)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------
@ -109,6 +109,6 @@ public:
virtual GuiControl* constructEditControl();
virtual bool updateRects();
};
#endif
#endif // _ASSET_BASE_H_

View file

@ -233,7 +233,6 @@ DefineEngineMethod(GUIAsset, getGUIPath, const char*, (), ,
{
return object->getGUIPath();
}
#endif
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
@ -312,3 +311,4 @@ bool GuiInspectorTypeGUIAssetPtr::updateRects()
return resized;
}
#endif

View file

@ -85,7 +85,7 @@ protected:
DefineConsoleType(TypeGUIAssetPtr, GUIAsset)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------
@ -102,6 +102,6 @@ public:
virtual GuiControl* constructEditControl();
virtual bool updateRects();
};
#endif
#endif // _ASSET_BASE_H_

View file

@ -231,6 +231,7 @@ DefineEngineMethod(GameObjectAsset, createObject, const char*, (),,
return object->create();
}
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
//-----------------------------------------------------------------------------
@ -316,3 +317,4 @@ bool GuiInspectorTypeGameObjectAssetPtr::updateRects()
return resized;
}
#endif

View file

@ -86,7 +86,7 @@ protected:
DefineConsoleType(TypeGameObjectAssetPtr, GameObjectAsset)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------
@ -103,6 +103,6 @@ public:
virtual GuiControl* constructEditControl();
virtual bool updateRects();
};
#endif
#endif // _ASSET_BASE_H_

View file

@ -448,7 +448,6 @@ DefineEngineStaticMethod(ImageAsset, getAssetIdByFilename, const char*, (const c
{
return ImageAsset::getAssetIdByFilename(StringTable->insert(filePath));
}
#endif
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
@ -620,3 +619,5 @@ void GuiInspectorTypeImageAssetId::consoleInit()
ConsoleBaseType::getType(TypeImageAssetId)->setInspectorFieldType("GuiInspectorTypeImageAssetId");
}
#endif

View file

@ -6,6 +6,7 @@
#include "gui/editor/guiInspectorTypes.h"
#endif
#ifdef TORQUE_TOOLS
class GuiInspectorTypeImageAssetPtr : public GuiInspectorTypeFileName
{
typedef GuiInspectorTypeFileName Parent;
@ -29,3 +30,4 @@ public:
DECLARE_CONOBJECT(GuiInspectorTypeImageAssetId);
static void consoleInit();
};
#endif

View file

@ -450,6 +450,7 @@ DefineEngineMethod(MaterialAsset, getScriptPath, const char*, (), ,
}
#endif
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
//-----------------------------------------------------------------------------
@ -544,3 +545,4 @@ void GuiInspectorTypeMaterialAssetId::consoleInit()
ConsoleBaseType::getType(TypeMaterialAssetId)->setInspectorFieldType("GuiInspectorTypeMaterialAssetId");
}
#endif

View file

@ -131,7 +131,7 @@ protected:
DefineConsoleType(TypeMaterialAssetPtr, MaterialAsset)
DefineConsoleType(TypeMaterialAssetId, String)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------
@ -157,7 +157,7 @@ public:
DECLARE_CONOBJECT(GuiInspectorTypeMaterialAssetId);
static void consoleInit();
};
#endif
#pragma region Singular Asset Macros
//Singular assets

View file

@ -122,6 +122,7 @@ void ParticleAsset::copyTo(SimObject* object)
}
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
//-----------------------------------------------------------------------------
@ -199,3 +200,4 @@ bool GuiInspectorTypeParticleAssetPtr::updateRects()
return resized;
}
#endif

View file

@ -67,7 +67,7 @@ protected:
DefineConsoleType(TypeParticleAssetPtr, ParticleAsset)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------
@ -84,6 +84,6 @@ public:
virtual GuiControl* constructEditControl();
virtual bool updateRects();
};
#endif
#endif // _ASSET_BASE_H_

View file

@ -115,7 +115,7 @@ public:
};
DefineConsoleType(TypeShapeAnimationAssetPtr, ShapeAnimationAsset)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------
@ -132,6 +132,6 @@ public:
virtual GuiControl* constructEditControl();
virtual bool updateRects();
};*/
#endif
#endif // _ASSET_BASE_H_

View file

@ -720,11 +720,11 @@ DefineEngineStaticMethod(ShapeAsset, getAssetIdByFilename, const char*, (const c
}
#endif
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
//-----------------------------------------------------------------------------
#ifdef TORQUE_TOOLS
IMPLEMENT_CONOBJECT(GuiInspectorTypeShapeAssetPtr);
ConsoleDocClass(GuiInspectorTypeShapeAssetPtr,

View file

@ -209,10 +209,10 @@ protected:
static const char* getNormalImposterFile(void* obj, const char* data) { return static_cast<ShapeAsset*>(obj)->getNormalImposterFile(); }
};
#ifdef TORQUE_TOOLS
DefineConsoleType(TypeShapeAssetPtr, S32)
DefineConsoleType(TypeShapeAssetId, String)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------

View file

@ -360,7 +360,6 @@ DefineEngineStaticMethod(SoundAsset, getAssetIdByFilename, const char*, (const c
{
return SoundAsset::getAssetIdByFileName(StringTable->insert(filePath));
}
#endif
IMPLEMENT_CONOBJECT(GuiInspectorTypeSoundAssetPtr);
ConsoleDocClass(GuiInspectorTypeSoundAssetPtr,
@ -451,3 +450,4 @@ void GuiInspectorTypeSoundAssetId::consoleInit()
ConsoleBaseType::getType(TypeSoundAssetId)->setInspectorFieldType("GuiInspectorTypeSoundAssetId");
}
#endif

View file

@ -145,7 +145,7 @@ protected:
DefineConsoleType(TypeSoundAssetPtr, SoundAsset)
DefineConsoleType(TypeSoundAssetId, String)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------
@ -171,7 +171,7 @@ public:
DECLARE_CONOBJECT(GuiInspectorTypeSoundAssetId);
static void consoleInit();
};
#endif
#pragma region Singular Asset Macros
//Singular assets

View file

@ -436,6 +436,7 @@ DefineEngineMethod(TerrainAsset, getTerrainFilePath, const char*, (), ,
return object->getTerrainFilePath();
}
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
//-----------------------------------------------------------------------------
@ -529,3 +530,4 @@ void GuiInspectorTypeTerrainAssetId::consoleInit()
ConsoleBaseType::getType(TypeTerrainAssetId)->setInspectorFieldType("GuiInspectorTypeTerrainAssetId");
}
#endif

View file

@ -101,7 +101,7 @@ protected:
DefineConsoleType(TypeTerrainAssetPtr, TerrainAsset)
DefineConsoleType(TypeTerrainAssetId, String)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------
@ -127,6 +127,6 @@ public:
DECLARE_CONOBJECT(GuiInspectorTypeTerrainAssetId);
static void consoleInit();
};
#endif
#endif // _ASSET_BASE_H_

View file

@ -482,7 +482,6 @@ DefineEngineMethod(TerrainMaterialAsset, getFXMaterialDefinition, S32, (), ,
else
return 0;
}
#endif
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
//-----------------------------------------------------------------------------
@ -577,3 +576,4 @@ void GuiInspectorTypeTerrainMaterialAssetId::consoleInit()
ConsoleBaseType::getType(TypeTerrainMaterialAssetId)->setInspectorFieldType("GuiInspectorTypeTerrainMaterialAssetId");
}
#endif

View file

@ -130,7 +130,7 @@ protected:
DefineConsoleType(TypeTerrainMaterialAssetPtr, TerrainMaterialAsset)
DefineConsoleType(TypeTerrainMaterialAssetId, String)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------
@ -155,6 +155,6 @@ public:
DECLARE_CONOBJECT(GuiInspectorTypeTerrainMaterialAssetId);
static void consoleInit();
};
#endif
#endif // _ASSET_BASE_H_

View file

@ -156,6 +156,7 @@ DefineEngineMethod(StateMachineAsset, notifyAssetChanged, void, (),,"")
ResourceManager::get().getChangedSignal().trigger(object->getStateMachineFile());
}
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// GuiInspectorTypeAssetId
//-----------------------------------------------------------------------------
@ -233,3 +234,4 @@ bool GuiInspectorTypeStateMachineAssetPtr::updateRects()
return resized;
}
#endif

View file

@ -74,7 +74,7 @@ protected:
};
DefineConsoleType(TypeStateMachineAssetPtr, StateMachineAsset)
#ifdef TORQUE_TOOLS
//-----------------------------------------------------------------------------
// TypeAssetId GuiInspectorField Class
//-----------------------------------------------------------------------------
@ -91,6 +91,6 @@ public:
virtual GuiControl* constructEditControl();
virtual bool updateRects();
};
#endif
#endif

View file

@ -115,9 +115,10 @@ ReflectionProbe::ReflectionProbe()
mStaticCubemap = NULL;
mProbeUniqueID = "";
#ifdef TORQUE_TOOLS
mEditorShapeInst = NULL;
mEditorShape = NULL;
#endif
mRefreshRateMS = 200;
mDynamicLastBakeMS = 0;
@ -135,9 +136,11 @@ ReflectionProbe::ReflectionProbe()
ReflectionProbe::~ReflectionProbe()
{
#ifdef TORQUE_TOOLS
if (mEditorShapeInst)
SAFE_DELETE(mEditorShapeInst);
#endif
if (mReflectionModeType == StaticCubemap && mStaticCubemap)
mStaticCubemap->deleteObject();
}

View file

@ -1635,7 +1635,7 @@ void TSStatic::getUtilizedAssets(Vector<StringTableEntry>* usedAssetsList)
//These functions are duplicated in tsStatic and shapeBase.
//They each function a little differently; but achieve the same purpose of gathering
//target names/counts without polluting simObject.
#ifdef TORQUE_TOOLS
void TSStatic::onInspect(GuiInspector* inspector)
{
if (mShapeAsset == nullptr)
@ -1716,7 +1716,7 @@ void TSStatic::onInspect(GuiInspector* inspector)
}
}
}
#endif
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"

View file

@ -270,9 +270,9 @@ public:
const Vector<S32>& getLOSDetails() const { return mLOSDetails; }
bool hasAnim() { return mAmbientThread != NULL; }
#ifdef TORQUE_TOOLS
virtual void onInspect(GuiInspector*);
#endif
void updateMaterials();
bool isAnimated() { return mPlayAmbient; }

View file

@ -82,6 +82,7 @@ void Zone::consoleInit()
getStaticClassRep()->mIsRenderEnabled = false;
}
#ifdef TORQUE_TOOLS
void Zone::initPersistFields()
{
addProtectedField("selectAll", TypeBool, Offset(mSelecting, Zone),
@ -90,13 +91,10 @@ void Zone::initPersistFields()
Parent::initPersistFields();
}
bool Zone::_doSelect(void* object, const char* index, const char* data)
{
Zone* zone = reinterpret_cast<Zone*>(object);
zone->selectWithin();
return false;
}
@ -138,6 +136,7 @@ void Zone::selectWithin()
}
}
}
#endif
//=============================================================================
// Console API.
//=============================================================================
@ -162,9 +161,10 @@ DefineEngineMethod( Zone, dumpZoneState, void, ( bool updateFirst ), ( true ),
{
object->dumpZoneState( updateFirst );
}
#ifdef TORQUE_TOOLS
DefineEngineMethod(Zone, selectWithin, void, () ,,
"select a list of all objects assigned to the zone")
{
object->selectWithin();
}
#endif

View file

@ -45,11 +45,13 @@
class Zone : public SceneAmbientSoundObject< ScenePolyhedralZone >
{
public:
typedef SceneAmbientSoundObject< ScenePolyhedralZone > Parent;
bool mSelecting = false;
#ifdef TORQUE_TOOLS
static void initPersistFields();
static bool _doSelect(void* object, const char* index, const char* data);
typedef SceneAmbientSoundObject< ScenePolyhedralZone > Parent;
void selectWithin();
#endif
protected:
// SceneVolume.