mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 07:34:45 +00:00
dial back nullPtr usage
while it still remains a good idea to port as many NULL compares and assignments over to nullPtr as feasable, we do still need to sort out how to better support scripted empty, false, and zero assigns for things like objectIDs. this means we'll need to both fully convert the backend of the parser to support that kind of thing, but also alter most if not all exisiting NULLs. up to and including things like SAFE_DELETE. while that's certainly feasable, given there's aproximatel 400 nullptr assigns/checks prior to this commit, and roughly 1800 of the prior, if it terminates in a script call and not an aip one direct, we'll be dialing that back until such time as fork fully fopcused on converting and resolving any lingering mismatches is completed.
This commit is contained in:
parent
e9205027f7
commit
5ffa3b81f1
84 changed files with 319 additions and 319 deletions
|
|
@ -3,7 +3,7 @@
|
|||
#include "T3D/gameBase/gameConnection.h"
|
||||
#include "T3D/gameMode.h"
|
||||
|
||||
Scene * Scene::smRootScene = nullptr;
|
||||
Scene * Scene::smRootScene = NULL;
|
||||
Vector<Scene*> Scene::smSceneList;
|
||||
|
||||
IMPLEMENT_CALLBACK(Scene, onSaving, void, (const char* fileName), (fileName),
|
||||
|
|
@ -14,7 +14,7 @@ IMPLEMENT_CALLBACK(Scene, onSaving, void, (const char* fileName), (fileName),
|
|||
IMPLEMENT_CO_NETOBJECT_V1(Scene);
|
||||
|
||||
Scene::Scene() :
|
||||
mParentScene(nullptr),
|
||||
mParentScene(NULL),
|
||||
mSceneId(-1),
|
||||
mIsEditing(false),
|
||||
mIsDirty(false),
|
||||
|
|
@ -197,12 +197,12 @@ void Scene::processTick()
|
|||
if (gc)
|
||||
{
|
||||
GameBase* controlObj = gc->getControlObject();
|
||||
if (controlObj == nullptr)
|
||||
if (controlObj == NULL)
|
||||
{
|
||||
controlObj = gc->getCameraObject();
|
||||
}
|
||||
|
||||
if (mSubScenes[i]->testBox(controlObj != nullptr ? controlObj->getWorldBox() : Box3F::Zero))
|
||||
if (mSubScenes[i]->testBox(controlObj != NULL ? controlObj->getWorldBox() : Box3F::Zero))
|
||||
{
|
||||
//we have a client controlling object in the bounds, so we ensure the contents are loaded
|
||||
hasClients = true;
|
||||
|
|
@ -430,7 +430,7 @@ DefineEngineFunction(getScene, Scene*, (U32 sceneId), (0),
|
|||
"@return The id of the Root Scene. Will be 0 if no root scene is loaded")
|
||||
{
|
||||
if (Scene::smSceneList.empty() || sceneId >= Scene::smSceneList.size())
|
||||
return nullptr;
|
||||
return NULL;
|
||||
|
||||
return Scene::smSceneList[sceneId];
|
||||
}
|
||||
|
|
@ -502,12 +502,12 @@ DefineEngineMethod(Scene, getObjectsByClass, String, (String className, bool che
|
|||
U32 len = 0;
|
||||
S32 i;
|
||||
//Get the length of our return string
|
||||
for(U32 i=0; i < objectsList->size(); i++)
|
||||
for(i=0; i < objectsList->size(); i++)
|
||||
len += dStrlen((*objectsList)[i]->getIdString());
|
||||
|
||||
char* ret = Con::getReturnBuffer(len + 1);
|
||||
ret[0] = 0;
|
||||
for (U32 i = 0; i < objectsList->size(); i++)
|
||||
for (i = 0; i < objectsList->size(); i++)
|
||||
{
|
||||
dStrcat(ret, (*objectsList)[i]->getIdString(), len + 1);
|
||||
dStrcat(ret, " ", len + 1);
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public:
|
|||
static Scene *getRootScene()
|
||||
{
|
||||
if (Scene::smSceneList.empty())
|
||||
return nullptr;
|
||||
return NULL;
|
||||
|
||||
return Scene::smSceneList[0];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ GuiControl* GuiInspectorTypeCubemapAssetPtr::constructEditControl()
|
|||
|
||||
StringBuilder varNameStr;
|
||||
varNameStr.append(mCaption);
|
||||
if (mFieldArrayIndex != nullptr)
|
||||
if (mFieldArrayIndex != NULL)
|
||||
{
|
||||
varNameStr.append("[");
|
||||
varNameStr.append(mFieldArrayIndex);
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ GuiControl* GuiInspectorTypeGUIAssetPtr::constructEditControl()
|
|||
|
||||
StringBuilder varNameStr;
|
||||
varNameStr.append(mCaption);
|
||||
if (mFieldArrayIndex != nullptr)
|
||||
if (mFieldArrayIndex != NULL)
|
||||
{
|
||||
varNameStr.append("[");
|
||||
varNameStr.append(mFieldArrayIndex);
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ const char* GameObjectAsset::create()
|
|||
//Entity* e = dynamic_cast<Entity*>(pSimObject);
|
||||
//e->_setGameObject(getAssetId());
|
||||
|
||||
pSimObject->setDataField(StringTable->insert("GameObject"), nullptr, getAssetId());
|
||||
pSimObject->setDataField(StringTable->insert("GameObject"), NULL, getAssetId());
|
||||
|
||||
return pSimObject->getIdString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ GFXTexHandle ImageAsset::getTexture(GFXTextureProfile* requestedProfile)
|
|||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* ImageAsset::getImageTypeNameFromType(ImageAsset::ImageTypes type)
|
||||
|
|
@ -700,7 +700,7 @@ const char* ImageAsset::getImageInfo()
|
|||
if (newTex)
|
||||
{
|
||||
dSprintf(returnBuffer, bufSize, "%s %d %d %d", GFXStringTextureFormat[newTex->getFormat()], newTex->getHeight(), newTex->getWidth(), newTex->getDepth());
|
||||
newTex = nullptr;
|
||||
newTex = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -776,7 +776,7 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl()
|
|||
|
||||
const char* previewImage;
|
||||
|
||||
if (mInspector->getInspectObject() != nullptr)
|
||||
if (mInspector->getInspectObject() != NULL)
|
||||
{
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ImageAsset\", \"AssetBrowser.changeAsset\", %s);",
|
||||
getIdString());
|
||||
|
|
@ -810,7 +810,7 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl()
|
|||
|
||||
editTextCtrl->setPlaceholderText("(None)");
|
||||
|
||||
GuiControlProfile* toolDefaultProfile = nullptr;
|
||||
GuiControlProfile* toolDefaultProfile = NULL;
|
||||
Sim::findObject("ToolsGuiDefaultProfile", toolDefaultProfile);
|
||||
|
||||
//
|
||||
|
|
@ -840,7 +840,7 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl()
|
|||
// Create "Open in Editor" button
|
||||
mEditButton = new GuiBitmapButtonCtrl();
|
||||
|
||||
if (mInspector->getInspectObject() != nullptr)
|
||||
if (mInspector->getInspectObject() != NULL)
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "%d.apply(\"\");", getId());
|
||||
else
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "%s = \"\";", mVariableName);
|
||||
|
|
@ -973,7 +973,7 @@ void GuiInspectorTypeImageAssetPtr::updateValue()
|
|||
void GuiInspectorTypeImageAssetPtr::updatePreviewImage()
|
||||
{
|
||||
const char* previewImage;
|
||||
if (mInspector->getInspectObject() != nullptr)
|
||||
if (mInspector->getInspectObject() != NULL)
|
||||
previewImage = getData();
|
||||
else
|
||||
previewImage = Con::getVariable(mVariableName);
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ MaterialAsset::MaterialAsset()
|
|||
mScriptFile = StringTable->EmptyString();
|
||||
mScriptPath = StringTable->EmptyString();
|
||||
mMatDefinitionName = StringTable->EmptyString();
|
||||
mMaterialDefinition = nullptr;
|
||||
mMaterialDefinition = NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -419,7 +419,7 @@ SimObjectPtr<Material> MaterialAsset::findMaterialDefinitionByAssetId(StringTabl
|
|||
SimObjectPtr<Material> matDef = dynamic_cast<Material*>(matSet->findObjectByInternalName(assetId));
|
||||
return matDef;
|
||||
}
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef TORQUE_TOOLS
|
||||
|
|
@ -482,11 +482,11 @@ GuiControl* GuiInspectorTypeMaterialAssetPtr::constructEditControl()
|
|||
|
||||
const char* previewImage;
|
||||
|
||||
if (mInspector->getInspectObject() != nullptr)
|
||||
if (mInspector->getInspectObject() != NULL)
|
||||
{
|
||||
StringBuilder varNameStr;
|
||||
varNameStr.append(mCaption);
|
||||
if (mFieldArrayIndex != nullptr)
|
||||
if (mFieldArrayIndex != NULL)
|
||||
{
|
||||
varNameStr.append("[");
|
||||
varNameStr.append(mFieldArrayIndex);
|
||||
|
|
@ -523,7 +523,7 @@ GuiControl* GuiInspectorTypeMaterialAssetPtr::constructEditControl()
|
|||
if (Sim::findObject("ToolsGuiTextEditProfile", toolEditProfile))
|
||||
editTextCtrl->setControlProfile(toolEditProfile);
|
||||
|
||||
GuiControlProfile* toolDefaultProfile = nullptr;
|
||||
GuiControlProfile* toolDefaultProfile = NULL;
|
||||
Sim::findObject("ToolsGuiDefaultProfile", toolDefaultProfile);
|
||||
|
||||
//
|
||||
|
|
@ -609,7 +609,7 @@ void GuiInspectorTypeMaterialAssetPtr::updateValue()
|
|||
void GuiInspectorTypeMaterialAssetPtr::updatePreviewImage()
|
||||
{
|
||||
const char* matAssetId;
|
||||
if (mInspector->getInspectObject() != nullptr)
|
||||
if (mInspector->getInspectObject() != NULL)
|
||||
matAssetId = mInspector->getInspectObject()->getDataField(mCaption, NULL);
|
||||
else
|
||||
matAssetId = Con::getVariable(mVariableName);
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ public: \
|
|||
if (m##name && String(m##name##Asset->getMaterialDefinitionName()).equal(m##name->getName(), String::NoCase))\
|
||||
return false;\
|
||||
\
|
||||
Material* tempMat = nullptr;\
|
||||
Material* tempMat = NULL;\
|
||||
\
|
||||
if (!Sim::findObject(m##name##Asset->getMaterialDefinitionName(), tempMat))\
|
||||
Con::errorf("%s::_set%s() - Material %s was not found.", macroText(className), macroText(name), m##name##Asset->getMaterialDefinitionName());\
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ GuiControl* GuiInspectorTypeParticleAssetPtr::constructEditControl()
|
|||
|
||||
StringBuilder varNameStr;
|
||||
varNameStr.append(mCaption);
|
||||
if (mFieldArrayIndex != nullptr)
|
||||
if (mFieldArrayIndex != NULL)
|
||||
{
|
||||
varNameStr.append("[");
|
||||
varNameStr.append(mFieldArrayIndex);
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ void ShapeAnimationAsset::setAnimationFile(const char* pAnimationFile)
|
|||
|
||||
S32 ShapeAnimationAsset::getAnimationCount()
|
||||
{
|
||||
if (mSourceShape == nullptr)
|
||||
if (mSourceShape == NULL)
|
||||
return 0;
|
||||
|
||||
return mSourceShape->sequences.size();
|
||||
|
|
|
|||
|
|
@ -636,7 +636,7 @@ ShapeAnimationAsset* ShapeAsset::getAnimation(S32 index)
|
|||
return mAnimationAssets[index];
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef TORQUE_TOOLS
|
||||
|
|
@ -805,11 +805,11 @@ GuiControl* GuiInspectorTypeShapeAssetPtr::constructEditControl()
|
|||
|
||||
const char* previewImage;
|
||||
|
||||
if (mInspector->getInspectObject() != nullptr)
|
||||
if (mInspector->getInspectObject() != NULL)
|
||||
{
|
||||
StringBuilder varNameStr;
|
||||
varNameStr.append(mCaption);
|
||||
if (mFieldArrayIndex != nullptr)
|
||||
if (mFieldArrayIndex != NULL)
|
||||
{
|
||||
varNameStr.append("[");
|
||||
varNameStr.append(mFieldArrayIndex);
|
||||
|
|
@ -846,7 +846,7 @@ GuiControl* GuiInspectorTypeShapeAssetPtr::constructEditControl()
|
|||
if (Sim::findObject("ToolsGuiTextEditProfile", toolEditProfile))
|
||||
editTextCtrl->setControlProfile(toolEditProfile);
|
||||
|
||||
GuiControlProfile* toolDefaultProfile = nullptr;
|
||||
GuiControlProfile* toolDefaultProfile = NULL;
|
||||
Sim::findObject("ToolsGuiDefaultProfile", toolDefaultProfile);
|
||||
|
||||
//
|
||||
|
|
@ -932,7 +932,7 @@ void GuiInspectorTypeShapeAssetPtr::updateValue()
|
|||
void GuiInspectorTypeShapeAssetPtr::updatePreviewImage()
|
||||
{
|
||||
const char* previewImage;
|
||||
if (mInspector->getInspectObject() != nullptr)
|
||||
if (mInspector->getInspectObject() != NULL)
|
||||
previewImage = mInspector->getInspectObject()->getDataField(mCaption, NULL);
|
||||
else
|
||||
previewImage = Con::getVariable(mVariableName);
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ public:
|
|||
inline AssetPtr<MaterialAsset> getMaterialAsset(U32 matId)
|
||||
{
|
||||
if (matId >= mMaterialAssets.size())
|
||||
return nullptr;
|
||||
return NULL;
|
||||
else
|
||||
return mMaterialAssets[matId];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -475,7 +475,7 @@ GuiControl* GuiInspectorTypeTerrainAssetPtr::constructEditControl()
|
|||
|
||||
StringBuilder varNameStr;
|
||||
varNameStr.append(mCaption);
|
||||
if (mFieldArrayIndex != nullptr)
|
||||
if (mFieldArrayIndex != NULL)
|
||||
{
|
||||
varNameStr.append("[");
|
||||
varNameStr.append(mFieldArrayIndex);
|
||||
|
|
|
|||
|
|
@ -129,8 +129,8 @@ TerrainMaterialAsset::TerrainMaterialAsset()
|
|||
mScriptFile = StringTable->EmptyString();
|
||||
mScriptPath = StringTable->EmptyString();
|
||||
mMatDefinitionName = StringTable->EmptyString();
|
||||
mMaterialDefinition = nullptr;
|
||||
mFXMaterialDefinition = nullptr;
|
||||
mMaterialDefinition = NULL;
|
||||
mFXMaterialDefinition = NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -432,7 +432,7 @@ SimObjectPtr<TerrainMaterial> TerrainMaterialAsset::findMaterialDefinitionByAsse
|
|||
SimSet* terrainMatSet;
|
||||
if (!Sim::findObject("TerrainMaterialSet", terrainMatSet))
|
||||
{
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SimObjectPtr<TerrainMaterial> matDef = dynamic_cast<TerrainMaterial*>(terrainMatSet->findObjectByInternalName(assetId));
|
||||
|
|
@ -516,7 +516,7 @@ GuiControl* GuiInspectorTypeTerrainMaterialAssetPtr::constructEditControl()
|
|||
|
||||
StringBuilder varNameStr;
|
||||
varNameStr.append(mCaption);
|
||||
if (mFieldArrayIndex != nullptr)
|
||||
if (mFieldArrayIndex != NULL)
|
||||
{
|
||||
varNameStr.append("[");
|
||||
varNameStr.append(mFieldArrayIndex);
|
||||
|
|
|
|||
|
|
@ -441,10 +441,10 @@ AssetImportObject::AssetImportObject() :
|
|||
dirty(false),
|
||||
importStatus(AssetImportObject::NotProcessed),
|
||||
generatedAsset(false),
|
||||
parentAssetItem(nullptr),
|
||||
parentAssetItem(NULL),
|
||||
tamlFilePath(""),
|
||||
imageSuffixType(""),
|
||||
shapeInfo(nullptr),
|
||||
shapeInfo(NULL),
|
||||
filePathString(StringTable->EmptyString())
|
||||
{
|
||||
|
||||
|
|
@ -520,7 +520,7 @@ AssetImporter::AssetImporter() :
|
|||
isReimport(false),
|
||||
assetHeirarchyChanged(false),
|
||||
importLogBuffer(""),
|
||||
activeImportConfig(nullptr),
|
||||
activeImportConfig(NULL),
|
||||
mDumpLogs(true)
|
||||
{
|
||||
}
|
||||
|
|
@ -565,10 +565,10 @@ AssetImportObject* AssetImporter::addImportingFile(Torque::Path filePath)
|
|||
{
|
||||
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Unable to import file %s because it is of an unrecognized/unsupported type.", filePath.getFullPath().c_str());
|
||||
activityLog.push_back(importLogBuffer);
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
AssetImportObject* newAssetItem = addImportingAsset(assetType, filePath, nullptr, "");
|
||||
AssetImportObject* newAssetItem = addImportingAsset(assetType, filePath, NULL, "");
|
||||
|
||||
originalImportingFiles.push_back(filePath);
|
||||
|
||||
|
|
@ -577,14 +577,14 @@ AssetImportObject* AssetImporter::addImportingFile(Torque::Path filePath)
|
|||
|
||||
void AssetImporter::addImportingAssetItem(AssetImportObject* assetItem, AssetImportObject* parentItem)
|
||||
{
|
||||
if (assetItem == nullptr)
|
||||
if (assetItem == NULL)
|
||||
{
|
||||
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Cannot add a null AssetImportObject to import session!");
|
||||
activityLog.push_back(importLogBuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
if (parentItem != nullptr)
|
||||
if (parentItem != NULL)
|
||||
{
|
||||
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Added Child Importing Asset to %s", parentItem->assetName.c_str());
|
||||
activityLog.push_back(importLogBuffer);
|
||||
|
|
@ -675,7 +675,7 @@ AssetImportObject* AssetImporter::addImportingAsset(String assetType, Torque::Pa
|
|||
assetImportObj->cleanAssetName = assetName;
|
||||
}
|
||||
|
||||
if (parentItem != nullptr)
|
||||
if (parentItem != NULL)
|
||||
{
|
||||
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Added Child Importing Asset to %s", parentItem->assetName.c_str());
|
||||
activityLog.push_back(importLogBuffer);
|
||||
|
|
@ -715,7 +715,7 @@ void AssetImporter::deleteImportingAsset(AssetImportObject* assetItem)
|
|||
AssetImportObject* AssetImporter::findImportingAssetByName(String assetName, AssetImportObject* assetItem)
|
||||
{
|
||||
Vector<AssetImportObject*> itemList = importingAssets;
|
||||
if (assetItem != nullptr)
|
||||
if (assetItem != NULL)
|
||||
itemList = assetItem->childAssetItems;
|
||||
|
||||
for (U32 i = 0; i < itemList.size(); i++)
|
||||
|
|
@ -727,11 +727,11 @@ AssetImportObject* AssetImporter::findImportingAssetByName(String assetName, Ass
|
|||
|
||||
//If it wasn't a match, try recusing on the children(if any)
|
||||
AssetImportObject* retItem = findImportingAssetByName(assetName, itemList[i]);
|
||||
if (retItem != nullptr)
|
||||
if (retItem != NULL)
|
||||
return retItem;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ModuleDefinition* AssetImporter::getModuleFromPath(Torque::Path filePath)
|
||||
|
|
@ -1008,7 +1008,7 @@ S32 AssetImporter::getAssetItemCount()
|
|||
AssetImportObject* AssetImporter::getAssetItem(U32 index)
|
||||
{
|
||||
if (index >= importingAssets.size())
|
||||
return nullptr;
|
||||
return NULL;
|
||||
|
||||
return importingAssets[index];
|
||||
}
|
||||
|
|
@ -1021,7 +1021,7 @@ S32 AssetImporter::getAssetItemChildCount(AssetImportObject* assetItem)
|
|||
AssetImportObject* AssetImporter::getAssetItemChild(AssetImportObject* assetItem, U32 index)
|
||||
{
|
||||
if (index >= assetItem->childAssetItems.size())
|
||||
return nullptr;
|
||||
return NULL;
|
||||
|
||||
return assetItem->childAssetItems[index];
|
||||
}
|
||||
|
|
@ -1521,7 +1521,7 @@ void AssetImportConfig::loadSISFile(Torque::Path filePath)
|
|||
void AssetImporter::processImportAssets(AssetImportObject* assetItem)
|
||||
{
|
||||
Vector<AssetImportObject*> itemList = importingAssets;
|
||||
if (assetItem != nullptr)
|
||||
if (assetItem != NULL)
|
||||
itemList = assetItem->childAssetItems;
|
||||
|
||||
assetHeirarchyChanged = false;
|
||||
|
|
@ -1584,7 +1584,7 @@ void AssetImporter::processImageAsset(AssetImportObject* assetItem)
|
|||
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Preparing Image for Import: %s", assetItem->assetName.c_str());
|
||||
activityLog.push_back(importLogBuffer);
|
||||
|
||||
if ((activeImportConfig->GenerateMaterialOnImport && assetItem->parentAssetItem == nullptr)/* || assetItem->parentAssetItem != nullptr*/)
|
||||
if ((activeImportConfig->GenerateMaterialOnImport && assetItem->parentAssetItem == NULL))
|
||||
{
|
||||
//find our suffix match, if any
|
||||
String noSuffixName = assetItem->assetName;
|
||||
|
|
@ -1601,27 +1601,27 @@ void AssetImporter::processImageAsset(AssetImportObject* assetItem)
|
|||
//We try to automatically populate materials under the naming convention: materialName: Rock, image maps: Rock_Albedo, Rock_Normal, etc
|
||||
|
||||
AssetImportObject* materialAsset = findImportingAssetByName(noSuffixName);
|
||||
if (materialAsset != nullptr && materialAsset->assetType != String("MaterialAsset"))
|
||||
if (materialAsset != NULL && materialAsset->assetType != String("MaterialAsset"))
|
||||
{
|
||||
//We may have a situation where an asset matches the no-suffix name, but it's not a material asset. Ignore this
|
||||
//asset item for now
|
||||
|
||||
materialAsset = nullptr;
|
||||
materialAsset = NULL;
|
||||
}
|
||||
|
||||
//If we didn't find a matching material asset in our current items, we'll make one now
|
||||
if (materialAsset == nullptr)
|
||||
if (materialAsset == NULL)
|
||||
{
|
||||
if (!assetItem->filePath.isEmpty())
|
||||
{
|
||||
materialAsset = addImportingAsset("MaterialAsset", assetItem->filePath, nullptr, noSuffixName);
|
||||
materialAsset = addImportingAsset("MaterialAsset", assetItem->filePath, NULL, noSuffixName);
|
||||
}
|
||||
}
|
||||
|
||||
//Not that, one way or another, we have the generated material asset, lets move on to associating our image with it
|
||||
if (materialAsset != nullptr && materialAsset != assetItem->parentAssetItem)
|
||||
if (materialAsset != NULL && materialAsset != assetItem->parentAssetItem)
|
||||
{
|
||||
if (assetItem->parentAssetItem != nullptr)
|
||||
if (assetItem->parentAssetItem != NULL)
|
||||
{
|
||||
//If the image had an existing parent, it gets removed from that parent's child item list
|
||||
assetItem->parentAssetItem->childAssetItems.remove(assetItem);
|
||||
|
|
@ -1673,7 +1673,7 @@ void AssetImporter::processImageAsset(AssetImportObject* assetItem)
|
|||
else
|
||||
{
|
||||
//If we're processing an unaffiliated image without generating materials for it, we can check some other bits
|
||||
if (assetItem->parentAssetItem == nullptr)
|
||||
if (assetItem->parentAssetItem == NULL)
|
||||
{
|
||||
if (assetItem->typeHint != String::EmptyString)
|
||||
{
|
||||
|
|
@ -1786,7 +1786,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
|||
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Attempting to Auto-Populate Material Maps");
|
||||
activityLog.push_back(importLogBuffer);
|
||||
|
||||
AssetImportObject* matchedImageTypes[ImageAsset::ImageTypeCount] = { nullptr };
|
||||
AssetImportObject* matchedImageTypes[ImageAsset::ImageTypeCount] = { NULL };
|
||||
|
||||
String materialImageNoSuffix;
|
||||
|
||||
|
|
@ -1946,7 +1946,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
|||
}
|
||||
|
||||
//If we're the abledo slot and after all that we didn't find anything, it probably is a suffixless image
|
||||
if (t == ImageAsset::Albedo && matchedImageTypes[t] == nullptr)
|
||||
if (t == ImageAsset::Albedo && matchedImageTypes[t] == NULL)
|
||||
{
|
||||
String testPath = assetItem->filePath.getRootAndPath() + "/" + assetItem->cleanAssetName;
|
||||
String imagePath = AssetImporter::findImagePath(testPath);
|
||||
|
|
@ -1997,7 +1997,7 @@ void AssetImporter::processShapeAsset(AssetImportObject* assetItem)
|
|||
String fileName = assetItem->filePath.getFileName();
|
||||
String fileExt = assetItem->filePath.getExtension();
|
||||
|
||||
if (assetItem->shapeInfo == nullptr)
|
||||
if (assetItem->shapeInfo == NULL)
|
||||
{
|
||||
GuiTreeViewCtrl* shapeInfo = new GuiTreeViewCtrl();
|
||||
shapeInfo->registerObject();
|
||||
|
|
@ -2028,11 +2028,11 @@ void AssetImporter::processShapeAsset(AssetImportObject* assetItem)
|
|||
assetItem->assetName += activeImportConfig->AddedShapeSuffix;
|
||||
}
|
||||
|
||||
S32 meshCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_meshCount"), nullptr));
|
||||
S32 meshCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_meshCount"), NULL));
|
||||
|
||||
S32 animCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_animCount"), nullptr));
|
||||
S32 animCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_animCount"), NULL));
|
||||
|
||||
S32 materialCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_materialCount"), nullptr));
|
||||
S32 materialCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_materialCount"), NULL));
|
||||
S32 matItem = assetItem->shapeInfo->findItemByName("Materials");
|
||||
|
||||
dSprintf(importLogBuffer, sizeof(importLogBuffer), " Shape Info: Mesh Count: %i | Material Count: %i | Anim Count: %i", meshCount, animCount, materialCount);
|
||||
|
|
@ -2091,7 +2091,7 @@ void AssetImporter::processShapeAnimationAsset(AssetImportObject* assetItem)
|
|||
String fileName = assetItem->filePath.getFileName();
|
||||
String fileExt = assetItem->filePath.getExtension();
|
||||
|
||||
if (assetItem->shapeInfo == nullptr)
|
||||
if (assetItem->shapeInfo == NULL)
|
||||
{
|
||||
GuiTreeViewCtrl* shapeInfo = new GuiTreeViewCtrl();
|
||||
shapeInfo->registerObject();
|
||||
|
|
@ -2122,7 +2122,7 @@ void AssetImporter::processShapeAnimationAsset(AssetImportObject* assetItem)
|
|||
assetItem->assetName += activeImportConfig->AddedShapeAnimationSuffix;
|
||||
}
|
||||
|
||||
S32 animCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_animCount"), nullptr));
|
||||
S32 animCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_animCount"), NULL));
|
||||
|
||||
dSprintf(importLogBuffer, sizeof(importLogBuffer), " Shape Animation Info: Anim Count: %i", animCount);
|
||||
activityLog.push_back(importLogBuffer);
|
||||
|
|
@ -2177,7 +2177,7 @@ void AssetImporter::processShapeMaterialInfo(AssetImportObject* assetItem, S32 m
|
|||
|
||||
String materialItemValue = assetItem->shapeInfo->getItemValue(materialItemId);
|
||||
|
||||
AssetImportObject* matAssetItem = nullptr;
|
||||
AssetImportObject* matAssetItem = NULL;
|
||||
|
||||
//If it happens to just be a color value instead of an image, we'll go ahead and skip doing any lookups
|
||||
//TODO: properly map the 'texture' color to the material that gets created
|
||||
|
|
@ -2377,7 +2377,7 @@ void AssetImporter::validateAsset(AssetImportObject* assetItem)
|
|||
void AssetImporter::resetAssetValidationStatus(AssetImportObject* assetItem)
|
||||
{
|
||||
Vector<AssetImportObject*> itemList = importingAssets;
|
||||
if (assetItem != nullptr)
|
||||
if (assetItem != NULL)
|
||||
itemList = assetItem->childAssetItems;
|
||||
|
||||
for (U32 i = 0; i < itemList.size(); i++)
|
||||
|
|
@ -2399,7 +2399,7 @@ bool AssetImporter::checkAssetForCollision(AssetImportObject* assetItemToCheck,
|
|||
bool results = false;
|
||||
|
||||
Vector<AssetImportObject*> itemList = importingAssets;
|
||||
if (assetItem != nullptr)
|
||||
if (assetItem != NULL)
|
||||
itemList = assetItem->childAssetItems;
|
||||
|
||||
for (U32 i = 0; i < itemList.size(); i++)
|
||||
|
|
@ -2450,7 +2450,7 @@ void AssetImporter::resolveAssetItemIssues(AssetImportObject* assetItem)
|
|||
if (activeImportConfig->DuplicateAutoResolution == String("AutoPrune"))
|
||||
{
|
||||
//delete the item
|
||||
if (assetItem->parentAssetItem == nullptr)
|
||||
if (assetItem->parentAssetItem == NULL)
|
||||
{
|
||||
//if there's no parent, just delete
|
||||
deleteImportingAsset(assetItem);
|
||||
|
|
@ -2559,7 +2559,7 @@ void AssetImporter::resolveAssetItemIssues(AssetImportObject* assetItem)
|
|||
void AssetImporter::resetImportConfig()
|
||||
{
|
||||
//use a default import config
|
||||
if (activeImportConfig == nullptr)
|
||||
if (activeImportConfig == NULL)
|
||||
{
|
||||
activeImportConfig = new AssetImportConfig();
|
||||
activeImportConfig->registerObject();
|
||||
|
|
@ -2615,7 +2615,7 @@ StringTableEntry AssetImporter::autoImportFile(Torque::Path filePath, String typ
|
|||
//Find out if the filepath has an associated module to it. If we're importing in-place, it needs to be within a module's directory
|
||||
ModuleDefinition* targetModuleDef = AssetImporter::getModuleFromPath(filePath);
|
||||
|
||||
if (targetModuleDef == nullptr)
|
||||
if (targetModuleDef == NULL)
|
||||
{
|
||||
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Unable to import file %s because it is not in a valid module folder.", filePath.getFullPath().c_str());
|
||||
activityLog.push_back(importLogBuffer);
|
||||
|
|
@ -2633,7 +2633,7 @@ StringTableEntry AssetImporter::autoImportFile(Torque::Path filePath, String typ
|
|||
|
||||
resetImportConfig();
|
||||
|
||||
AssetImportObject* assetItem = addImportingAsset(assetType, filePath, nullptr, "");
|
||||
AssetImportObject* assetItem = addImportingAsset(assetType, filePath, NULL, "");
|
||||
|
||||
processImportAssets();
|
||||
|
||||
|
|
@ -2672,7 +2672,7 @@ void AssetImporter::importAssets(AssetImportObject* assetItem)
|
|||
{
|
||||
ModuleDefinition* moduleDef = ModuleDatabase.findModule(targetModuleId.c_str(), 1);
|
||||
|
||||
if (moduleDef == nullptr)
|
||||
if (moduleDef == NULL)
|
||||
{
|
||||
dSprintf(importLogBuffer, sizeof(importLogBuffer), "AssetImporter::importAssets - Unable to find moduleId %s", targetModuleId.c_str());
|
||||
activityLog.push_back(importLogBuffer);
|
||||
|
|
@ -2681,7 +2681,7 @@ void AssetImporter::importAssets(AssetImportObject* assetItem)
|
|||
}
|
||||
|
||||
Vector<AssetImportObject*> itemList = importingAssets;
|
||||
if (assetItem != nullptr)
|
||||
if (assetItem != NULL)
|
||||
itemList = assetItem->childAssetItems;
|
||||
|
||||
for (U32 i = 0; i < itemList.size(); i++)
|
||||
|
|
@ -2788,7 +2788,7 @@ void AssetImporter::importAssets(AssetImportObject* assetItem)
|
|||
void AssetImporter::acquireAssets(AssetImportObject* assetItem)
|
||||
{
|
||||
Vector<AssetImportObject*> itemList = importingAssets;
|
||||
if (assetItem != nullptr)
|
||||
if (assetItem != NULL)
|
||||
itemList = assetItem->childAssetItems;
|
||||
|
||||
for (U32 i = 0; i < itemList.size(); i++)
|
||||
|
|
@ -2840,7 +2840,7 @@ Torque::Path AssetImporter::importImageAsset(AssetImportObject* assetItem)
|
|||
//file path for reimporting support later
|
||||
if (!isReimport)
|
||||
{
|
||||
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, originalPath.c_str());
|
||||
newAsset->setDataField(StringTable->insert("originalFilePath"), NULL, originalPath.c_str());
|
||||
}
|
||||
|
||||
if (assetItem->typeHint != String::EmptyString)
|
||||
|
|
@ -2891,10 +2891,10 @@ Torque::Path AssetImporter::importMaterialAsset(AssetImportObject* assetItem)
|
|||
|
||||
if (!isReimport && Torque::FS::IsFile(qualifiedFromFile))
|
||||
{
|
||||
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, qualifiedFromFile);
|
||||
newAsset->setDataField(StringTable->insert("originalFilePath"), NULL, qualifiedFromFile);
|
||||
}
|
||||
|
||||
newAsset->setDataField(StringTable->insert("materialDefinitionName"), nullptr, assetName);
|
||||
newAsset->setDataField(StringTable->insert("materialDefinitionName"), NULL, assetName);
|
||||
|
||||
//iterate through and write out the material maps dependencies
|
||||
S32 dependencySlotId = 0;
|
||||
|
|
@ -2911,7 +2911,7 @@ Torque::Path AssetImporter::importMaterialAsset(AssetImportObject* assetItem)
|
|||
char dependencyFieldDef[512];
|
||||
dSprintf(dependencyFieldDef, 512, "%s=%s:%s", ASSET_ID_SIGNATURE, targetModuleId.c_str(), childItem->assetName.c_str());
|
||||
|
||||
newAsset->setDataField(StringTable->insert(dependencyFieldName), nullptr, dependencyFieldDef);
|
||||
newAsset->setDataField(StringTable->insert(dependencyFieldName), NULL, dependencyFieldDef);
|
||||
|
||||
dependencySlotId++;
|
||||
}
|
||||
|
|
@ -2919,10 +2919,10 @@ Torque::Path AssetImporter::importMaterialAsset(AssetImportObject* assetItem)
|
|||
//build the ORMConfig file if we're flagged to and have valid image maps
|
||||
if (activeImportConfig->CreateORMConfig)
|
||||
{
|
||||
AssetImportObject* ormMap = nullptr;
|
||||
AssetImportObject* roughnessMap = nullptr;
|
||||
AssetImportObject* metalnessMap = nullptr;
|
||||
AssetImportObject* aoMap = nullptr;
|
||||
AssetImportObject* ormMap = NULL;
|
||||
AssetImportObject* roughnessMap = NULL;
|
||||
AssetImportObject* metalnessMap = NULL;
|
||||
AssetImportObject* aoMap = NULL;
|
||||
|
||||
//We need to find any/all respective image maps for the given channels
|
||||
for (U32 i = 0; i < assetItem->childAssetItems.size(); i++)
|
||||
|
|
@ -2942,9 +2942,9 @@ Torque::Path AssetImporter::importMaterialAsset(AssetImportObject* assetItem)
|
|||
aoMap = childItem;
|
||||
}
|
||||
|
||||
if (ormMap != nullptr && ormMap->generatedAsset)
|
||||
if (ormMap != NULL && ormMap->generatedAsset)
|
||||
{
|
||||
if (roughnessMap != nullptr || metalnessMap != nullptr || aoMap != nullptr)
|
||||
if (roughnessMap != NULL || metalnessMap != NULL || aoMap != NULL)
|
||||
{
|
||||
U32 channelKey[4] = { 0,1,2,3 };
|
||||
|
||||
|
|
@ -3065,7 +3065,7 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
|||
//file path for reimporting support later
|
||||
if (!isReimport && Torque::FS::IsFile(originalPath))
|
||||
{
|
||||
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, originalPath.c_str());
|
||||
newAsset->setDataField(StringTable->insert("originalFilePath"), NULL, originalPath.c_str());
|
||||
}
|
||||
|
||||
//iterate through and write out the material maps dependencies
|
||||
|
|
@ -3085,7 +3085,7 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
|||
char dependencyFieldDef[512];
|
||||
dSprintf(dependencyFieldDef, 512, "%s=%s:%s", ASSET_ID_SIGNATURE, targetModuleId.c_str(), childItem->assetName.c_str());
|
||||
|
||||
newAsset->setDataField(StringTable->insert(dependencyFieldName), nullptr, dependencyFieldDef);
|
||||
newAsset->setDataField(StringTable->insert(dependencyFieldName), NULL, dependencyFieldDef);
|
||||
|
||||
dependencySlotId++;
|
||||
}
|
||||
|
|
@ -3097,7 +3097,7 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
|||
char dependencyFieldDef[512];
|
||||
dSprintf(dependencyFieldDef, 512, "%s=%s:%s", ASSET_ID_SIGNATURE, targetModuleId.c_str(), childItem->assetName.c_str());
|
||||
|
||||
newAsset->setDataField(StringTable->insert(dependencyFieldName), nullptr, dependencyFieldDef);
|
||||
newAsset->setDataField(StringTable->insert(dependencyFieldName), NULL, dependencyFieldDef);
|
||||
|
||||
dependencySlotId++;
|
||||
}
|
||||
|
|
@ -3156,7 +3156,7 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
|||
|
||||
//find/create shape constructor
|
||||
TSShapeConstructor* constructor = TSShapeConstructor::findShapeConstructorByFilename(Torque::Path(constructorPath).getFullPath());
|
||||
if (constructor == nullptr)
|
||||
if (constructor == NULL)
|
||||
{
|
||||
String fullAssetName = assetItem->moduleName + ":" + assetItem->assetName;
|
||||
constructor = new TSShapeConstructor(StringTable->insert(fullAssetName.c_str()));
|
||||
|
|
@ -3315,7 +3315,7 @@ Torque::Path AssetImporter::importSoundAsset(AssetImportObject* assetItem)
|
|||
//file path for reimporting support later
|
||||
if (!isReimport && String::compare(qualifiedFromFile, qualifiedToFile) && Torque::FS::IsFile(qualifiedFromFile))
|
||||
{
|
||||
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, qualifiedFromFile);
|
||||
newAsset->setDataField(StringTable->insert("originalFilePath"), NULL, qualifiedFromFile);
|
||||
}
|
||||
|
||||
Taml tamlWriter;
|
||||
|
|
@ -3376,7 +3376,7 @@ Torque::Path AssetImporter::importShapeAnimationAsset(AssetImportObject* assetIt
|
|||
//file path for reimporting support later
|
||||
if (!isReimport && String::compare(qualifiedFromFile, qualifiedToFile) && Torque::FS::IsFile(qualifiedFromFile))
|
||||
{
|
||||
newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, qualifiedFromFile);
|
||||
newAsset->setDataField(StringTable->insert("originalFilePath"), NULL, qualifiedFromFile);
|
||||
}
|
||||
|
||||
Taml tamlWriter;
|
||||
|
|
|
|||
|
|
@ -719,7 +719,7 @@ public:
|
|||
/// <para>@param assetItem, if null, will loop over and recurse the main import asset items, if a specific AssetImportObject is passed in, it will recurse it's children</para>
|
||||
/// <para>@return AssetImportObject that was found</para>
|
||||
/// </summary>
|
||||
AssetImportObject* findImportingAssetByName(String assetName, AssetImportObject* assetItem = nullptr);
|
||||
AssetImportObject* findImportingAssetByName(String assetName, AssetImportObject* assetItem = NULL);
|
||||
|
||||
/// <summary>
|
||||
/// Finds the module associated with a given file path
|
||||
|
|
@ -800,7 +800,7 @@ public:
|
|||
/// Process AssetImportObject's to prepare them for importing.
|
||||
/// <para>@param assetItem, If null, will loop over the top-level asset items list, if a specific item is provided, will process it's children</para>
|
||||
/// </summary>
|
||||
void processImportAssets(AssetImportObject* assetItem = nullptr);
|
||||
void processImportAssets(AssetImportObject* assetItem = NULL);
|
||||
|
||||
/// <summary>
|
||||
/// Process a specific AssetImportObject that is an ImageAsset type to prepare it for importing
|
||||
|
|
@ -854,7 +854,7 @@ public:
|
|||
/// Reset the validation status of asset items
|
||||
/// <para>@param assetItem, If null, will loop over the top-level asset items list, if a specific item is provided, will reset it's children</para>
|
||||
/// </summary>
|
||||
void resetAssetValidationStatus(AssetImportObject* assetItem = nullptr);
|
||||
void resetAssetValidationStatus(AssetImportObject* assetItem = NULL);
|
||||
|
||||
/// <summary>
|
||||
/// Checks asset items for any collisions in the current import session
|
||||
|
|
@ -862,7 +862,7 @@ public:
|
|||
/// <para>@param assetItem, if null, will loop over and recurse the main import asset items, if a specific AssetImportObject is passed in, it will recurse it's children</para>
|
||||
/// <para>@return If a collision was detected</para>
|
||||
/// </summary>
|
||||
bool checkAssetForCollision(AssetImportObject* assetItemToCheckFor, AssetImportObject* assetItem = nullptr);
|
||||
bool checkAssetForCollision(AssetImportObject* assetItemToCheckFor, AssetImportObject* assetItem = NULL);
|
||||
|
||||
/// <summary>
|
||||
/// Attempts to automatically resolve import issues according to the import config settings
|
||||
|
|
@ -882,7 +882,7 @@ public:
|
|||
/// Runs the import process in the current session
|
||||
/// <para>@param assetItem, if null, will loop over and recurse the main import asset items, if a specific AssetImportObject is passed in, it will recurse it's children</para>
|
||||
/// </summary>
|
||||
void importAssets(AssetImportObject* assetItem = nullptr);
|
||||
void importAssets(AssetImportObject* assetItem = NULL);
|
||||
|
||||
/// <summary>
|
||||
/// Runs the import processing on a specific ImageAsset item
|
||||
|
|
@ -923,7 +923,7 @@ public:
|
|||
/// Iterates over all the items in the current session and acquires them, which jumpstarts the loading/init'ng process on them, making the available for use immediately
|
||||
/// <para>@param assetItem, if null, will loop over and recurse the main import asset items, if a specific AssetImportObject is passed in, it will recurse it's children</para>
|
||||
/// </summary>
|
||||
void acquireAssets(AssetImportObject* assetItem = nullptr);
|
||||
void acquireAssets(AssetImportObject* assetItem = NULL);
|
||||
|
||||
//
|
||||
/// <summary>
|
||||
|
|
@ -934,7 +934,7 @@ public:
|
|||
|
||||
void setImportConfig(AssetImportConfig* importConfig)
|
||||
{
|
||||
if (importConfig != nullptr)
|
||||
if (importConfig != NULL)
|
||||
{
|
||||
dSprintf(importLogBuffer, sizeof(importLogBuffer), "Loading import config: %s!", importConfig->getName());
|
||||
activityLog.push_back(importLogBuffer);
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ DefineEngineMethod(AssetImporter, getAssetItemChildCount, S32, (AssetImportObjec
|
|||
"@param assetItem The AssetImportObject to get the number of children of.\n"
|
||||
"@return The number of child items")
|
||||
{
|
||||
if (assetItem == nullptr)
|
||||
if (assetItem == NULL)
|
||||
return 0;
|
||||
|
||||
return object->getAssetItemChildCount(assetItem);
|
||||
|
|
@ -129,8 +129,8 @@ DefineEngineMethod(AssetImporter, getAssetItemChild, AssetImportObject*, (AssetI
|
|||
"@param index The index of the child to get.\n"
|
||||
"@return The child AssetImportObect")
|
||||
{
|
||||
if (assetItem == nullptr)
|
||||
return nullptr;
|
||||
if (assetItem == NULL)
|
||||
return NULL;
|
||||
|
||||
return object->getAssetItemChild(assetItem, index);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ GuiControl* GuiInspectorTypeStateMachineAssetPtr::constructEditControl()
|
|||
|
||||
StringBuilder varNameStr;
|
||||
varNameStr.append(mCaption);
|
||||
if (mFieldArrayIndex != nullptr)
|
||||
if (mFieldArrayIndex != NULL)
|
||||
{
|
||||
varNameStr.append("[");
|
||||
varNameStr.append(mFieldArrayIndex);
|
||||
|
|
|
|||
|
|
@ -939,7 +939,7 @@ bool ConvexShape::buildExportPolyList(ColladaUtils::ExportData* exportData, cons
|
|||
ColladaUtils::ExportData::meshLODData* meshData = &exportData->meshData.last();
|
||||
|
||||
//Fill out the info we'll need later to actually append our mesh data for the detail levels during the processing phase
|
||||
meshData->shapeInst = nullptr;
|
||||
meshData->shapeInst = NULL;
|
||||
meshData->originatingObject = this;
|
||||
meshData->meshTransform = mObjToWorld;
|
||||
meshData->scale = mObjScale;
|
||||
|
|
@ -1266,7 +1266,7 @@ void ConvexShape::_updateMaterial()
|
|||
|
||||
Material* material = mSurfaceTextures[i].getMaterialResource();
|
||||
|
||||
if (material == nullptr)
|
||||
if (material == NULL)
|
||||
continue;
|
||||
|
||||
mSurfaceTextures[i].materialInst = material->createMatInstance();
|
||||
|
|
@ -1291,7 +1291,7 @@ void ConvexShape::_updateMaterial()
|
|||
|
||||
Material* material = getMaterialResource();
|
||||
|
||||
if (material == nullptr)
|
||||
if (material == NULL)
|
||||
return;
|
||||
|
||||
mMaterialInst = material->createMatInstance();
|
||||
|
|
|
|||
|
|
@ -510,13 +510,13 @@ GroundCover::GroundCover()
|
|||
mMinElevation[i] = -99999.0f;
|
||||
mMaxElevation[i] = 99999.0f;
|
||||
|
||||
mLayerAsset[i] = nullptr;
|
||||
mLayerAsset[i] = NULL;
|
||||
mLayerFile[i] = StringTable->EmptyString();
|
||||
|
||||
mShapeAsset[i] = nullptr;
|
||||
mShapeAsset[i] = NULL;
|
||||
mShapeFile[i] = StringTable->EmptyString();
|
||||
|
||||
mInvertLayer[i] = false;
|
||||
mInvertLayer[i] = NULL;
|
||||
|
||||
mMinClumpCount[i] = 1;
|
||||
mMaxClumpCount[i] = 1;
|
||||
|
|
@ -895,7 +895,7 @@ void GroundCover::_initShapes()
|
|||
|
||||
for ( S32 i=0; i < MAX_COVERTYPES; i++ )
|
||||
{
|
||||
if ( mShapeAsset[i].isNull() || getShape(i) == nullptr)
|
||||
if ( mShapeAsset[i].isNull() || getShape(i) == NULL)
|
||||
continue;
|
||||
|
||||
if ( isClientObject() && !getShape(i)->preloadMaterialList(getShapeFile(i)) && NetConnection::filesWereDownloaded() )
|
||||
|
|
@ -1573,7 +1573,7 @@ void GroundCover::_updateCoverGrid( const Frustum &culler )
|
|||
void GroundCover::prepRenderImage( SceneRenderState *state )
|
||||
{
|
||||
// Reset stats each time we hit the diffuse pass.
|
||||
if (mMaterialInst == nullptr)
|
||||
if (mMaterialInst == NULL)
|
||||
return;
|
||||
|
||||
if( state->isDiffusePass() )
|
||||
|
|
|
|||
|
|
@ -933,7 +933,7 @@ GuiControl* GuiInspectorTypeParticleDataList::constructEditControl()
|
|||
Parent::updateValue();
|
||||
const char* data = getData();
|
||||
|
||||
if (data != nullptr && !String::isEmpty(data))
|
||||
if (data != NULL && !String::isEmpty(data))
|
||||
{
|
||||
U32 particlesCount = StringUnit::getUnitCount(data, " ");
|
||||
for (U32 i=1; i < particlesCount; i++)
|
||||
|
|
@ -988,7 +988,7 @@ GuiControl* GuiInspectorTypeParticleDataList::_buildParticleEntryField(const S32
|
|||
Parent::updateValue();
|
||||
const char* data = getData();
|
||||
|
||||
if (data != nullptr && !String::isEmpty(data))
|
||||
if (data != NULL && !String::isEmpty(data))
|
||||
{
|
||||
const char* particleSlotData = StringUnit::getUnit(data, index, " ");
|
||||
listBtn->setText(particleSlotData);
|
||||
|
|
|
|||
|
|
@ -783,7 +783,7 @@ DefineEngineMethod( GameBase, applyRadialImpulse, void, ( Point3F origin, F32 ra
|
|||
DefineEngineMethod(GameBase, attachChild, bool, (GameBase* _subObject), (nullAsType<GameBase*>()), "(SceneObject subObject)"
|
||||
"attach an object to this one, preserving its present transform.")
|
||||
{
|
||||
if (_subObject != nullptr)
|
||||
if (_subObject != NULL)
|
||||
{
|
||||
if (_subObject->getParent() != object){
|
||||
Con::errorf("Object is (%d)", _subObject->getId());
|
||||
|
|
@ -805,7 +805,7 @@ DefineEngineMethod(GameBase, attachChild, bool, (GameBase* _subObject), (nullAsT
|
|||
DefineEngineMethod(GameBase, detachChild, bool, (GameBase* _subObject), (nullAsType<GameBase*>()), "(SceneObject subObject)"
|
||||
"attach an object to this one, preserving its present transform.")
|
||||
{
|
||||
if (_subObject != nullptr)
|
||||
if (_subObject != NULL)
|
||||
{
|
||||
_subObject->clearProcessAfter();
|
||||
return _subObject->attachToParent(NULL);
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ void GameMode::onRemove()
|
|||
|
||||
void GameMode::findGameModes(const char* gameModeList, Vector<GameMode*> *outGameModes)
|
||||
{
|
||||
if (outGameModes == nullptr)
|
||||
if (outGameModes == NULL)
|
||||
return;
|
||||
|
||||
Vector<String> gameModeNames;
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ GroundPlane::GroundPlane()
|
|||
|
||||
GroundPlane::~GroundPlane()
|
||||
{
|
||||
mMaterial = nullptr;
|
||||
mMaterial = NULL;
|
||||
|
||||
if(mMaterialInst)
|
||||
SAFE_DELETE(mMaterialInst);
|
||||
|
|
|
|||
|
|
@ -132,8 +132,8 @@ ReflectionProbe::ReflectionProbe()
|
|||
mResourcesCreated = false;
|
||||
mPrefilterSize = 64;
|
||||
mPrefilterMipLevels = mLog2(F32(mPrefilterSize));
|
||||
mPrefilterMap = nullptr;
|
||||
mIrridianceMap = nullptr;
|
||||
mPrefilterMap = NULL;
|
||||
mIrridianceMap = NULL;
|
||||
|
||||
mProbeRefOffset = Point3F::Zero;
|
||||
mEditPosOffset = false;
|
||||
|
|
@ -617,26 +617,26 @@ void ReflectionProbe::processBakedCubemap()
|
|||
return;
|
||||
|
||||
String irrPath = getIrradianceMapPath();
|
||||
if ((mIrridianceMap == nullptr || mIrridianceMap->mCubemap.isNull()) && Platform::isFile(irrPath))
|
||||
if ((mIrridianceMap == NULL || mIrridianceMap->mCubemap.isNull()) && Platform::isFile(irrPath))
|
||||
{
|
||||
mIrridianceMap->setCubemapFile(FileName(irrPath));
|
||||
mIrridianceMap->updateFaces();
|
||||
}
|
||||
|
||||
if (mIrridianceMap == nullptr || mIrridianceMap->mCubemap.isNull())
|
||||
if (mIrridianceMap == NULL || mIrridianceMap->mCubemap.isNull())
|
||||
{
|
||||
Con::errorf("ReflectionProbe::processBakedCubemap() - Unable to load baked irradiance map at %s", getIrradianceMapPath().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
String prefilPath = getPrefilterMapPath();
|
||||
if ((mPrefilterMap == nullptr || mPrefilterMap->mCubemap.isNull()) && Platform::isFile(prefilPath))
|
||||
if ((mPrefilterMap == NULL || mPrefilterMap->mCubemap.isNull()) && Platform::isFile(prefilPath))
|
||||
{
|
||||
mPrefilterMap->setCubemapFile(FileName(prefilPath));
|
||||
mPrefilterMap->updateFaces();
|
||||
}
|
||||
|
||||
if (mPrefilterMap == nullptr || mPrefilterMap->mCubemap.isNull())
|
||||
if (mPrefilterMap == NULL || mPrefilterMap->mCubemap.isNull())
|
||||
{
|
||||
Con::errorf("ReflectionProbe::processBakedCubemap() - Unable to load baked prefilter map at %s", getPrefilterMapPath().c_str());
|
||||
return;
|
||||
|
|
@ -680,7 +680,7 @@ void ReflectionProbe::processStaticCubemap()
|
|||
mIrridianceMap->updateFaces();
|
||||
}
|
||||
|
||||
if (mIrridianceMap == nullptr || mIrridianceMap->mCubemap.isNull())
|
||||
if (mIrridianceMap == NULL || mIrridianceMap->mCubemap.isNull())
|
||||
{
|
||||
Con::errorf("ReflectionProbe::processStaticCubemap() - Unable to load baked irradiance map at %s", irradFileName);
|
||||
return;
|
||||
|
|
@ -695,7 +695,7 @@ void ReflectionProbe::processStaticCubemap()
|
|||
mPrefilterMap->updateFaces();
|
||||
}
|
||||
|
||||
if (mPrefilterMap == nullptr || mPrefilterMap->mCubemap.isNull())
|
||||
if (mPrefilterMap == NULL || mPrefilterMap->mCubemap.isNull())
|
||||
{
|
||||
Con::errorf("ReflectionProbe::processStaticCubemap() - Unable to load baked prefilter map at %s", prefilterFileName);
|
||||
return;
|
||||
|
|
@ -738,7 +738,7 @@ void ReflectionProbe::processStaticCubemap()
|
|||
IBLUtilities::SaveCubeMap(prefilterFileName, mPrefilterMap->mCubemap);
|
||||
}
|
||||
|
||||
if ((mIrridianceMap != nullptr && !mIrridianceMap->mCubemap.isNull()) && (mPrefilterMap != nullptr && !mPrefilterMap->mCubemap.isNull()))
|
||||
if ((mIrridianceMap != NULL && !mIrridianceMap->mCubemap.isNull()) && (mPrefilterMap != NULL && !mPrefilterMap->mCubemap.isNull()))
|
||||
{
|
||||
mProbeInfo.mPrefilterCubemap = mPrefilterMap->mCubemap;
|
||||
mProbeInfo.mIrradianceCubemap = mIrridianceMap->mCubemap;
|
||||
|
|
@ -888,7 +888,7 @@ void ReflectionProbe::prepRenderImage(SceneRenderState *state)
|
|||
PROBEMGR->submitProbe(&mProbeInfo);
|
||||
|
||||
#ifdef TORQUE_TOOLS
|
||||
if (ReflectionProbe::smRenderPreviewProbes && gEditingMission && mPrefilterMap != nullptr)
|
||||
if (ReflectionProbe::smRenderPreviewProbes && gEditingMission && mPrefilterMap != NULL)
|
||||
{
|
||||
if(!mEditorShapeInst)
|
||||
createEditorResources();
|
||||
|
|
@ -914,7 +914,7 @@ void ReflectionProbe::prepRenderImage(SceneRenderState *state)
|
|||
|
||||
BaseMatInstance* probePrevMat = mEditorShapeInst->getMaterialList()->getMaterialInst(0);
|
||||
|
||||
if (probePrevMat == nullptr)
|
||||
if (probePrevMat == NULL)
|
||||
return;
|
||||
|
||||
setPreviewMatParameters(state, probePrevMat);
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ extern bool gEditingMission;
|
|||
extern ColorI gCanvasClearColor;
|
||||
bool Skylight::smRenderSkylights = true;
|
||||
|
||||
SimObjectPtr<Skylight> Skylight::smSkylightProbe = nullptr;
|
||||
SimObjectPtr<Skylight> Skylight::smSkylightProbe = NULL;
|
||||
|
||||
IMPLEMENT_CO_NETOBJECT_V1(Skylight);
|
||||
|
||||
|
|
@ -176,7 +176,7 @@ void Skylight::prepRenderImage(SceneRenderState *state)
|
|||
PROBEMGR->submitProbe(&mProbeInfo);
|
||||
|
||||
#ifdef TORQUE_TOOLS
|
||||
if (Skylight::smRenderPreviewProbes && gEditingMission && mEditorShapeInst && mPrefilterMap != nullptr)
|
||||
if (Skylight::smRenderPreviewProbes && gEditingMission && mEditorShapeInst && mPrefilterMap != NULL)
|
||||
{
|
||||
GFXTransformSaver saver;
|
||||
|
||||
|
|
|
|||
|
|
@ -3911,7 +3911,7 @@ void Player::updateActionThread()
|
|||
|
||||
if (!footfallDustOverride && rInfo.t <= 0.5f && mWaterCoverage == 0.0f
|
||||
&& material && material->mShowDust
|
||||
&& mDataBlock->footPuffEmitter != nullptr)
|
||||
&& mDataBlock->footPuffEmitter != NULL)
|
||||
{
|
||||
// New emitter every time for visibility reasons
|
||||
ParticleEmitter * emitter = new ParticleEmitter;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue