mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Removes extra assetImportConfigs file
Fixes name handling when finding associated image files on materials Makes parseImageSuffix return back the case-correct suffix given the image's filename Fixes import session reset logic to not have infinite looping happen when activated if files are in the session still(used mainly when import config is changed) Makes sure materials are not processed if they are found in the import config's ignoreMaterials list Makes sure active import config is properly on importer when it's changed in the Import window Tweaked asset browser folder filtering logic so it always rejects .git folders from displaying, and also made the core, tools, cache and shaderCache filtering behavior consistent Fixed navigation of root-level folders if double-clicking on them through the main window Ensured import session is reset after an import happens so no extra files are left over in the importer's list
This commit is contained in:
parent
6153d3c27b
commit
d01341708e
|
|
@ -616,6 +616,9 @@ String AssetImporter::parseImageSuffixes(String assetName, String* suffixType)
|
|||
if (FindMatch::isMatch(searchSuffix.c_str(), assetName.c_str(), false))
|
||||
{
|
||||
//We have a match, so indicate as such
|
||||
S32 pos = assetName.length();
|
||||
pos -= searchSuffix.length();
|
||||
suffix = assetName.substr(pos+1);
|
||||
return suffix;
|
||||
}
|
||||
}
|
||||
|
|
@ -649,6 +652,103 @@ String AssetImporter::getAssetTypeByFile(Torque::Path filePath)
|
|||
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)
|
||||
{
|
||||
importingAssets.clear();
|
||||
|
|
@ -660,9 +760,12 @@ void AssetImporter::resetImportSession(bool hardClearSession)
|
|||
}
|
||||
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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1345,7 +1448,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
|||
for (U32 i = 0; i < suffixCount; i++)
|
||||
{
|
||||
//First, try checking based on the material's assetName for our patternbase
|
||||
String testPath = assetItem->filePath.getPath();
|
||||
String testPath = assetItem->filePath.getRootAndPath();
|
||||
testPath += "/" + assetItem->cleanAssetName + StringUnit::getUnit(suffixList.c_str(), i, ",;");
|
||||
|
||||
String imagePath = AssetImporter::findImagePath(testPath);
|
||||
|
|
@ -1355,7 +1458,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
|||
//got a match!
|
||||
AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, "");
|
||||
|
||||
newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)i);
|
||||
newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t);
|
||||
|
||||
matchedImageTypes[t] = newImageAssetObj;
|
||||
break;
|
||||
|
|
@ -1364,7 +1467,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
|||
{
|
||||
if(materialImageNoSuffix.isNotEmpty())
|
||||
{
|
||||
testPath = assetItem->filePath.getPath();
|
||||
testPath = assetItem->filePath.getRootAndPath();
|
||||
testPath += "/" + materialImageNoSuffix + StringUnit::getUnit(suffixList.c_str(), i, ",;");
|
||||
|
||||
imagePath = AssetImporter::findImagePath(testPath);
|
||||
|
|
@ -1374,7 +1477,7 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem)
|
|||
//got a match!
|
||||
AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, "");
|
||||
|
||||
newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)i);
|
||||
newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t);
|
||||
|
||||
matchedImageTypes[t] = newImageAssetObj;
|
||||
break;
|
||||
|
|
@ -1513,6 +1616,21 @@ void AssetImporter::processShapeMaterialInfo(AssetImportObject* assetItem, S32 m
|
|||
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);
|
||||
|
||||
AssetImportObject* matAssetItem = nullptr;
|
||||
|
|
@ -1556,7 +1674,7 @@ void AssetImporter::processShapeMaterialInfo(AssetImportObject* assetItem, S32 m
|
|||
filePath = imgFileName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
matAssetItem = addImportingAsset("MaterialAsset", shapePathBase + "/", assetItem, matName);
|
||||
AssetImportObject* imageAssetItem = addImportingAsset("ImageAsset", filePath, matAssetItem, "");
|
||||
|
||||
|
|
|
|||
|
|
@ -805,6 +805,14 @@ public:
|
|||
/// </summary>
|
||||
AssetImportConfig* getImportConfig() { return &activeImportConfig; }
|
||||
|
||||
void setImportConfig(AssetImportConfig* importConfig) {
|
||||
if(importConfig != nullptr)
|
||||
activeImportConfig = *importConfig;
|
||||
}
|
||||
|
||||
//
|
||||
static String getTrueFilename(const String& fileName);
|
||||
|
||||
//
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
|
|
@ -821,6 +829,10 @@ public:
|
|||
else if (Platform::isFile(testPath + String(".tif")))
|
||||
imagePath = testPath + String(".tif");
|
||||
|
||||
if(imagePath.isNotEmpty())
|
||||
//This ensures case-correct for the filename
|
||||
imagePath = getTrueFilename(imagePath);
|
||||
|
||||
return imagePath;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -137,6 +137,14 @@ DefineEngineMethod(AssetImporter, deleteImportingAsset, void, (AssetImportObject
|
|||
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),
|
||||
"(string shapePath, GuiTreeViewCtrl ctrl) Collect scene information from "
|
||||
"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" ?>
|
||||
<AssetImportSettings>
|
||||
<Group name="DefaultConfig">
|
||||
<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="NewTest">
|
||||
<Group name="Meshes">
|
||||
<Setting name="invertNormals">0</Setting>
|
||||
<Setting name="calcTangentSpace">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="UpAxisOverride">Z_AXIS</Setting>
|
||||
<Setting name="AdjustCenter">0</Setting>
|
||||
<Setting name="DoScaleOverride">1</Setting>
|
||||
<Setting name="JoinIdenticalVerts">1</Setting>
|
||||
<Setting name="reverseWindingOrder">0</Setting>
|
||||
<Setting name="ScaleOverride">0.01</Setting>
|
||||
<Setting name="invertNormals">0</Setting>
|
||||
<Setting name="limitBoneWeights">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="LODType">TrailingNumber</Setting>
|
||||
<Setting name="ScaleOverride">1</Setting>
|
||||
<Setting name="DoScaleOverride">0</Setting>
|
||||
</Group>
|
||||
<Group name="Sounds">
|
||||
<Setting name="Compressed">0</Setting>
|
||||
<Setting name="VolumeAdjust">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 name="Collision">
|
||||
<Setting name="GenCollisionType">CollisionMesh</Setting>
|
||||
<Setting name="GenLOSCollisionType">CollisionMesh</Setting>
|
||||
<Setting name="LOSCollisionMeshPrefix">LOS</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="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 name="Materials">
|
||||
<Setting name="IgnoreMaterials">ColorEffect*,</Setting>
|
||||
<Setting name="CreateComposites">1</Setting>
|
||||
<Setting name="UseExistingMaterials">1</Setting>
|
||||
<Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
|
||||
<Setting name="ImportMaterials">1</Setting>
|
||||
<Setting name="AlwaysPresentImageMaps">0</Setting>
|
||||
<Setting name="PopulateMaterialMaps">1</Setting>
|
||||
</Group>
|
||||
<Group name="General">
|
||||
<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>
|
||||
<Setting name="IgnoreMaterials">Default*;</Setting>
|
||||
<Setting name="CreateComposites">1</Setting>
|
||||
</Group>
|
||||
<Group name="Sounds">
|
||||
<Setting name="VolumeAdjust">1.0</Setting>
|
||||
<Setting name="Compressed">0</Setting>
|
||||
<Setting name="PitchAdjust">1.0</Setting>
|
||||
<Setting name="Compressed">0</Setting>
|
||||
</Group>
|
||||
<Group name="Materials">
|
||||
<Setting name="ImportMaterials">1</Setting>
|
||||
<Setting name="UseExistingMaterials">1</Setting>
|
||||
<Setting name="CreateComposites">1</Setting>
|
||||
<Setting name="PopulateMaterialMaps">1</Setting>
|
||||
<Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
|
||||
<Group name="General">
|
||||
<Setting name="DuplicatAutoResolution">AutoPrune</Setting>
|
||||
</Group>
|
||||
<Group name="Animations">
|
||||
<Setting name="SeparateAnimations">1</Setting>
|
||||
<Setting name="ImportAnimations">1</Setting>
|
||||
</Group>
|
||||
</Group>
|
||||
</AssetImportSettings>
|
||||
|
|
|
|||
|
|
@ -1492,6 +1492,15 @@ function AssetBrowser::doRebuildAssetArray(%this)
|
|||
else
|
||||
{
|
||||
//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 );
|
||||
}
|
||||
}
|
||||
|
|
@ -1856,6 +1865,10 @@ function AssetBrowserAssetSearchBtn::onClick( %this )
|
|||
// Navigation
|
||||
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
|
||||
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!
|
||||
ImportAssetWindow.importer.ImportAssets();
|
||||
ImportAssetWindow.importer.resetImportSession(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,10 +12,11 @@ function ImportAssetConfigList::onSelect( %this, %id, %text )
|
|||
ImportAssetWindow.activeImportConfigIndex = %id;
|
||||
//ImportAssetWindow.activeImportConfig = ImportAssetWindow.importConfigsList.getKey(%id);
|
||||
|
||||
if(!isObject(%this.activeImporConfig))
|
||||
%this.activeImporConfig = new AssetImportConfig();
|
||||
if(!isObject(ImportAssetWindow.activeImportConfig))
|
||||
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
|
||||
ImportAssetWindow.importer.resetImportSession();
|
||||
|
|
|
|||
|
|
@ -39,6 +39,9 @@ function directoryHandler::loadFolders(%this, %path, %parentId)
|
|||
//we don't need to display the shadercache folder
|
||||
if(%parentName $= "Data" && (%folderName $= "shaderCache" || %folderName $= "cache"))
|
||||
continue;
|
||||
|
||||
if(%folderName $= ".git")
|
||||
continue;
|
||||
|
||||
%iconIdx = 3;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue