mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 12:25:30 +00:00
Implementation of updated handling of Legacy Project importer to better seperate out importer versions as well as more explicit processing of incoming content
This commit is contained in:
parent
3812ce2e82
commit
ecd35df7e9
14 changed files with 3107 additions and 2663 deletions
|
|
@ -102,7 +102,7 @@ void GUIAsset::initPersistFields()
|
|||
&setScriptFile, &getScriptFile, "Path to the script file for the gui");
|
||||
|
||||
addProtectedField("GUIFile", TypeAssetLooseFilePath, Offset(mGUIFile, GUIAsset),
|
||||
&setScriptFile, &getScriptFile, "Path to the gui file");
|
||||
&setGUIFile, &getGUIFile, "Path to the gui file");
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -623,8 +623,8 @@ const char* ShapeAsset::generateCachedPreviewImage(S32 resolution, String overri
|
|||
|
||||
String dumpPath = String(mFilePath) + "_Preview.dds";
|
||||
|
||||
char* returnBuffer = Con::getReturnBuffer(dumpPath.length());
|
||||
dSprintf(returnBuffer, dumpPath.length(), "%s", dumpPath.c_str());
|
||||
char* returnBuffer = Con::getReturnBuffer(128);
|
||||
dSprintf(returnBuffer, 128, "%s", dumpPath.c_str());
|
||||
|
||||
/*FileStream stream;
|
||||
if (stream.open(dumpPath, Torque::FS::File::Write))
|
||||
|
|
|
|||
|
|
@ -2099,22 +2099,28 @@ void AssetImporter::processShapeMaterialInfo(AssetImportObject* assetItem, S32 m
|
|||
String imgFileName = AssetImporter::findImagePath(testFilePath.getPath() + "/" + testFilePath.getFileName());
|
||||
if (imgFileName.isNotEmpty())
|
||||
filePath = imgFileName;
|
||||
else
|
||||
filePath = ""; //no luck, so we just won't try importing in the image
|
||||
}
|
||||
}
|
||||
|
||||
matAssetItem = addImportingAsset("MaterialAsset", shapePathBase + "/" + matName, assetItem, matName);
|
||||
AssetImportObject* imageAssetItem = addImportingAsset("ImageAsset", filePath, matAssetItem, "");
|
||||
|
||||
String suffixType;
|
||||
String suffix = parseImageSuffixes(imageAssetItem->assetName, &suffixType);
|
||||
if (suffix.isNotEmpty())
|
||||
if (!filePath.isEmpty())
|
||||
{
|
||||
imageAssetItem->imageSuffixType = suffixType;
|
||||
}
|
||||
else
|
||||
{
|
||||
//we'll assume it's albedo
|
||||
imageAssetItem->imageSuffixType = "Albedo";
|
||||
AssetImportObject* imageAssetItem = addImportingAsset("ImageAsset", filePath, matAssetItem, "");
|
||||
|
||||
String suffixType;
|
||||
String suffix = parseImageSuffixes(imageAssetItem->assetName, &suffixType);
|
||||
if (suffix.isNotEmpty())
|
||||
{
|
||||
imageAssetItem->imageSuffixType = suffixType;
|
||||
}
|
||||
else
|
||||
{
|
||||
//we'll assume it's albedo
|
||||
imageAssetItem->imageSuffixType = "Albedo";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -217,6 +217,11 @@ ImplementEnumType(_TamlFormatMode,
|
|||
|
||||
FileStream stream;
|
||||
|
||||
if (StringTable->insert("c://.asset.taml") == StringTable->insert(mFilePathBuffer))
|
||||
{
|
||||
bool asdfasdf = true;
|
||||
}
|
||||
|
||||
// File opened?
|
||||
if (!stream.open(mFilePathBuffer, Torque::FS::File::Write))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -256,8 +256,10 @@ DefineEngineFunction(TamlWrite, bool, (SimObject* simObject, const char* filenam
|
|||
}
|
||||
else
|
||||
{
|
||||
// No, so warn.
|
||||
Con::warnf( "TamlWrite() - Setting binary compression is only valid for XML formatting." );
|
||||
#ifdef TORQUE_DEBUG
|
||||
// No, so warn.
|
||||
Con::warnf( "TamlWrite() - Setting binary compression is only valid for XML formatting." );
|
||||
#endif
|
||||
}
|
||||
|
||||
// Turn-off auto-formatting.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue