mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 09:04:38 +00:00
Merge pull request #279 from Areloch/MoreABAndImporterFixes
More various Asset Browser and importer fixes
This commit is contained in:
commit
641c75b721
9 changed files with 267 additions and 145 deletions
|
|
@ -616,6 +616,9 @@ String AssetImporter::parseImageSuffixes(String assetName, String* suffixType)
|
||||||
if (FindMatch::isMatch(searchSuffix.c_str(), assetName.c_str(), false))
|
if (FindMatch::isMatch(searchSuffix.c_str(), assetName.c_str(), false))
|
||||||
{
|
{
|
||||||
//We have a match, so indicate as such
|
//We have a match, so indicate as such
|
||||||
|
S32 pos = assetName.length();
|
||||||
|
pos -= searchSuffix.length();
|
||||||
|
suffix = assetName.substr(pos+1);
|
||||||
return suffix;
|
return suffix;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -649,6 +652,103 @@ String AssetImporter::getAssetTypeByFile(Torque::Path filePath)
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String AssetImporter::getTrueFilename(const String& fileName)
|
||||||
|
{
|
||||||
|
Torque::Path pth(fileName);
|
||||||
|
String pattern = pth.getFullPath() + "*";
|
||||||
|
|
||||||
|
static const String sSlash("/");
|
||||||
|
|
||||||
|
Vector<String> findFilesResults;
|
||||||
|
|
||||||
|
String sPattern(Torque::Path::CleanSeparators(pattern));
|
||||||
|
if (sPattern.isEmpty())
|
||||||
|
{
|
||||||
|
Con::errorf("findFirstFile() requires a search pattern");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
char scriptFilenameBuffer[1024];
|
||||||
|
|
||||||
|
if (!Con::expandScriptFilename(scriptFilenameBuffer, sizeof(scriptFilenameBuffer), sPattern.c_str()))
|
||||||
|
{
|
||||||
|
Con::errorf("findFirstFile() given initial directory cannot be expanded: '%s'", pattern);
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
sPattern = String::ToString(scriptFilenameBuffer);
|
||||||
|
|
||||||
|
String::SizeType slashPos = sPattern.find('/', 0, String::Right);
|
||||||
|
// if(slashPos == String::NPos)
|
||||||
|
// {
|
||||||
|
// Con::errorf("findFirstFile() missing search directory or expression: '%s'", sPattern.c_str());
|
||||||
|
// return -1;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Build the initial search path
|
||||||
|
Torque::Path givenPath(Torque::Path::CompressPath(sPattern));
|
||||||
|
givenPath.setFileName("*");
|
||||||
|
givenPath.setExtension("*");
|
||||||
|
|
||||||
|
if (givenPath.getPath().length() > 0 && givenPath.getPath().find('*', 0, String::Right) == givenPath.getPath().length() - 1)
|
||||||
|
{
|
||||||
|
// Deal with legacy searches of the form '*/*.*'
|
||||||
|
String suspectPath = givenPath.getPath();
|
||||||
|
String::SizeType newLen = suspectPath.length() - 1;
|
||||||
|
if (newLen > 0 && suspectPath.find('/', 0, String::Right) == suspectPath.length() - 2)
|
||||||
|
{
|
||||||
|
--newLen;
|
||||||
|
}
|
||||||
|
givenPath.setPath(suspectPath.substr(0, newLen));
|
||||||
|
}
|
||||||
|
|
||||||
|
Torque::FS::FileSystemRef fs = Torque::FS::GetFileSystem(givenPath);
|
||||||
|
//Torque::Path path = fs->mapTo(givenPath);
|
||||||
|
Torque::Path path = givenPath;
|
||||||
|
|
||||||
|
// Make sure that we have a root so the correct file system can be determined when using zips
|
||||||
|
if (givenPath.isRelative())
|
||||||
|
path = Torque::Path::Join(Torque::FS::GetCwd(), '/', givenPath);
|
||||||
|
|
||||||
|
path.setFileName(String::EmptyString);
|
||||||
|
path.setExtension(String::EmptyString);
|
||||||
|
if (!Torque::FS::IsDirectory(path))
|
||||||
|
{
|
||||||
|
Con::errorf("findFirstFile() invalid initial search directory: '%s'", path.getFullPath().c_str());
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build the search expression
|
||||||
|
const String expression(slashPos != String::NPos ? sPattern.substr(slashPos + 1) : sPattern);
|
||||||
|
if (expression.isEmpty())
|
||||||
|
{
|
||||||
|
Con::errorf("findFirstFile() requires a search expression: '%s'", sPattern.c_str());
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
S32 results = Torque::FS::FindByPattern(path, expression, false, findFilesResults, false);
|
||||||
|
if (givenPath.isRelative() && results > 0)
|
||||||
|
{
|
||||||
|
// Strip the CWD out of the returned paths
|
||||||
|
// MakeRelativePath() returns incorrect results (it adds a leading ..) so doing this the dirty way
|
||||||
|
const String cwd = Torque::FS::GetCwd().getFullPath();
|
||||||
|
for (S32 i = 0; i < findFilesResults.size(); ++i)
|
||||||
|
{
|
||||||
|
String str = findFilesResults[i];
|
||||||
|
if (str.compare(cwd, cwd.length(), String::NoCase) == 0)
|
||||||
|
str = str.substr(cwd.length());
|
||||||
|
findFilesResults[i] = str;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (U32 i = 0; i < findFilesResults.size(); i++)
|
||||||
|
{
|
||||||
|
if (!findFilesResults[i].compare(fileName, 0, String::NoCase|String::Left))
|
||||||
|
return findFilesResults[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
void AssetImporter::resetImportSession(bool hardClearSession)
|
void AssetImporter::resetImportSession(bool hardClearSession)
|
||||||
{
|
{
|
||||||
importingAssets.clear();
|
importingAssets.clear();
|
||||||
|
|
@ -660,9 +760,12 @@ void AssetImporter::resetImportSession(bool hardClearSession)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (U32 i = 0; i < originalImportingFiles.size(); i++)
|
Vector<Torque::Path> tempImportingFiles = originalImportingFiles;
|
||||||
|
originalImportingFiles.clear();
|
||||||
|
|
||||||
|
for (U32 i = 0; i < tempImportingFiles.size(); i++)
|
||||||
{
|
{
|
||||||
addImportingFile(originalImportingFiles[i]);
|
addImportingFile(tempImportingFiles[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1513,6 +1616,21 @@ void AssetImporter::processShapeMaterialInfo(AssetImportObject* assetItem, S32 m
|
||||||
matAssetName += String("_Mat");
|
matAssetName += String("_Mat");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Do a check so we don't import materials that are on our ignore list
|
||||||
|
if (activeImportConfig.IgnoreMaterials.isNotEmpty())
|
||||||
|
{
|
||||||
|
U32 ignoredMatNamesCount = StringUnit::getUnitCount(activeImportConfig.IgnoreMaterials, ",;");
|
||||||
|
for (U32 i = 0; i < ignoredMatNamesCount; i++)
|
||||||
|
{
|
||||||
|
const char* ignoreMatName = StringUnit::getUnit(activeImportConfig.IgnoreMaterials, i, ",;");
|
||||||
|
if (FindMatch::isMatch(ignoreMatName, matName.c_str(), false))
|
||||||
|
{
|
||||||
|
//If we have a match to one of our ignore names, just bail out here and skip the material wholesale
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String materialItemValue = assetItem->shapeInfo->getItemValue(materialItemId);
|
String materialItemValue = assetItem->shapeInfo->getItemValue(materialItemId);
|
||||||
|
|
||||||
AssetImportObject* matAssetItem = nullptr;
|
AssetImportObject* matAssetItem = nullptr;
|
||||||
|
|
@ -1556,7 +1674,7 @@ void AssetImporter::processShapeMaterialInfo(AssetImportObject* assetItem, S32 m
|
||||||
filePath = imgFileName;
|
filePath = imgFileName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
matAssetItem = addImportingAsset("MaterialAsset", shapePathBase + "/", assetItem, matName);
|
matAssetItem = addImportingAsset("MaterialAsset", shapePathBase + "/", assetItem, matName);
|
||||||
AssetImportObject* imageAssetItem = addImportingAsset("ImageAsset", filePath, matAssetItem, "");
|
AssetImportObject* imageAssetItem = addImportingAsset("ImageAsset", filePath, matAssetItem, "");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -805,6 +805,14 @@ public:
|
||||||
/// </summary>
|
/// </summary>
|
||||||
AssetImportConfig* getImportConfig() { return &activeImportConfig; }
|
AssetImportConfig* getImportConfig() { return &activeImportConfig; }
|
||||||
|
|
||||||
|
void setImportConfig(AssetImportConfig* importConfig) {
|
||||||
|
if(importConfig != nullptr)
|
||||||
|
activeImportConfig = *importConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
static String getTrueFilename(const String& fileName);
|
||||||
|
|
||||||
//
|
//
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -821,6 +829,10 @@ public:
|
||||||
else if (Platform::isFile(testPath + String(".tif")))
|
else if (Platform::isFile(testPath + String(".tif")))
|
||||||
imagePath = testPath + String(".tif");
|
imagePath = testPath + String(".tif");
|
||||||
|
|
||||||
|
if(imagePath.isNotEmpty())
|
||||||
|
//This ensures case-correct for the filename
|
||||||
|
imagePath = getTrueFilename(imagePath);
|
||||||
|
|
||||||
return imagePath;
|
return imagePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,6 +137,14 @@ DefineEngineMethod(AssetImporter, deleteImportingAsset, void, (AssetImportObject
|
||||||
return object->deleteImportingAsset(assetItem);
|
return object->deleteImportingAsset(assetItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DefineEngineMethod(AssetImporter, setImportConfig, void, (AssetImportConfig* importConfig), (nullAsType< AssetImportConfig*>()),
|
||||||
|
"Creates a new script asset using the targetFilePath.\n"
|
||||||
|
"@return The bool result of calling exec")
|
||||||
|
{
|
||||||
|
return object->setImportConfig(importConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*DefineEngineFunction(enumColladaForImport, bool, (const char* shapePath, const char* ctrl, bool loadCachedDts), ("", "", true),
|
/*DefineEngineFunction(enumColladaForImport, bool, (const char* shapePath, const char* ctrl, bool loadCachedDts), ("", "", true),
|
||||||
"(string shapePath, GuiTreeViewCtrl ctrl) Collect scene information from "
|
"(string shapePath, GuiTreeViewCtrl ctrl) Collect scene information from "
|
||||||
"a COLLADA file and store it in a GuiTreeView control. This function is "
|
"a COLLADA file and store it in a GuiTreeView control. This function is "
|
||||||
|
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
<AssetImportConfigs>
|
|
||||||
<Config Name="TestConfig">
|
|
||||||
<Mesh ImportMesh="1" DoUpAxisOverride="0" UpAxisOverride="Z_AXIS" DoScaleOverride="0" ScaleOverride="1" IgnoreNodeScale="0" AdjustCenter="0" AdjustFloor="1" CollapseSubmeshes="0" LODType="TrailingNumber" ImportedNodes="" IgnoreNodes="" ImportMeshes="" IgnoreMeshes="" />
|
|
||||||
<Materials ImportMaterials="1" IgnoreMaterials="" CreateComposites="1" UseDiffuseSuffixOnOriginImg="1" UseExistingMaterials="1" />
|
|
||||||
<Animations ImportAnimations="1" SeparateAnimations="1" SeparateAnimationPrefix="" />
|
|
||||||
<Collisions GenerateCollisions="1" GenCollisionType="CollisionMesh" CollisionMeshPrefix="Col" GenerateLOSCollisions="1" GenLOSCollisionType="CollisionMesh" LOSCollisionMeshPrefix="LOS" />
|
|
||||||
<Images ImageType="GUI" DiffuseTypeSuffixes="_ALBEDO,_DIFFUSE,_ALB,_DIF,_Base_Color,_COLOR,_COL" NormalTypeSuffixes="_NORMAL,_NORM" SpecularTypeSuffixes="_SPECULAR,_SPEC" MetalnessTypeSuffixes="_METAL,_MET,_METALNESS,_METALLIC" RoughnessTypeSuffixes="_ROUGH,_ROUGHNESS" SmoothnessTypeSuffixes="_SMOOTH,_SMOOTHNESS" AOTypeSuffixes="_AO,_AMBIENT,_AMBIENTOCCLUSION,_Ambient_Occlusion" CompositeTypeSuffixes="_COMP,_COMPOSITE" TextureFilteringMode="Bilinear" UseMips="1" IsHDR="0" Scaling="1" Compressed="0" GenerateMaterialOnImport="1" PopulateMaterialMaps="1" />
|
|
||||||
<Sounds VolumeAdjust="1" PitchAdjust="1" Compressed="0" />
|
|
||||||
</Config>
|
|
||||||
<Config Name="SecondTest">
|
|
||||||
<Mesh ImportMesh="1" DoUpAxisOverride="0" UpAxisOverride="Z_AXIS" DoScaleOverride="0" ScaleOverride="1" IgnoreNodeScale="0" AdjustCenter="0" AdjustFloor="0" CollapseSubmeshes="0" LODType="TrailingNumber" ImportedNodes="" IgnoreNodes="" ImportMeshes="" IgnoreMeshes="" />
|
|
||||||
<Materials ImportMaterials="1" IgnoreMaterials="" CreateComposites="1" UseDiffuseSuffixOnOriginImg="" UseExistingMaterials="" />
|
|
||||||
<Animations ImportAnimations="1" SeparateAnimations="1" SeparateAnimationPrefix="" />
|
|
||||||
<Collisions GenerateCollisions="1" GenCollisionType="CollisionMesh" CollisionMeshPrefix="Col" GenerateLOSCollisions="1" GenLOSCollisionType="CollisionMesh" LOSCollisionMeshPrefix="LOS" />
|
|
||||||
<Images ImageType="N/A" DiffuseTypeSuffixes="_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL" NormalTypeSuffixes="_NORMAL,_NORM" SpecularTypeSuffixes="_SPECULAR,_SPEC" MetalnessTypeSuffixes="_METAL,_MET,_METALNESS,_METALLIC" RoughnessTypeSuffixes="_ROUGH,_ROUGHNESS" SmoothnessTypeSuffixes="_SMOOTH,_SMOOTHNESS" AOTypeSuffixes="_AO,_AMBIENT,_AMBIENTOCCLUSION" CompositeTypeSuffixes="_COMP,_COMPOSITE" TextureFilteringMode="Bilinear" UseMips="1" IsHDR="0" Scaling="1" Compressed="0" GenerateMaterialOnImport="" PopulateMaterialMaps="" />
|
|
||||||
<Sounds VolumeAdjust="1" PitchAdjust="1" Compressed="0" />
|
|
||||||
</Config>
|
|
||||||
<Config Name="GUI_Image_Import">
|
|
||||||
<Mesh ImportMesh="0" DoUpAxisOverride="0" UpAxisOverride="Z_AXIS" DoScaleOverride="0" ScaleOverride="1" IgnoreNodeScale="0" AdjustCenter="0" AdjustFloor="0" CollapseSubmeshes="0" LODType="TrailingNumber" ImportedNodes="" IgnoreNodes="" ImportMeshes="" IgnoreMeshes="" />
|
|
||||||
<Materials ImportMaterials="0" IgnoreMaterials="" CreateComposites="1" UseDiffuseSuffixOnOriginImg="1" UseExistingMaterials="1" />
|
|
||||||
<Animations ImportAnimations="0" SeparateAnimations="1" SeparateAnimationPrefix="" />
|
|
||||||
<Collisions GenerateCollisions="0" GenCollisionType="CollisionMesh" CollisionMeshPrefix="Col" GenerateLOSCollisions="1" GenLOSCollisionType="CollisionMesh" LOSCollisionMeshPrefix="LOS" />
|
|
||||||
<Images ImageType="GUI" DiffuseTypeSuffixes="_ALBEDO;_DIFFUSE;_ALB;_DIF;_COLOR;_COL;_BASECOLOR;_BASE_COLOR" NormalTypeSuffixes="_NORMAL;_NORM" SpecularTypeSuffixes="_SPECULAR;_SPEC" MetalnessTypeSuffixes="_METAL;_MET;_METALNESS;_METALLIC" RoughnessTypeSuffixes="_ROUGH;_ROUGHNESS" SmoothnessTypeSuffixes="_SMOOTH;_SMOOTHNESS" AOTypeSuffixes="_AO;_AMBIENT;_AMBIENTOCCLUSION" CompositeTypeSuffixes="_COMP;_COMPOSITE" TextureFilteringMode="Bilinear" UseMips="1" IsHDR="0" Scaling="1" Compressed="0" GenerateMaterialOnImport="0" PopulateMaterialMaps="0" />
|
|
||||||
<Sounds VolumeAdjust="1" PitchAdjust="1" Compressed="0" />
|
|
||||||
</Config>
|
|
||||||
<Config Name="CogflictsMesh">
|
|
||||||
<Mesh ImportMesh="1" DoUpAxisOverride="0" UpAxisOverride="Z_AXIS" DoScaleOverride="0" ScaleOverride="1" IgnoreNodeScale="0" AdjustCenter="0" AdjustFloor="0" CollapseSubmeshes="0" LODType="TrailingNumber" ImportedNodes="" IgnoreNodes="" ImportMeshes="" IgnoreMeshes="" />
|
|
||||||
<Materials ImportMaterials="1" IgnoreMaterials="ColorEffect*;" CreateComposites="1" UseDiffuseSuffixOnOriginImg="1" UseExistingMaterials="1" />
|
|
||||||
<Animations ImportAnimations="1" SeparateAnimations="1" SeparateAnimationPrefix="" />
|
|
||||||
<Collisions GenerateCollisions="1" GenCollisionType="CollisionMesh" CollisionMeshPrefix="Col" GenerateLOSCollisions="1" GenLOSCollisionType="CollisionMesh" LOSCollisionMeshPrefix="LOS" />
|
|
||||||
<Images ImageType="N/A" DiffuseTypeSuffixes="_ALBEDO;_DIFFUSE;_ALB;_DIF;_COLOR;_COL;_BASECOLOR;_BASE_COLOR;_Al" NormalTypeSuffixes="_NORMAL;_NORM;_N" SpecularTypeSuffixes="_SPECULAR;_SPEC" MetalnessTypeSuffixes="_METAL;_MET;_METALNESS;_METALLIC" RoughnessTypeSuffixes="_ROUGH;_ROUGHNESS" SmoothnessTypeSuffixes="_SMOOTH;_SMOOTHNESS" AOTypeSuffixes="_AO;_AMBIENT;_AMBIENTOCCLUSION" CompositeTypeSuffixes="_COMP;_COMPOSITE;_C" TextureFilteringMode="Bilinear" UseMips="1" IsHDR="0" Scaling="1" Compressed="0" GenerateMaterialOnImport="1" PopulateMaterialMaps="1" />
|
|
||||||
<Sounds VolumeAdjust="1" PitchAdjust="1" Compressed="0" />
|
|
||||||
</Config>
|
|
||||||
</AssetImportConfigs>
|
|
||||||
|
|
@ -1,138 +1,138 @@
|
||||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||||
<AssetImportSettings>
|
<AssetImportSettings>
|
||||||
<Group name="DefaultConfig">
|
<Group name="NewTest">
|
||||||
<Group name="Animations">
|
|
||||||
<Setting name="ImportAnimations">1</Setting>
|
|
||||||
<Setting name="SeparateAnimations">1</Setting>
|
|
||||||
</Group>
|
|
||||||
<Group name="Images">
|
|
||||||
<Setting name="Compressed">1</Setting>
|
|
||||||
<Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
|
|
||||||
<Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
|
|
||||||
<Setting name="IsHDR">0</Setting>
|
|
||||||
<Setting name="TextureFilteringMode">Bilinear</Setting>
|
|
||||||
<Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
|
|
||||||
<Setting name="GenerateMaterialOnImport">1</Setting>
|
|
||||||
<Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a,</Setting>
|
|
||||||
<Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
|
|
||||||
<Setting name="CompositeTypeSuffixes">_COMP,_COMPOSITE</Setting>
|
|
||||||
<Setting name="Scaling">1.0</Setting>
|
|
||||||
<Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
|
|
||||||
<Setting name="PopulateMaterialMaps">1</Setting>
|
|
||||||
<Setting name="ImageType">N/A</Setting>
|
|
||||||
<Setting name="UseMips">1</Setting>
|
|
||||||
</Group>
|
|
||||||
<Group name="Meshes">
|
<Group name="Meshes">
|
||||||
<Setting name="invertNormals">0</Setting>
|
<Setting name="calcTangentSpace">0</Setting>
|
||||||
<Setting name="CollapseSubmeshes">0</Setting>
|
<Setting name="CollapseSubmeshes">0</Setting>
|
||||||
|
<Setting name="LODType">TrailingNumber</Setting>
|
||||||
|
<Setting name="removeRedundantMats">0</Setting>
|
||||||
|
<Setting name="ImportMesh">1</Setting>
|
||||||
<Setting name="DoUpAxisOverride">0</Setting>
|
<Setting name="DoUpAxisOverride">0</Setting>
|
||||||
<Setting name="UpAxisOverride">Z_AXIS</Setting>
|
<Setting name="UpAxisOverride">Z_AXIS</Setting>
|
||||||
<Setting name="AdjustCenter">0</Setting>
|
<Setting name="invertNormals">0</Setting>
|
||||||
<Setting name="DoScaleOverride">1</Setting>
|
<Setting name="limitBoneWeights">0</Setting>
|
||||||
<Setting name="JoinIdenticalVerts">1</Setting>
|
|
||||||
<Setting name="reverseWindingOrder">0</Setting>
|
|
||||||
<Setting name="ScaleOverride">0.01</Setting>
|
|
||||||
<Setting name="AdjustFloor">0</Setting>
|
<Setting name="AdjustFloor">0</Setting>
|
||||||
|
<Setting name="JoinIdenticalVerts">0</Setting>
|
||||||
|
<Setting name="reverseWindingOrder">0</Setting>
|
||||||
|
<Setting name="genUVCoords">0</Setting>
|
||||||
|
<Setting name="TransformUVs">0</Setting>
|
||||||
|
<Setting name="flipUVCoords">0</Setting>
|
||||||
|
<Setting name="AdjustCenter">0</Setting>
|
||||||
|
<Setting name="convertLeftHanded">0</Setting>
|
||||||
|
<Setting name="findInstances">0</Setting>
|
||||||
<Setting name="IgnoreNodeScale">0</Setting>
|
<Setting name="IgnoreNodeScale">0</Setting>
|
||||||
<Setting name="LODType">TrailingNumber</Setting>
|
<Setting name="ScaleOverride">1</Setting>
|
||||||
|
<Setting name="DoScaleOverride">0</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="Sounds">
|
<Group name="Sounds">
|
||||||
<Setting name="Compressed">0</Setting>
|
<Setting name="Compressed">0</Setting>
|
||||||
<Setting name="VolumeAdjust">1.0</Setting>
|
|
||||||
<Setting name="PitchAdjust">1.0</Setting>
|
<Setting name="PitchAdjust">1.0</Setting>
|
||||||
|
<Setting name="VolumeAdjust">1.0</Setting>
|
||||||
|
</Group>
|
||||||
|
<Group name="Images">
|
||||||
|
<Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
|
||||||
|
<Setting name="Scaling">1.0</Setting>
|
||||||
|
<Setting name="IsHDR">0</Setting>
|
||||||
|
<Setting name="ImageType">N/A</Setting>
|
||||||
|
<Setting name="Compressed">1</Setting>
|
||||||
|
<Setting name="PBRTypeSuffixes">_COMP,_COMPOSITE,_PBR,-COMP,-COMPOSITE,-PBR</Setting>
|
||||||
|
<Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
|
||||||
|
<Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
|
||||||
|
<Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL</Setting>
|
||||||
|
<Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
|
||||||
|
<Setting name="GenerateMaterialOnImport">1</Setting>
|
||||||
|
<Setting name="TextureFilteringMode">Bilinear</Setting>
|
||||||
|
<Setting name="UseMips">1</Setting>
|
||||||
|
<Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
|
||||||
|
</Group>
|
||||||
|
<Group name="Animations">
|
||||||
|
<Setting name="animTiming">Seconds</Setting>
|
||||||
|
<Setting name="animFPS">2</Setting>
|
||||||
|
<Setting name="ImportAnimations">1</Setting>
|
||||||
|
<Setting name="SeparateAnimations">1</Setting>
|
||||||
|
</Group>
|
||||||
|
<Group name="General">
|
||||||
|
<Setting name="WarningsAsErrors">0</Setting>
|
||||||
|
<Setting name="AutomaticallyPromptMissingFiles">0</Setting>
|
||||||
|
<Setting name="DuplicatAutoResolution">AutoPrune</Setting>
|
||||||
|
<Setting name="PreventImportWithErrors">1</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="Collision">
|
<Group name="Collision">
|
||||||
<Setting name="GenCollisionType">CollisionMesh</Setting>
|
<Setting name="GenLOSCollisionType">CollisionMesh</Setting>
|
||||||
<Setting name="LOSCollisionMeshPrefix">LOS</Setting>
|
<Setting name="LOSCollisionMeshPrefix">LOS</Setting>
|
||||||
<Setting name="CollisionMeshPrefix">Col</Setting>
|
<Setting name="CollisionMeshPrefix">Col</Setting>
|
||||||
|
<Setting name="GenerateLOSCollisions">1</Setting>
|
||||||
|
<Setting name="GenCollisionType">CollisionMesh</Setting>
|
||||||
|
<Setting name="GenerateCollisions">1</Setting>
|
||||||
|
</Group>
|
||||||
|
<Group name="Materials">
|
||||||
|
<Setting name="ImportMaterials">1</Setting>
|
||||||
|
<Setting name="UseExistingMaterials">1</Setting>
|
||||||
|
<Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
|
||||||
|
<Setting name="CreateComposites">1</Setting>
|
||||||
|
<Setting name="PopulateMaterialMaps">1</Setting>
|
||||||
|
</Group>
|
||||||
|
</Group>
|
||||||
|
<Group name="DefaultConfig">
|
||||||
|
<Group name="Collision">
|
||||||
|
<Setting name="LOSCollisionMeshPrefix">LOS</Setting>
|
||||||
|
<Setting name="GenerateLOSCollisions">1</Setting>
|
||||||
|
<Setting name="CollisionMeshPrefix">Col</Setting>
|
||||||
<Setting name="GenerateCollisions">1</Setting>
|
<Setting name="GenerateCollisions">1</Setting>
|
||||||
<Setting name="GenLOSCollisionType">CollisionMesh</Setting>
|
<Setting name="GenLOSCollisionType">CollisionMesh</Setting>
|
||||||
<Setting name="GenerateLOSCollisions">1</Setting>
|
<Setting name="GenCollisionType">CollisionMesh</Setting>
|
||||||
|
</Group>
|
||||||
|
<Group name="Meshes">
|
||||||
|
<Setting name="AdjustCenter">0</Setting>
|
||||||
|
<Setting name="invertNormals">0</Setting>
|
||||||
|
<Setting name="AdjustFloor">0</Setting>
|
||||||
|
<Setting name="JoinIdenticalVerts">1</Setting>
|
||||||
|
<Setting name="reverseWindingOrder">0</Setting>
|
||||||
|
<Setting name="ScaleOverride">1</Setting>
|
||||||
|
<Setting name="DoUpAxisOverride">0</Setting>
|
||||||
|
<Setting name="UpAxisOverride">Z_AXIS</Setting>
|
||||||
|
<Setting name="CollapseSubmeshes">0</Setting>
|
||||||
|
<Setting name="LODType">TrailingNumber</Setting>
|
||||||
|
<Setting name="IgnoreNodeScale">0</Setting>
|
||||||
|
<Setting name="DoScaleOverride">0</Setting>
|
||||||
|
</Group>
|
||||||
|
<Group name="Images">
|
||||||
|
<Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
|
||||||
|
<Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a,</Setting>
|
||||||
|
<Setting name="PopulateMaterialMaps">1</Setting>
|
||||||
|
<Setting name="ImageType">N/A</Setting>
|
||||||
|
<Setting name="GenerateMaterialOnImport">1</Setting>
|
||||||
|
<Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
|
||||||
|
<Setting name="TextureFilteringMode">Bilinear</Setting>
|
||||||
|
<Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
|
||||||
|
<Setting name="PBRTypeSuffixes">_COMP,_COMPOSITE,_PBR,-COMP,-COMPOSITE,-PBR</Setting>
|
||||||
|
<Setting name="UseMips">1</Setting>
|
||||||
|
<Setting name="Compressed">1</Setting>
|
||||||
|
<Setting name="Scaling">1.0</Setting>
|
||||||
|
<Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
|
||||||
|
<Setting name="IsHDR">0</Setting>
|
||||||
|
<Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="Materials">
|
<Group name="Materials">
|
||||||
<Setting name="IgnoreMaterials">ColorEffect*,</Setting>
|
|
||||||
<Setting name="CreateComposites">1</Setting>
|
|
||||||
<Setting name="UseExistingMaterials">1</Setting>
|
<Setting name="UseExistingMaterials">1</Setting>
|
||||||
<Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
|
<Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
|
||||||
<Setting name="ImportMaterials">1</Setting>
|
<Setting name="ImportMaterials">1</Setting>
|
||||||
<Setting name="AlwaysPresentImageMaps">0</Setting>
|
<Setting name="AlwaysPresentImageMaps">0</Setting>
|
||||||
<Setting name="PopulateMaterialMaps">1</Setting>
|
<Setting name="PopulateMaterialMaps">1</Setting>
|
||||||
</Group>
|
<Setting name="IgnoreMaterials">Default*;</Setting>
|
||||||
<Group name="General">
|
<Setting name="CreateComposites">1</Setting>
|
||||||
<Setting name="DuplicatAutoResolution">AutoPrune</Setting>
|
|
||||||
</Group>
|
|
||||||
</Group>
|
|
||||||
<Group name="NewTest">
|
|
||||||
<Group name="Images">
|
|
||||||
<Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
|
|
||||||
<Setting name="GenerateMaterialOnImport">1</Setting>
|
|
||||||
<Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL</Setting>
|
|
||||||
<Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
|
|
||||||
<Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
|
|
||||||
<Setting name="ImageType">N/A</Setting>
|
|
||||||
<Setting name="IsHDR">0</Setting>
|
|
||||||
<Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
|
|
||||||
<Setting name="Scaling">1.0</Setting>
|
|
||||||
<Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
|
|
||||||
<Setting name="Compressed">1</Setting>
|
|
||||||
<Setting name="CompositeTypeSuffixes">_COMP,_COMPOSITE</Setting>
|
|
||||||
<Setting name="TextureFilteringMode">Bilinear</Setting>
|
|
||||||
<Setting name="UseMips">1</Setting>
|
|
||||||
</Group>
|
|
||||||
<Group name="Meshes">
|
|
||||||
<Setting name="DoScaleOverride">0</Setting>
|
|
||||||
<Setting name="reverseWindingOrder">0</Setting>
|
|
||||||
<Setting name="DoUpAxisOverride">0</Setting>
|
|
||||||
<Setting name="invertNormals">0</Setting>
|
|
||||||
<Setting name="UpAxisOverride">Z_AXIS</Setting>
|
|
||||||
<Setting name="JoinIdenticalVerts">0</Setting>
|
|
||||||
<Setting name="AdjustCenter">0</Setting>
|
|
||||||
<Setting name="calcTangentSpace">0</Setting>
|
|
||||||
<Setting name="IgnoreNodeScale">0</Setting>
|
|
||||||
<Setting name="convertLeftHanded">0</Setting>
|
|
||||||
<Setting name="AdjustFloor">0</Setting>
|
|
||||||
<Setting name="ImportMesh">1</Setting>
|
|
||||||
<Setting name="flipUVCoords">0</Setting>
|
|
||||||
<Setting name="CollapseSubmeshes">0</Setting>
|
|
||||||
<Setting name="TransformUVs">0</Setting>
|
|
||||||
<Setting name="removeRedundantMats">0</Setting>
|
|
||||||
<Setting name="limitBoneWeights">0</Setting>
|
|
||||||
<Setting name="findInstances">0</Setting>
|
|
||||||
<Setting name="genUVCoords">0</Setting>
|
|
||||||
<Setting name="ScaleOverride">1</Setting>
|
|
||||||
<Setting name="LODType">TrailingNumber</Setting>
|
|
||||||
</Group>
|
|
||||||
<Group name="Collision">
|
|
||||||
<Setting name="GenerateCollisions">1</Setting>
|
|
||||||
<Setting name="CollisionMeshPrefix">Col</Setting>
|
|
||||||
<Setting name="LOSCollisionMeshPrefix">LOS</Setting>
|
|
||||||
<Setting name="GenerateLOSCollisions">1</Setting>
|
|
||||||
<Setting name="GenLOSCollisionType">CollisionMesh</Setting>
|
|
||||||
<Setting name="GenCollisionType">CollisionMesh</Setting>
|
|
||||||
</Group>
|
|
||||||
<Group name="Animations">
|
|
||||||
<Setting name="ImportAnimations">1</Setting>
|
|
||||||
<Setting name="SeparateAnimations">1</Setting>
|
|
||||||
<Setting name="animTiming">Seconds</Setting>
|
|
||||||
<Setting name="animFPS">2</Setting>
|
|
||||||
</Group>
|
|
||||||
<Group name="General">
|
|
||||||
<Setting name="PreventImportWithErrors">1</Setting>
|
|
||||||
<Setting name="WarningsAsErrors">0</Setting>
|
|
||||||
<Setting name="AutomaticallyPromptMissingFiles">0</Setting>
|
|
||||||
<Setting name="DuplicatAutoResolution">AutoPrune</Setting>
|
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="Sounds">
|
<Group name="Sounds">
|
||||||
<Setting name="VolumeAdjust">1.0</Setting>
|
<Setting name="VolumeAdjust">1.0</Setting>
|
||||||
<Setting name="Compressed">0</Setting>
|
|
||||||
<Setting name="PitchAdjust">1.0</Setting>
|
<Setting name="PitchAdjust">1.0</Setting>
|
||||||
|
<Setting name="Compressed">0</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="Materials">
|
<Group name="General">
|
||||||
<Setting name="ImportMaterials">1</Setting>
|
<Setting name="DuplicatAutoResolution">AutoPrune</Setting>
|
||||||
<Setting name="UseExistingMaterials">1</Setting>
|
</Group>
|
||||||
<Setting name="CreateComposites">1</Setting>
|
<Group name="Animations">
|
||||||
<Setting name="PopulateMaterialMaps">1</Setting>
|
<Setting name="SeparateAnimations">1</Setting>
|
||||||
<Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
|
<Setting name="ImportAnimations">1</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</AssetImportSettings>
|
</AssetImportSettings>
|
||||||
|
|
|
||||||
|
|
@ -1492,6 +1492,15 @@ function AssetBrowser::doRebuildAssetArray(%this)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//got it.
|
//got it.
|
||||||
|
if(%folderName $= "shaderCache" || %folderName $= "cache" || %folderName $= ".git")
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if(!%this.coreModulesFilter && %folderName $= "core" && %breadcrumbPath $= "")
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if(!%this.toolsModulesFilter && %folderName $= "tools" && %breadcrumbPath $= "")
|
||||||
|
continue;
|
||||||
|
|
||||||
%assetArray.add( %breadcrumbPath, "Folder" TAB %folderName );
|
%assetArray.add( %breadcrumbPath, "Folder" TAB %folderName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1856,6 +1865,10 @@ function AssetBrowserAssetSearchBtn::onClick( %this )
|
||||||
// Navigation
|
// Navigation
|
||||||
function AssetBrowser::navigateTo(%this, %address, %historyNav)
|
function AssetBrowser::navigateTo(%this, %address, %historyNav)
|
||||||
{
|
{
|
||||||
|
//Sanitize
|
||||||
|
if(startsWith(%address, "/"))
|
||||||
|
%address = strreplace(%address, "/", "");
|
||||||
|
|
||||||
//Don't bother navigating if it's to the place we already are
|
//Don't bother navigating if it's to the place we already are
|
||||||
if(AssetBrowser.dirHandler.currentAddress !$= %address)
|
if(AssetBrowser.dirHandler.currentAddress !$= %address)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -686,6 +686,7 @@ function ImportAssetWindow::doRefresh(%this)
|
||||||
|
|
||||||
//Go ahead and check if we have any issues, and if not, run the import!
|
//Go ahead and check if we have any issues, and if not, run the import!
|
||||||
ImportAssetWindow.importer.ImportAssets();
|
ImportAssetWindow.importer.ImportAssets();
|
||||||
|
ImportAssetWindow.importer.resetImportSession(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,11 @@ function ImportAssetConfigList::onSelect( %this, %id, %text )
|
||||||
ImportAssetWindow.activeImportConfigIndex = %id;
|
ImportAssetWindow.activeImportConfigIndex = %id;
|
||||||
//ImportAssetWindow.activeImportConfig = ImportAssetWindow.importConfigsList.getKey(%id);
|
//ImportAssetWindow.activeImportConfig = ImportAssetWindow.importConfigsList.getKey(%id);
|
||||||
|
|
||||||
if(!isObject(%this.activeImporConfig))
|
if(!isObject(ImportAssetWindow.activeImportConfig))
|
||||||
%this.activeImporConfig = new AssetImportConfig();
|
ImportAssetWindow.activeImportConfig = new AssetImportConfig();
|
||||||
|
|
||||||
%this.activeImporConfig.loadImportConfig(AssetImportSettings, ImportAssetWindow.importConfigsList.getKey(%id));
|
ImportAssetWindow.activeImportConfig.loadImportConfig(AssetImportSettings, ImportAssetWindow.importConfigsList.getKey(%id));
|
||||||
|
ImportAssetWindow.importer.setImportConfig(ImportAssetWindow.activeImportConfig);
|
||||||
|
|
||||||
//If we were trying to import anything, refresh it with the new config
|
//If we were trying to import anything, refresh it with the new config
|
||||||
ImportAssetWindow.importer.resetImportSession();
|
ImportAssetWindow.importer.resetImportSession();
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,9 @@ function directoryHandler::loadFolders(%this, %path, %parentId)
|
||||||
//we don't need to display the shadercache folder
|
//we don't need to display the shadercache folder
|
||||||
if(%parentName $= "Data" && (%folderName $= "shaderCache" || %folderName $= "cache"))
|
if(%parentName $= "Data" && (%folderName $= "shaderCache" || %folderName $= "cache"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if(%folderName $= ".git")
|
||||||
|
continue;
|
||||||
|
|
||||||
%iconIdx = 3;
|
%iconIdx = 3;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue