Corrected ShapeAsset array initpersist macro to assign arraySize

Uncommented line in preview build function for material assets so they generate the reduced preview image
Added cubeFace to cubemapData import processing vars checked
Updated ShapeBaseImageData convert vars to properly use asset var names
This commit is contained in:
Areloch 2021-08-08 23:44:17 -05:00
parent 34f0f01cea
commit 426f5974da
6 changed files with 23 additions and 23 deletions

View file

@ -447,17 +447,17 @@ function AssetBrowser::buildMaterialAssetPreview(%this, %assetDef, %previewData)
if(isObject(%assetDef.materialDefinitionName))
{
if(isFile(%assetDef.materialDefinitionName.getDiffuseMap(0)))
if(isFile(%assetDef.materialDefinitionName.getDiffuseMap(0)))
{
%difMap = %assetDef.materialDefinitionName.getDiffuseMap(0);
}
else if(%assetDef.materialDefinitionName.getDiffuseMapAsset(0) !$= "")
{
else if(%assetDef.materialDefinitionName.getDiffuseMapAsset(0) !$= "")
{
%imgAsset = AssetDatabase.acquireAsset(%assetDef.materialDefinitionName.getDiffuseMapAsset(0));
%difMap = %imgAsset.getImagePath();
}
}
//%success = saveScaledImage(%difMap, %previewFilePath);
%success = saveScaledImage(%difMap, %previewFilePath);
%previewAsset = new ImageAsset()
{

View file

@ -833,7 +833,7 @@ function T3Dpre4ProjectImporter::processGuiBitmapButtonCtrlLine(%this, %line)
// Datablocks
//==============================================================================
T3Dpre4ProjectImporter::genProcessor("ForestItemData", "shape shapeAsset");
T3Dpre4ProjectImporter::genProcessor("CubeMapData", "cubemapFace cubeMapFaceAsset cubemap cubemapAsset");
T3Dpre4ProjectImporter::genProcessor("CubeMapData", "cubemapFace cubeMapFaceAsset cubemap cubemapAsset cubeFace cubeMapFaceAsset");
T3Dpre4ProjectImporter::genProcessor("DebrisData", "shape shapeAsset shapeFile shapeAsset");
T3Dpre4ProjectImporter::genProcessor("DecalData", "material materialAsset");
T3Dpre4ProjectImporter::genProcessor("ExplosionData", "explosionShape explosionShapeAsset");
@ -846,7 +846,7 @@ T3Dpre4ProjectImporter::genProcessor("PhysicsShapeData", "shape shapeAsset");
T3Dpre4ProjectImporter::genProcessor("PlayerData", "shapeFP shapeFPAsset shapeNameFP shapeFPAsset");
T3Dpre4ProjectImporter::genProcessor("ProjectileData", "projectileShape projectileShapeAsset projectileShapeName projectileShapeAsset");
T3Dpre4ProjectImporter::genProcessor("ShapeBaseData", "shapeFile shapeAsset shape shapeAsset debrisShape debrisShapeAsset debrisShapeName debrisShapeAsset");
T3Dpre4ProjectImporter::genProcessor("ShapeBaseImageData", "shape shapeAsset shapeFP shapeFPAsset shapeFile shapeAsset shapeFileFP shapeFPAsset");
T3Dpre4ProjectImporter::genProcessor("ShapeBaseImageData", "shape shapeAsset[0] shapeFP shapeAsset[1] shapeFile shapeAsset[0] shapeFileFP shapeAsset[1]");
T3Dpre4ProjectImporter::genProcessor("WheeledVehicleTire", "shape shapeAsset shapeFile shapeAsset");
//==============================================================================
// Materials