diff --git a/Engine/source/T3D/assets/ImageAsset.cpp b/Engine/source/T3D/assets/ImageAsset.cpp index 5840adc7a..325acfe09 100644 --- a/Engine/source/T3D/assets/ImageAsset.cpp +++ b/Engine/source/T3D/assets/ImageAsset.cpp @@ -301,13 +301,11 @@ void ImageAsset::initializeAsset() ResourceManager::get().getChangedSignal().notify(this, &ImageAsset::_onResourceChanged); mImagePath = getOwned() ? expandAssetFilePath(mImageFileName) : mImagePath; - //loadImage(); } void ImageAsset::onAssetRefresh() { mImagePath = getOwned() ? expandAssetFilePath(mImageFileName) : mImagePath; - //loadImage(); } void ImageAsset::_onResourceChanged(const Torque::Path& path) @@ -317,7 +315,6 @@ void ImageAsset::_onResourceChanged(const Torque::Path& path) refreshAsset(); - //loadImage(); onAssetRefresh(); } diff --git a/Engine/source/T3D/assets/ShapeAsset.cpp b/Engine/source/T3D/assets/ShapeAsset.cpp index c833cd3e8..05832a47d 100644 --- a/Engine/source/T3D/assets/ShapeAsset.cpp +++ b/Engine/source/T3D/assets/ShapeAsset.cpp @@ -224,8 +224,6 @@ void ShapeAsset::initializeAsset() String normalPath = String(mFilePath) + "_imposter_normals.dds"; mNormalImposterPath = StringTable->insert(normalPath.c_str()); } - - //loadShape(); } void ShapeAsset::setShapeFile(const char* pShapeFile) @@ -461,7 +459,6 @@ U32 ShapeAsset::getAssetByFilename(StringTableEntry fileName, AssetPtrsetAssetId(query.mAssetList[0]); - (*shapeAsset)->loadShape(); return (*shapeAsset)->mLoadedState; } } @@ -494,7 +491,6 @@ U32 ShapeAsset::getAssetById(StringTableEntry assetId, AssetPtr* sha if (shapeAsset->notNull()) { - (*shapeAsset)->loadShape(); return (*shapeAsset)->mLoadedState; } else @@ -504,7 +500,6 @@ U32 ShapeAsset::getAssetById(StringTableEntry assetId, AssetPtr* sha if (shapeAsset->isNull()) { - (*shapeAsset)->loadShape(); //Well that's bad, loading the fallback failed. Con::warnf("ShapeAsset::getAssetById - Finding of asset with id %s failed with no fallback asset", assetId); return AssetErrCode::Failed; @@ -513,7 +508,6 @@ U32 ShapeAsset::getAssetById(StringTableEntry assetId, AssetPtr* sha //handle noshape not being loaded itself if ((*shapeAsset)->mLoadedState == BadFileReference) { - (*shapeAsset)->loadShape(); Con::warnf("ShapeAsset::getAssetById - Finding of asset with id %s failed, and fallback asset reported error of Bad File Reference.", assetId); return AssetErrCode::BadFileReference; } @@ -540,8 +534,6 @@ void ShapeAsset::onAssetRefresh(void) // Update. if(!Platform::isFullPath(mFileName)) mFilePath = getOwned() ? expandAssetFilePath(mFileName) : mFilePath; - - loadShape(); } void ShapeAsset::SplitSequencePathAndName(String& srcPath, String& srcName) diff --git a/Engine/source/T3D/assets/ShapeAsset.h b/Engine/source/T3D/assets/ShapeAsset.h index 6cf1b0811..abeb13c39 100644 --- a/Engine/source/T3D/assets/ShapeAsset.h +++ b/Engine/source/T3D/assets/ShapeAsset.h @@ -136,7 +136,7 @@ public: TSShape* getShape() { return mShape; } - Resource getShapeResource() { return mShape; } + Resource getShapeResource() { loadShape(); return mShape; } void SplitSequencePathAndName(String& srcPath, String& srcName); StringTableEntry getShapeFileName() { return mFileName; } diff --git a/Engine/source/T3D/assets/SoundAsset.cpp b/Engine/source/T3D/assets/SoundAsset.cpp index cb58a5364..dd6ab9a0a 100644 --- a/Engine/source/T3D/assets/SoundAsset.cpp +++ b/Engine/source/T3D/assets/SoundAsset.cpp @@ -198,7 +198,7 @@ void SoundAsset::initializeAsset(void) return; mSoundPath = getOwned() ? expandAssetFilePath(mSoundFile) : mSoundPath; - loadSound(); + //loadSound(); } void SoundAsset::_onResourceChanged(const Torque::Path &path) @@ -208,7 +208,7 @@ void SoundAsset::_onResourceChanged(const Torque::Path &path) refreshAsset(); - loadSound(); + //loadSound(); } void SoundAsset::onAssetRefresh(void) @@ -218,7 +218,7 @@ void SoundAsset::onAssetRefresh(void) //Update mSoundPath = getOwned() ? expandAssetFilePath(mSoundFile) : mSoundPath; - loadSound(); + //loadSound(); } bool SoundAsset::loadSound() diff --git a/Engine/source/T3D/assets/SoundAsset.h b/Engine/source/T3D/assets/SoundAsset.h index d6a0eb10c..63f81194a 100644 --- a/Engine/source/T3D/assets/SoundAsset.h +++ b/Engine/source/T3D/assets/SoundAsset.h @@ -132,7 +132,7 @@ public: virtual void copyTo(SimObject* object); //SFXResource* getSound() { return mSoundResource; } - Resource getSoundResource() { return mSFXProfile.getResource(); } + Resource getSoundResource() { loadSound(); return mSFXProfile.getResource(); } /// Declare Console Object. DECLARE_CONOBJECT(SoundAsset);