Merge branch 'Preview4_0' into alpha40_HiddenHugs

This commit is contained in:
AzaezelX 2020-03-29 17:40:22 -05:00
commit 9c71d5eace
570 changed files with 17252 additions and 8836 deletions

View file

@ -275,7 +275,7 @@ singleton PostEffect( SSAOPostFx )
allowReflectPass = false;
renderTime = "PFXBeforeBin";
renderBin = "AL_LightBinMgr";
renderBin = "ProbeBin";
renderPriority = 10;
shader = SSAOShader;

View file

@ -6,4 +6,9 @@
CreateFunction="onCreate"
DestroyFunction="onDestroy"
Group="Core">
<DeclaredAssets
canSave="true"
canSaveDynamicFields="true"
Extension="asset.taml"
Recurse="true" />
</ModuleDefinition>

View file

@ -0,0 +1,6 @@
<ShapeAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="noshape"
fileName="@assetFile=noshape.dts"
VersionId="1" />

View file

@ -38,7 +38,7 @@ $pref::Input::JoystickEnabled = 0;
$pref::Video::ProfilePath = "core/rendering/scripts/gfxprofile";
$pref::Video::disableVerticalSync = 1;
$pref::Video::mode = "800 600 false 32 60 4";
$pref::Video::mode = "1920 1080 false 32 60 4";
$pref::Video::defaultFenceCount = 0;
// This disables the hardware FSAA/MSAA so that we depend completely on the FXAA

View file

@ -2,7 +2,8 @@
canSave="true"
canSaveDynamicFields="true"
AssetName="ExampleLevel"
LevelFile="ExampleLevel.mis"
LevelFile="@assetFile=ExampleLevel.mis"
LevelName="Example Level"
isSubScene="false"
Description="An example level asset"
VersionId="1" />

View file

@ -121,16 +121,20 @@ function initializeAssetBrowser()
ImportAssetWindow.reloadImportOptionConfigs();
if(!isObject(ImportAssetTree))
new GuiTreeViewCtrl(ImportAssetTree);
if(!isObject(ImportAssetWindow.importTempDirHandler))
ImportAssetWindow.importTempDirHandler = makedirectoryHandler(0, "", "");
if(!isObject(ImportActivityLog))
new ArrayObject(ImportActivityLog);
ImportAssetWindow.importingFilesArray = new ArrayObject();
ImportAssetWindow.importAssetUnprocessedListArray = new ArrayObject();
ImportAssetWindow.importAssetFinalListArray = new ArrayObject();
if(!isObject(SessionImportAssetItems))
new ArrayObject(SessionImportAssetItems);
if(!isObject(ImportAssetItems))
new ArrayObject(ImportAssetItems);
AssetBrowser.buildPopupMenus();
//Force everything to initialize if other things need to reference it's behavior before we're displayed(usually other tools)

View file

@ -61,26 +61,6 @@ function AssetBrowser::onWake(%this)
//First, build our our list of active modules
%modulesList = ModuleDatabase.findModules(true);
%nonDefaultModuleCount = 0;
for(%i=0; %i < getWordCount(%modulesList); %i++)
{
%moduleName = getWord(%modulesList, %i).ModuleId;
%moduleGroup = getWord(%modulesList, %i).Group;
if((%moduleGroup $= "Core" && !%this.coreModulesFilter) || (%moduleGroup $= "Tools" && !%this.toolsModulesFilter))
continue;
%nonDefaultModuleCount++;
}
if(%nonDefaultModuleCount == 0)
{
MessageBoxYesNo( "Import Template Content?",
"You have no modules or content. Do you want to import a module from the template content?",
"AssetBrowser.ImportTemplateModules();", "" );
}
%this.setPreviewSize(EditorSettings.value("Assets/Browser/previewTileSize", "small"));
AssetBrowser.toggleAssetTypeFilter(0);

View file

@ -9,10 +9,6 @@ function ImportAssetConfigList::onSelect( %this, %id, %text )
ImportActivityLog.add("Asset Import Configs set to " @ %text);
ImportActivityLog.add("");
ImportAssetWindow.importAssetUnprocessedListArray.empty();
ImportAssetWindow.importAssetUnprocessedListArray.duplicate(AssetBrowser.importAssetNewListArray);
ImportAssetWindow.importAssetFinalListArray.empty();
ImportAssetWindow.activeImportConfigIndex = %id;
ImportAssetWindow.activeImportConfig = ImportAssetWindow.importConfigsList.getKey(%id);

View file

@ -33,10 +33,10 @@ function AssetImportConfigList::onSelect( %this, %id, %text )
%this.populateConfigListByGroup("General");
%this.populateConfigListByGroup("Meshes");
%this.populateConfigListByGroup("Materials");
//%this.populateConfigListByGroup("Animations");
//%this.populateConfigListByGroup("Images");
//%this.populateConfigListByGroup("Collision");
//%this.populateConfigListByGroup("Sound");
%this.populateConfigListByGroup("Animations");
%this.populateConfigListByGroup("Images");
%this.populateConfigListByGroup("Collision");
%this.populateConfigListByGroup("Sound");
ImportOptionsConfigList.update();
}

View file

@ -1,9 +1,9 @@
function AssetBrowser::prepareImportImageAsset(%this, %assetItem)
{
if(getAssetImportConfigValue("Images/GenerateMaterialOnImport", "1") == 1 && %assetItem.parentAssetItem $= "")
if((getAssetImportConfigValue("Images/GenerateMaterialOnImport", "1") == 1 && %assetItem.parentAssetItem $= "") || %assetItem.parentAssetItem !$= "")
{
//First, see if this already has a suffix of some sort based on our import config logic. Many content pipeline tools like substance automatically appends them
%foundSuffixType = ImportAssetWindow.parseImageSuffixes(%assetItem);
%foundSuffixType = parseImageSuffixes(%assetItem);
if(%foundSuffixType $= "")
{
@ -20,31 +20,42 @@ function AssetBrowser::prepareImportImageAsset(%this, %assetItem)
%materialAsset = ImportAssetWindow.findImportingAssetByName(%noSuffixName);
%cratedNewMaterial = false;
//Sanity catch in the case we have some naming convention shenanigans in play
if(%materialAsset != 0 && %materialAsset.assetType !$= "MaterialAsset")
%materialAsset = 0;
if(%materialAsset == 0)
{
%filePath = %assetItem.filePath;
if(%filePath !$= "")
%materialAsset = AssetBrowser.addImportingAsset("MaterialAsset", "", "", %noSuffixName);
%materialAsset.filePath = filePath(%assetItem.filePath) @ "/" @ %noSuffixName;
//%materialAsset.filePath = filePath(%assetItem.filePath) @ "/" @ %noSuffixName;
ImportAssetItems.add(%materialAsset);
%cratedNewMaterial = true;
}
if(isObject(%materialAsset))
{
//Establish parentage
%itemId = ImportAssetTree.findItemByObjectId(%assetItem);
%materialItemId = ImportAssetTree.findItemByObjectId(%materialAsset);
if(%assetItem.parentAssetItem !$= "")
{
%parentIndex = %assetItem.parentAssetItem.childAssetItems.getIndexFromKey(%assetItem);
%assetItem.parentAssetItem.childAssetItems.erase(%parentIndex);
}
else
{
//if we didn't have a parent until now, we're going to pull from it from our ImportAssetItems list
%itemIndex = ImportAssetItems.getIndexFromKey(%assetItem);
ImportAssetItems.erase(%itemIndex);
}
%assetItem.parentId = %materialItemId;
//Establish parentage
%materialAsset.childAssetItems.add(%assetItem);
%assetItem.parentAssetItem = %materialAsset;
ImportAssetTree.reparentItem(%itemId, %materialItemId);
ImportAssetWindow.assetHeirarchyChanged = true;
ImportAssetTree.buildVisibleTree(true);
}
//Lets do some cleverness here. If we're generating a material we can parse like assets being imported(similar file names) but different suffixes
@ -81,7 +92,7 @@ function AssetBrowser::prepareImportImageAsset(%this, %assetItem)
if(getAssetImportConfigValue("Materials/PopulateMaterialMaps", "1") == 1)
{
if(%foundSuffixType $= "diffuse")
%assetItem.ImageType = "Abledo";
%assetItem.ImageType = "Albedo";
else if(%foundSuffixType $= "normal")
%assetItem.ImageType = "Normal";
else if(%foundSuffixType $= "metalness")
@ -98,13 +109,15 @@ function AssetBrowser::prepareImportImageAsset(%this, %assetItem)
}
//If we JUST created this material, we need to do a process pass on it to do any other setup for it
if(%cratedNewMaterial)
/*if(%cratedNewMaterial)
{
AssetBrowser.prepareImportMaterialAsset(%materialAsset);
}
}*/
}
%assetItem.processed = true;
refreshImportAssetWindow();
}
function AssetBrowser::inspectImportingImageAsset(%this, %assetItem)
@ -136,6 +149,7 @@ function AssetBrowser::importImageAsset(%this, %assetItem)
versionId = 1;
imageFile = fileName(%filePath);
originalFilePath = %filePath;
imageType = %assetItem.imageType;
};
%assetImportSuccessful = TAMLWrite(%newAsset, %assetPath @ "/" @ %assetName @ ".asset.taml");
@ -170,7 +184,18 @@ function AssetBrowser::buildImageAssetPreview(%this, %assetDef, %previewData)
%previewData.assetFriendlyName = %assetDef.assetName;
%previewData.assetDesc = %assetDef.description;
%previewData.tooltip = %assetDef.friendlyName @ "\n" @ %assetDef;
//image info
%info = %assetDef.getImageInfo();
%previewData.tooltip = "Asset Name: " @ %assetDef.assetName @ "\n" @
"Asset Type: Image Asset\n" @
"Asset Defition ID: " @ %assetDef @ "\n" @
"Image Type: " @ %assetDef.imageType @ "\n" @
"Format: " @ getWord(%info, 0) @ "\n" @
"Height: " @ getWord(%info, 1) @ "\n" @
"Width: " @ getWord(%info, 2) @ "\n" @
"Depth: " @ getWord(%info, 3);
}
//Renames the asset
@ -226,4 +251,176 @@ function GuiInspectorTypeImageAssetPtr::onControlDropped( %this, %payload, %posi
}
EWorldEditor.isDirty = true;
}
function parseImageSuffixes(%assetItem)
{
//diffuse
%suffixCount = getTokenCount(getAssetImportConfigValue("Images/DiffuseTypeSuffixes", ""), ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(getAssetImportConfigValue("Images/DiffuseTypeSuffixes", ""), ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %assetItem.AssetName))
{
%assetItem.imageSuffixType = %suffixToken;
return "diffuse";
}
}
//normal
%suffixCount = getTokenCount(getAssetImportConfigValue("Images/NormalTypeSuffixes", ""), ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(getAssetImportConfigValue("Images/NormalTypeSuffixes", ""), ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %assetItem.AssetName))
{
%assetItem.imageSuffixType = %suffixToken;
return "normal";
}
}
//roughness
%suffixCount = getTokenCount(getAssetImportConfigValue("Images/RoughnessTypeSuffixes", ""), ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(getAssetImportConfigValue("Images/RoughnessTypeSuffixes", ""), ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %assetItem.AssetName))
{
%assetItem.imageSuffixType = %suffixToken;
return "roughness";
}
}
//Ambient Occlusion
%suffixCount = getTokenCount(getAssetImportConfigValue("Images/AOTypeSuffixes", ""), ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(getAssetImportConfigValue("Images/AOTypeSuffixes", ""), ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %assetItem.AssetName))
{
%assetItem.imageSuffixType = %suffixToken;
return "AO";
}
}
//metalness
%suffixCount = getTokenCount(getAssetImportConfigValue("Images/MetalnessTypeSuffixes", ""), ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(getAssetImportConfigValue("Images/MetalnessTypeSuffixes", ""), ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %assetItem.AssetName))
{
%assetItem.imageSuffixType = %suffixToken;
return "metalness";
}
}
//composite
%suffixCount = getTokenCount(getAssetImportConfigValue("Images/CompositeTypeSuffixes", ""), ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(getAssetImportConfigValue("Images/CompositeTypeSuffixes", ""), ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %assetItem.AssetName))
{
%assetItem.imageSuffixType = %suffixToken;
return "composite";
}
}
//specular
/*%suffixCount = getTokenCount(ImportAssetWindow.activeImportConfig.SpecularTypeSuffixes, ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(ImportAssetWindow.activeImportConfig.SpecularTypeSuffixes, ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %assetItem.AssetName))
{
%assetItem.imageSuffixType = %suffixToken;
return "specular";
}
}*/
return "";
}
function parseImagePathSuffixes(%filePath)
{
//diffuse
%diffuseSuffixes = getAssetImportConfigValue("Images/DiffuseTypeSuffixes", "");
%suffixCount = getTokenCount(%diffuseSuffixes, ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(%diffuseSuffixes, ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %filePath))
{
return "diffuse";
}
}
//normal
%suffixCount = getTokenCount(ImportAssetWindow.activeImportConfig.NormalTypeSuffixes, ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(ImportAssetWindow.activeImportConfig.NormalTypeSuffixes, ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %filePath))
{
return "normal";
}
}
//roughness
%suffixCount = getTokenCount(ImportAssetWindow.activeImportConfig.RoughnessTypeSuffixes, ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(ImportAssetWindow.activeImportConfig.RoughnessTypeSuffixes, ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %filePath))
{
return "roughness";
}
}
//Ambient Occlusion
%suffixCount = getTokenCount(ImportAssetWindow.activeImportConfig.AOTypeSuffixes, ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(ImportAssetWindow.activeImportConfig.AOTypeSuffixes, ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %filePath))
{
return "AO";
}
}
//metalness
%suffixCount = getTokenCount(ImportAssetWindow.activeImportConfig.MetalnessTypeSuffixes, ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(ImportAssetWindow.activeImportConfig.MetalnessTypeSuffixes, ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %filePath))
{
return "metalness";
}
}
//composite
%suffixCount = getTokenCount(ImportAssetWindow.activeImportConfig.CompositeTypeSuffixes, ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(ImportAssetWindow.activeImportConfig.CompositeTypeSuffixes, ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %filePath))
{
return "composite";
}
}
//specular
%suffixCount = getTokenCount(ImportAssetWindow.activeImportConfig.SpecularTypeSuffixes, ",;");
for(%sfx = 0; %sfx < %suffixCount; %sfx++)
{
%suffixToken = getToken(ImportAssetWindow.activeImportConfig.SpecularTypeSuffixes, ",;", %sfx);
if(strIsMatchExpr("*"@%suffixToken, %filePath))
{
return "specular";
}
}
return "";
}

View file

@ -84,7 +84,7 @@ function AssetBrowser::moveMaterialAsset(%this, %assetDef, %destination)
function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
{
ImportActivityLog.add("Preparing Shape for Import: " @ %assetItem.assetName);
ImportActivityLog.add("Preparing Material for Import: " @ %assetItem.assetName);
//Iterate over to find appropriate images for
@ -93,6 +93,8 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
%fileName = fileBase(%assetItem.filePath);
%fileExt = fileExt(%assetItem.filePath);
%assetItem.generatedAsset = true;
//Check if we need to filter this material out or not
if(getAssetImportConfigValue("Materials/IgnoreMaterials", "") !$= "")
{
@ -117,7 +119,20 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
{
ImportActivityLog.add("Attempting to Auto-Populate Material Maps");
%materialItemId = ImportAssetTree.findItemByObjectId(%assetItem);
for(%i=0; %i < %assetItem.childAssetItems.count(); %i++)
{
%childAssetItem = %assetItem.childAssetItems.getKey(%i);
if(!isObject(%childAssetItem) || %childAssetItem.skip || %childAssetItem.processed == true || %childAssetItem.assetType !$= "ImageAsset")
return;
if(%childAssetItem.imageType $= "Albedo")
{
%assetItem.diffuseImageAsset = %childAssetItem;
}
}
/*%materialItemId = ImportAssetTree.findItemByObjectId(%assetItem);
if(%assetItem.diffuseImageAsset $= "")
{
@ -129,7 +144,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
{
ImportActivityLog.add("Auto-Populated Diffuse Map Image Asset via file: " @ %targetFilePath);
%diffuseAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%diffuseAsset = AssetBrowser.addImportingAsset("ImageAsset", %targetFilePath, %assetItem);
%assetItem.diffuseImageAsset = %diffuseAsset;
}
}
@ -146,7 +161,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
{
ImportActivityLog.add("Auto-Populated Normal Map Image Asset via file: " @ %targetFilePath);
%normalAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%normalAsset = AssetBrowser.addImportingAsset("ImageAsset", %targetFilePath, %assetItem);
%assetItem.normalImageAsset = %normalAsset;
}
}
@ -161,7 +176,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
{
ImportActivityLog.add("Auto-Populated Metalness Map Image Asset via file: " @ %targetFilePath);
%metalAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%metalAsset = AssetBrowser.addImportingAsset("ImageAsset", %targetFilePath, %assetItem);
%assetItem.metalImageAsset = %metalAsset;
}
}
@ -176,7 +191,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
{
ImportActivityLog.add("Auto-Populated Roughness Map Image Asset via file: " @ %targetFilePath);
%roughnessAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%roughnessAsset = AssetBrowser.addImportingAsset("ImageAsset", %targetFilePath, %assetItem);
%assetItem.roughnessImageAsset = %roughnessAsset;
}
}
@ -191,7 +206,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
{
ImportActivityLog.add("Auto-Populated Smoothness Map Image Asset via file: " @ %targetFilePath);
%smoothnessAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%smoothnessAsset = AssetBrowser.addImportingAsset("ImageAsset", %targetFilePath, %assetItem);
%assetItem.SmoothnessImageAsset = %smoothnessAsset;
}
}
@ -206,7 +221,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
{
ImportActivityLog.add("Auto-Populated AO Map Image Asset via file: " @ %targetFilePath);
%AOAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%AOAsset = AssetBrowser.addImportingAsset("ImageAsset", %targetFilePath, %assetItem);
%assetItem.AOImageAsset = %AOAsset;
}
}
@ -221,7 +236,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
{
ImportActivityLog.add("Auto-Populated Composite Map Image Asset via file: " @ %targetFilePath);
%compositeAsset = AssetBrowser.addImportingAsset("Image", %targetFilePath, %assetItem);
%compositeAsset = AssetBrowser.addImportingAsset("ImageAsset", %targetFilePath, %assetItem);
%assetItem.compositeImageAsset = %compositeAsset;
}
}
@ -240,15 +255,17 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
ImportActivityLog.add("Auto-Generated Composite Map from ORM maps");
%compositeAsset = AssetBrowser.addImportingAsset("Image", "", %assetItem, %assetItem.assetName @ "_composite");
%compositeAsset = AssetBrowser.addImportingAsset("ImageAsset", "", %assetItem, %assetItem.assetName @ "_composite");
%compositeAsset.generatedAsset = true;
%compositeAsset.filePath = %saveAsPath;
%assetItem.compositeImageAsset = %compositeAsset;
}
}*/
}
%assetItem.processed = true;
refreshImportAssetWindow();
}
function AssetBrowser::findMaterialMapFileWSuffix(%this, %fileDir, %filename, %fileExt, %suffixesList)
@ -307,31 +324,21 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem)
};
//check dependencies
%importItem = ImportAssetTree.findItemByObjectId(%assetItem);
if(ImportAssetTree.isParentItem(%importItem))
%dependencySlotId = 0;
for(%i=0; %i < %assetItem.childAssetItems.count(); %i++)
{
%imageSlot = 0;
%childId = ImportAssetTree.getChild(%importItem);
while(%childId > 0)
{
%dependencyAssetItem = ImportAssetTree.getItemObject(%childId);
if(%dependencyAssetItem.skip)
{
%childId = ImportAssetTree.getNextSibling(%childId);
continue;
}
%depAssetType = %dependencyAssetItem.assetType;
if(%depAssetType $= "Image")
{
%matSet = "%newAsset.imageMap"@%imageSlot@"=\"@Asset="@%moduleName@":"@%dependencyAssetItem.assetName@"\";";
eval(%matSet);
}
%childId = ImportAssetTree.getNextSibling(%childId);
%imageSlot++;
}
%childAssetItem = %assetItem.childAssetItems.getKey(%i);
if(!isObject(%childAssetItem) || %childAssetItem.skip || %childAssetItem.processed == false)
continue;
%depAssetType = %childAssetItem.assetType;
if(%depAssetType $= "ImageAsset")
{
%matSet = "%newAsset.imageMap"@%dependencySlotId@"=\"@Asset="@%moduleName@":"@%childAssetItem.assetName@"\";";
eval(%matSet);
%dependencySlotId++;
}
}
%assetImportSuccessful = TamlWrite(%newAsset, %tamlpath);
@ -368,46 +375,34 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem)
//TODO: pass along the shape's target material for this just to be sure
%file.writeLine(" mapTo = \"" @ %assetName @ "\";");
if(%assetItem.diffuseImageAsset !$= "")
//now we re-iterate back over our child items so we can map them correctly
for(%i=0; %i < %assetItem.childAssetItems.count(); %i++)
{
%diffuseAssetPath = %assetPath @ fileName(%assetItem.diffuseImageAsset.filePath);
%file.writeline(" DiffuseMap[0] = \"" @ %diffuseAssetPath @"\";");
%file.writeline(" DiffuseMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.diffuseImageAsset.assetName @"\";");
}
if(%assetItem.normalImageAsset)
{
%normalAssetPath = %assetPath @ fileName(%assetItem.normalImageAsset.filePath);
%file.writeline(" NormalMap[0] = \"" @ %normalAssetPath @"\";");
%file.writeline(" NormalMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.normalImageAsset.assetName @"\";");
}
if(%assetItem.roughnessImageAsset && %assetItem.roughnessImageAsset.skip == false)
{
%roughAssetPath = %assetPath @ fileName(%assetItem.roughnessImageAsset.filePath);
%file.writeline(" RoughMap[0] = \"" @ %roughAssetPath @"\";");
%file.writeline(" RoughMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.roughnessImageAsset.assetName @"\";");
}
if(%assetItem.smoothnessImageAsset && %assetItem.smoothnessImageAsset.skip == false)
{
%smoothnessAssetPath = %assetPath @ fileName(%assetItem.smoothnessImageAsset.filePath);
%file.writeline(" SmoothnessMap[0] = \"" @ %smoothnessAssetPath @"\";");
%file.writeline(" SmoothnessMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.smoothnessImageAsset.assetName @"\";");
}
if(%assetItem.metalnessImageAsset && %assetItem.metalnessImageAsset.skip == false)
{
%metalAssetPath = %assetPath @ fileName(%assetItem.metalnessImageAsset.filePath);
%file.writeline(" MetalMap[0] = \"" @ %metalAssetPath @"\";");
%file.writeline(" MetalMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.metalnessImageAsset.assetName @"\";");
}
if(%assetItem.AOImageAsset && %assetItem.AOImageAsset.skip == false)
{
%AOAssetPath = %assetPath @ fileName(%assetItem.AOImageAsset.filePath);
%file.writeline(" AOMap[0] = \"" @ %AOAssetPath @"\";");
%file.writeline(" AOMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.AOImageAsset.assetName @"\";");
}
if(%assetItem.PBRConfigMapImageAsset)
{
%file.writeline(" PBRConfigMap[0] = \"" @ %assetItem.compositeImageAsset.filePath @"\";");
%file.writeline(" PBRConfigMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.compositeImageAsset.assetName @"\";");
%childAssetItem = %assetItem.childAssetItems.getKey(%i);
if(!isObject(%childAssetItem) || %childAssetItem.skip || %childAssetItem.processed == false)
continue;
if(%childAssetItem.assetType $= "ImageAsset")
{
%mapFieldName = "";
if(%childAssetItem.imageType $= "Albedo")
%mapFieldName = "DiffuseMap";
else if(%childAssetItem.imageType $= "Normal")
%mapFieldName = "NormalMap";
else if(%childAssetItem.imageType $= "Metalness")
%mapFieldName = "MetalMap";
else if(%childAssetItem.imageType $= "Roughness")
%mapFieldName = "RoughnessMap";
else if(%childAssetItem.imageType $= "AO")
%mapFieldName = "AOMap";
else if(%childAssetItem.imageType $= "Composite")
%mapFieldName = "PBRConfigMap";
%assetPath = fileName(%childAssetItem.filePath);
%file.writeline(" "@ %mapFieldName @ "[0] = \"" @ %assetPath @"\";");
%file.writeline(" "@ %mapFieldName @ "Asset[0] = \"" @ %moduleName @ ":" @ %childAssetItem.assetName @"\";");
}
}
%file.writeline("};");
%file.writeline("//--- OBJECT WRITE END ---");
@ -453,7 +448,9 @@ function AssetBrowser::buildMaterialAssetPreview(%this, %assetDef, %previewData)
%previewData.assetFriendlyName = %assetDef.assetName;
%previewData.assetDesc = %assetDef.description;
%previewData.tooltip = %assetDef.friendlyName @ "\n" @ %assetDef;
%previewData.tooltip = "Asset Name: " @ %assetDef.assetName @ "\n" @
"Asset Type: Material Asset\n" @
"Asset Defition ID: " @ %assetDef;
}
function AssetBrowser::onMaterialAssetEditorDropped(%this, %assetDef, %position)

View file

@ -76,7 +76,7 @@ function AssetBrowser::prepareImportShapeAsset(%this, %assetItem)
%shapeCount = %assetItem.shapeInfo._meshCount;
%shapeItem = %assetItem.shapeInfo.findItemByName("Meshes");
%shapeId = ImportAssetTree.findItemByObjectId(%assetItem);
//%shapeId = ImportAssetTree.findItemByObjectId(%assetItem);
if(getAssetImportConfigValue("Meshes/ImportMesh", "1") == 1 && %shapeCount > 0)
{
@ -132,39 +132,39 @@ function AssetBrowser::importShapeAsset(%this, %assetItem)
};
//check dependencies
%importItem = ImportAssetTree.findItemByObjectId(%assetItem);
if(ImportAssetTree.isParentItem(%importItem))
%dependencySlotId = 0;
for(%i=0; %i < %assetItem.childAssetItems.count(); %i++)
{
%matSlotId = 0;
%childId = ImportAssetTree.getChild(%importItem);
while(%childId > 0)
{
%dependencyAssetItem = ImportAssetTree.getItemObject(%childId);
%depAssetType = %dependencyAssetItem.assetType;
if(%depAssetType $= "MaterialAsset")
{
%matSet = "%newAsset.materialSlot"@%matSlotId@"=\"@Asset="@%moduleName@":"@%dependencyAssetItem.assetName@"\";";
eval(%matSet);
}
if(%depAssetType $= "AnimationAsset")
{
%matSet = "%newAsset.animationSequence"@%matSlotId@"=\"@Asset="@%moduleName@":"@%dependencyAssetItem.assetName@"\";";
eval(%matSet);
}
%childId = ImportAssetTree.getNextSibling(%childId);
%matSlotId++;
}
%childAssetItem = %assetItem.childAssetItems.getKey(%i);
if(!isObject(%childAssetItem) || %childAssetItem.skip || %childAssetItem.processed == false)
continue;
%depAssetType = %childAssetItem.assetType;
if(%childAssetItem.assetType $= "MaterialAsset")
{
%matSet = "%newAsset.materialSlot"@%dependencySlotId@"=\"@Asset="@%moduleName@":"@%childAssetItem.assetName@"\";";
eval(%matSet);
%dependencySlotId++;
}
else if(%depAssetType $= "AnimationAsset")
{
%matSet = "%newAsset.animationSequence"@%dependencySlotId@"=\"@Asset="@%moduleName@":"@%childAssetItem.assetName@"\";";
eval(%matSet);
%dependencySlotId++;
}
}
%assetImportSuccessful = TAMLWrite(%newAsset, %assetPath @ %assetName @ ".asset.taml");
//and copy the file into the relevent directory
%doOverwrite = !AssetBrowser.isAssetReImport;
if(!pathCopy(%filePath, %assetFullPath, %doOverwrite))
if(filePath(%filePath) !$= filePath(%assetFullPath))
{
error("Unable to import asset: " @ %filePath);
%doOverwrite = !AssetBrowser.isAssetReImport;
if(!pathCopy(%filePath, %assetFullPath, %doOverwrite))
{
error("Unable to import asset: " @ %filePath);
}
}
%constructor = ShapeEditor.findConstructor( %assetFullPath );
@ -223,7 +223,7 @@ function AssetBrowser::importShapeAsset(%this, %assetItem)
ShapeEditor.saveConstructor( %constructor );
//now, force-load the file if it's collada
%fileExt = fileExt(%assetFullPath);
/*%fileExt = fileExt(%assetFullPath);
if(isSupportedFormat(getSubStr(%fileExt,1)))
{
%tempShape = new TSStatic()
@ -232,7 +232,7 @@ function AssetBrowser::importShapeAsset(%this, %assetItem)
};
%tempShape.delete();
}
}*/
%moduleDef = ModuleDatabase.findModule(%moduleName,1);
@ -251,7 +251,9 @@ function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData)
%previewData.assetFriendlyName = %assetDef.assetName;
%previewData.assetDesc = %assetDef.description;
%previewData.tooltip = %assetDef.friendlyName @ "\n" @ %assetDef;
%previewData.tooltip = "Asset Name: " @ %assetDef.assetName @ "\n" @
"Asset Type: Shape Asset\n" @
"Asset Defition ID: " @ %assetDef;
}
function AssetBrowser::onShapeAssetEditorDropped(%this, %assetDef, %position)
@ -324,7 +326,13 @@ function processShapeMaterialInfo(%assetItem, %materialItem)
//could be a stale path reference, such as if it was downloaded elsewhere. Trim to just the filename and see
//if we can find it there
%shapePathBase = filePath(%assetItem.filePath);
%imageFileName = %shapePathBase @ "/" @ fileName(%filePath);
%filename = fileName(%filePath);
%suffixPos = strpos(strlwr(%filename), " (not found)", 0);
%filename = getSubStr(%filename, 0, %suffixPos);
%imageFileName = %shapePathBase @ "/" @ %filename;
if(isFile(%imageFileName))
%filePath = %imageFileName;
}

View file

@ -139,6 +139,15 @@ function AssetBrowser::editModuleInfo(%this)
ModuleEditInspector.endGroup();
}
function AssetBrowser::editModuleScript(%this)
{
%moduleDef = ModuleDatabase.findModule(AssetBrowser.selectedModule, 1);
%scriptFile = %moduleDef.ModuleScriptFilePath;
EditorOpenFileInTorsion(makeFullPath(%scriptFile), 0);
}
function AssetBrowser::renameModule(%this)
{

View file

@ -192,7 +192,8 @@ function LooseFileAuditWindow::importImage(%this)
if(!ImportAssetWindow.isAwake())
ImportAssetWindow.showDialog();
AssetBrowser.addImportingAsset("ImageAsset", LooseFileList.itemPath, "", "");
%assetItem = AssetBrowser.addImportingAsset("ImageAsset", LooseFileList.itemPath, "", "");
ImportAssetItems.add(%assetItem);
LooseFileList.removeItem(LooseFileList.selectedItem, false);
LooseFileList.buildVisibleTree(true);
LooseFileList.expandItem(0);

View file

@ -178,14 +178,15 @@ function AssetBrowser::buildPopupMenus(%this)
item[ 0 ] = "New Asset" TAB AddNewAssetPopup;
item[ 1 ] = "Reload Module" TAB "" TAB "AssetBrowser.reloadModule();";
Item[ 2 ] = "-";
Item[ 3 ] = "Edit Module" TAB "" TAB "AssetBrowser.editModuleInfo();";
Item[ 4 ] = "-";
Item[ 5 ] = "Duplicate Module" TAB "" TAB "AssetBrowser.copyModule();";
Item[ 6 ] = "-";
Item[ 7 ] = "Delete Module" TAB "" TAB "AssetBrowser.deleteModule();";
item[ 8 ] = "-";
item[ 9 ] = "Import Loose Files" TAB "" TAB "AssetBrowser.importLooseFiles();";
Item[ 2 ] = "Edit Module" TAB "" TAB "AssetBrowser.editModuleScript();";
Item[ 3 ] = "-";
Item[ 4 ] = "Module Properties" TAB "" TAB "AssetBrowser.editModuleInfo();";
Item[ 5 ] = "-";
Item[ 6 ] = "Duplicate Module" TAB "" TAB "AssetBrowser.copyModule();";
Item[ 7 ] = "-";
Item[ 8 ] = "Delete Module" TAB "" TAB "AssetBrowser.deleteModule();";
item[ 9 ] = "-";
item[ 10 ] = "Import Loose Files" TAB "" TAB "AssetBrowser.importLooseFiles();";
};
}

View file

@ -65,9 +65,10 @@ singleton Material(Grid_512_Grey_Base)
singleton Material(Grid_512_Orange)
{
diffuseMap[0] = "./512_orange.png";
translucent = "1";
diffuseMap[0] = "tools/base/images/512_orange.png";
translucent = "0";
translucentBlendOp = "PreMul";
mapTo = "512_orange.png";
};
singleton Material(Grid_512_Orange_Lines)

View file

@ -20,3 +20,6 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
%forestBrushesGroup = new SimGroup( ForestBrushGroup )
{
};

View file

@ -467,7 +467,6 @@ function ESettingsWindow::getAssetEditingSettings(%this)
SettingsInspector.startGroup("Assets Importing");
SettingsInspector.addField("Edit Asset Configs", "Edit Asset Import Configs", "button", "Open Asset Import Config Editor", "", "Canvas.pushDialog(AssetImportConfigEditor);");
SettingsInspector.addSettingsField("Assets/AssetImporDefaultConfig", "Default Asset Import Config", "list", "", %formattedConfigList);
SettingsInspector.addSettingsField("Assets/AssetImporDefaultConfig", "Default Asset Import Config", "list", "", %formattedConfigList);
SettingsInspector.addSettingsField("Assets/AutoImport", "Automatically Import using default config", "bool", "If on, the asset importing process" @
"will attempt to automatically import any inbound assets"@
"using the default config, without prompting the import window."@

View file

@ -110,7 +110,7 @@ function guiInspectorListField::onSelect( %this, %id, %text )
//ah, a global var, just do it straight, then
%setCommand = %this.fieldName @ " = \"" @ %text @ "\";";
}
else if(isObject(%this.ownerObj))
else if(isObject(%this.ownerObject))
{
//regular variable
%setCommand = %this.ownerObject @ "." @ %this.fieldName @ " = \"" @ %text @ "\";";

View file

@ -998,6 +998,94 @@ $PE_guielement_ext_colorpicker = "18 18";
};
};
new GuiControl(){ // Emitter Angle Variance
isContainer = "1";
class = "AggregateControl";
HorizSizing = "width";
VertSizing = "bottom";
Position = $PE_guielement_pos_single_container ;
Extent = $PE_guielement_ext_single_container ;
new GuiBitmapCtrl(){ // 0 Degrees
HorizSizing = "left";
position = getWord($PE_guielement_pos_slider,0)+4 SPC "0";
Extent = "2 18";
minExtent = "0 0";
bitmap = "tools/gui/images/separator-h";
tooltip = "0 Degrees ( Up )";
};
new GuiBitmapCtrl(){ // 90 Degrees
HorizSizing = "left";
position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/4)+1 SPC "0";
Extent = "2 18";
minExtent = "0 0";
bitmap = "tools/gui/images/separator-h";
tooltip = "45 Degrees";
};
new GuiBitmapCtrl(){ // 180 Degrees
HorizSizing = "left";
minExtent = "0 0";
position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/2)-1 SPC "0";
Extent = "2 18";
bitmap = "tools/gui/images/separator-h";
tooltip = "90 Degrees";
};
new GuiBitmapCtrl(){ // 270 Degrees
HorizSizing = "left";
position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/2+mCeil(getWord($PE_guielement_ext_slider,0)/4))-4 SPC "0";
Extent = "2 18";
minExtent = "0 0";
bitmap = "tools/gui/images/separator-h";
tooltip = "135 Degrees";
};
new GuiBitmapCtrl(){ // 360 Degrees
HorizSizing = "left";
position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0))-5 SPC "0";
Extent = "2 18";
minExtent = "0 0";
bitmap = "tools/gui/images/separator-h";
tooltip = "180 Degrees";
};
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = $PE_guielement_pos_name;
Extent = $PE_guielement_ext_name;
text = "Angle Variance";
};
new GuiSliderCtrl(PEE_thetaVar) {
internalName = "PEE_thetaVar_slider";
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiSliderProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_slider;
Extent = $PE_guielement_ext_slider;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "PE_EmitterEditor.updateEmitter( \"thetaVariance\", $ThisControl.getValue(), true, true );";
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_EmitterEditor.updateEmitter( \"thetaVariance\", $ThisControl.getValue(), true, false );";
hovertime = "1000";
range = "0 180";
ticks = "0";
value = "0";
};
new GuiTextEditCtrl() {
internalName = "PEE_thetaVar_textEdit";
Profile = "ToolsGuiTextEditProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_value;
Extent = $PE_guielement_ext_value;
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_EmitterEditor.updateEmitter( \"thetaVariance\", $ThisControl.getText());";
};
};
new GuiControl(){ // Spacer ----------------------------
isContainer = "1"; HorizSizing = "width"; Position = "0 0"; Extent = "194 8";
new GuiBitmapCtrl(){
@ -1084,7 +1172,7 @@ $PE_guielement_ext_colorpicker = "18 18";
Command = "PE_EmitterEditor.updateEmitter( \"ejectionOffset\", $ThisControl.getValue(), true, true );";
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_EmitterEditor.updateEmitter( \"ejectionOffset\", $ThisControl.getValue(), true, false );";
hovertime = "1000";
range = "0 10";
range = "0 50";
ticks = "0";
value = "0";
};
@ -2797,7 +2885,7 @@ $PE_guielement_ext_colorpicker = "18 18";
Profile = "GuiInspectorSwatchButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "75 0";
position = "20 0";
Extent = $PE_guielement_ext_colorpicker;
MinExtent = "8 2";
canSave = "1";
@ -2818,7 +2906,7 @@ $PE_guielement_ext_colorpicker = "18 18";
Profile = "GuiInspectorSwatchButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "102 0";
position = "40 0";
Extent = $PE_guielement_ext_colorpicker;
MinExtent = "8 2";
canSave = "1";
@ -2839,7 +2927,7 @@ $PE_guielement_ext_colorpicker = "18 18";
Profile = "GuiInspectorSwatchButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "129 0";
position = "60 0";
Extent = $PE_guielement_ext_colorpicker;
MinExtent = "8 2";
canSave = "1";
@ -2860,7 +2948,7 @@ $PE_guielement_ext_colorpicker = "18 18";
Profile = "GuiInspectorSwatchButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "156 0";
position = "80 0";
Extent = $PE_guielement_ext_colorpicker;
MinExtent = "8 2";
canSave = "1";
@ -2874,6 +2962,90 @@ $PE_guielement_ext_colorpicker = "18 18";
arrayNum = "3";
class = "PE_ColorTintSwatch";
};
new GuiSwatchButtonCtrl(PE_ColorTintSwatch4) {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "GuiInspectorSwatchButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "100 0";
Extent = $PE_guielement_ext_colorpicker;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "getColorF( PE_ParticleEditor.currParticle.colors[4], \"PE_ColorTintSwatch4.updateParticleColor\");";
altCommand = "$ThisControl.updateParticleColor( $ThisControl.color );";
hovertime = "1000";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "1";
arrayNum = "4";
class = "PE_ColorTintSwatch";
};
new GuiSwatchButtonCtrl(PE_ColorTintSwatch5) {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "GuiInspectorSwatchButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "120 0";
Extent = $PE_guielement_ext_colorpicker;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "getColorF( PE_ParticleEditor.currParticle.colors[5], \"PE_ColorTintSwatch5.updateParticleColor\");";
altCommand = "$ThisControl.updateParticleColor( $ThisControl.color );";
hovertime = "1000";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "1";
arrayNum = "5";
class = "PE_ColorTintSwatch";
};
new GuiSwatchButtonCtrl(PE_ColorTintSwatch6) {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "GuiInspectorSwatchButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "140 0";
Extent = $PE_guielement_ext_colorpicker;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "getColorF( PE_ParticleEditor.currParticle.colors[6], \"PE_ColorTintSwatch6.updateParticleColor\");";
altCommand = "$ThisControl.updateParticleColor( $ThisControl.color );";
hovertime = "1000";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "1";
arrayNum = "6";
class = "PE_ColorTintSwatch";
};
new GuiSwatchButtonCtrl(PE_ColorTintSwatch7) {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "GuiInspectorSwatchButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "160 0";
Extent = $PE_guielement_ext_colorpicker;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "getColorF( PE_ParticleEditor.currParticle.colors[7], \"PE_ColorTintSwatch7.updateParticleColor\");";
altCommand = "$ThisControl.updateParticleColor( $ThisControl.color );";
hovertime = "1000";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "1";
arrayNum = "7";
class = "PE_ColorTintSwatch";
};
};
new GuiControl(){ // Spacer ----------------------------
@ -3072,6 +3244,194 @@ $PE_guielement_ext_colorpicker = "18 18";
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"sizes[3]\", $ThisControl.getText());";
};
};
new GuiControl(){ // Particle Point Size
class = "AggregateControl";
isContainer = "1";
HorizSizing = "width";
VertSizing = "bottom";
Position = $PE_guielement_pos_single_container ;
Extent = $PE_guielement_ext_single_container ;
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = $PE_guielement_pos_name;
Extent = $PE_guielement_ext_name;
text = "Size 5";
};
new GuiSliderCtrl() {
internalName = "PEP_pointSize_slider4";
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiSliderProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_slider;
Extent = $PE_guielement_ext_slider;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "";
hovertime = "1000";
range = "0 50";
ticks = "0";
value = "0";
Command = "PE_ParticleEditor.updateParticle( \"sizes[4]\", $ThisControl.getValue(), true, true );";
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"sizes[4]\", $ThisControl.getValue(), true, false );";
};
new GuiTextEditCtrl() {
internalName = "PEP_pointSize_textEdit4";
Profile = "ToolsGuiTextEditProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_value;
Extent = $PE_guielement_ext_value;
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"sizes[4]\", $ThisControl.getText());";
};
};
new GuiControl(){ // Particle Point Size
class = "AggregateControl";
isContainer = "1";
HorizSizing = "width";
VertSizing = "bottom";
Position = $PE_guielement_pos_single_container ;
Extent = $PE_guielement_ext_single_container ;
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = $PE_guielement_pos_name;
Extent = $PE_guielement_ext_name;
text = "Size 6";
};
new GuiSliderCtrl() {
internalName = "PEP_pointSize_slider5";
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiSliderProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_slider;
Extent = $PE_guielement_ext_slider;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "";
hovertime = "1000";
range = "0 50";
ticks = "0";
value = "0";
Command = "PE_ParticleEditor.updateParticle( \"sizes[5]\", $ThisControl.getValue(), true, true );";
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"sizes[5]\", $ThisControl.getValue(), true, false );";
};
new GuiTextEditCtrl() {
internalName = "PEP_pointSize_textEdit5";
Profile = "ToolsGuiTextEditProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_value;
Extent = $PE_guielement_ext_value;
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"sizes[5]\", $ThisControl.getText());";
};
};
new GuiControl(){ // Particle Point Size
class = "AggregateControl";
isContainer = "1";
HorizSizing = "width";
VertSizing = "bottom";
Position = $PE_guielement_pos_single_container ;
Extent = $PE_guielement_ext_single_container ;
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = $PE_guielement_pos_name;
Extent = $PE_guielement_ext_name;
text = "Size 7";
};
new GuiSliderCtrl() {
internalName = "PEP_pointSize_slider6";
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiSliderProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_slider;
Extent = $PE_guielement_ext_slider;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "";
hovertime = "1000";
range = "0 50";
ticks = "0";
value = "0";
Command = "PE_ParticleEditor.updateParticle( \"sizes[6]\", $ThisControl.getValue(), true, true );";
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"sizes[6]\", $ThisControl.getValue(), true, false );";
};
new GuiTextEditCtrl() {
internalName = "PEP_pointSize_textEdit6";
Profile = "ToolsGuiTextEditProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_value;
Extent = $PE_guielement_ext_value;
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"sizes[6]\", $ThisControl.getText());";
};
};
new GuiControl(){ // Particle Point Size
class = "AggregateControl";
isContainer = "1";
HorizSizing = "width";
VertSizing = "bottom";
Position = $PE_guielement_pos_single_container ;
Extent = $PE_guielement_ext_single_container ;
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = $PE_guielement_pos_name;
Extent = $PE_guielement_ext_name;
text = "Size 8";
};
new GuiSliderCtrl() {
internalName = "PEP_pointSize_slider7";
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiSliderProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_slider;
Extent = $PE_guielement_ext_slider;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "";
hovertime = "1000";
range = "0 50";
ticks = "0";
value = "0";
Command = "PE_ParticleEditor.updateParticle( \"sizes[7]\", $ThisControl.getValue(), true, true );";
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"sizes[7]\", $ThisControl.getValue(), true, false );";
};
new GuiTextEditCtrl() {
internalName = "PEP_pointSize_textEdit7";
Profile = "ToolsGuiTextEditProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_value;
Extent = $PE_guielement_ext_value;
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"sizes[7]\", $ThisControl.getText());";
};
};
new GuiControl(){ // Spacer ----------------------------
isContainer = "1"; HorizSizing = "width"; Position = "0 0"; Extent = "194 8";
@ -3269,6 +3629,194 @@ $PE_guielement_ext_colorpicker = "18 18";
altCommand = "$ThisControl.setText(mClamp( $ThisControl.getValue(), 0.0, 1.0)); $ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"times[3]\", $ThisControl.getText());";
};
};
new GuiControl(){ // Particle Point Time
class = "AggregateControl";
isContainer = "1";
HorizSizing = "width";
VertSizing = "bottom";
Position = $PE_guielement_pos_single_container ;
Extent = $PE_guielement_ext_single_container ;
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = $PE_guielement_pos_name;
Extent = $PE_guielement_ext_name;
text = "Time 5";
};
new GuiSliderCtrl() {
internalName = "PEP_pointTime_slider4";
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiSliderProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_slider;
Extent = $PE_guielement_ext_slider;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "";
hovertime = "1000";
range = "0 1";
ticks = "0";
value = "0";
Command = "PE_ParticleEditor.updateParticle( \"times[4]\", $ThisControl.getValue(), true, true );";
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"times[4]\", $ThisControl.getValue(), true, false );";
};
new GuiTextEditCtrl() {
internalName = "PEP_pointTime_textEdit4";
Profile = "ToolsGuiTextEditProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_value;
Extent = $PE_guielement_ext_value;
altCommand = "$ThisControl.setText(mClamp( $ThisControl.getValue(), 0.0, 1.0)); $ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"times[4]\", $ThisControl.getText());";
};
};
new GuiControl(){ // Particle Point Time
class = "AggregateControl";
isContainer = "1";
HorizSizing = "width";
VertSizing = "bottom";
Position = $PE_guielement_pos_single_container ;
Extent = $PE_guielement_ext_single_container ;
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = $PE_guielement_pos_name;
Extent = $PE_guielement_ext_name;
text = "Time 6";
};
new GuiSliderCtrl() {
internalName = "PEP_pointTime_slider5";
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiSliderProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_slider;
Extent = $PE_guielement_ext_slider;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "";
hovertime = "1000";
range = "0 1";
ticks = "0";
value = "0";
Command = "PE_ParticleEditor.updateParticle( \"times[5]\", $ThisControl.getValue(), true, true );";
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"times[5]\", $ThisControl.getValue(), true, false );";
};
new GuiTextEditCtrl() {
internalName = "PEP_pointTime_textEdit5";
Profile = "ToolsGuiTextEditProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_value;
Extent = $PE_guielement_ext_value;
altCommand = "$ThisControl.setText(mClamp( $ThisControl.getValue(), 0.0, 1.0)); $ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"times[5]\", $ThisControl.getText());";
};
};
new GuiControl(){ // Particle Point Time
class = "AggregateControl";
isContainer = "1";
HorizSizing = "width";
VertSizing = "bottom";
Position = $PE_guielement_pos_single_container ;
Extent = $PE_guielement_ext_single_container ;
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = $PE_guielement_pos_name;
Extent = $PE_guielement_ext_name;
text = "Time 7";
};
new GuiSliderCtrl() {
internalName = "PEP_pointTime_slider6";
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiSliderProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_slider;
Extent = $PE_guielement_ext_slider;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "";
hovertime = "1000";
range = "0 1";
ticks = "0";
value = "0";
Command = "PE_ParticleEditor.updateParticle( \"times[6]\", $ThisControl.getValue(), true, true );";
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"times[6]\", $ThisControl.getValue(), true, false );";
};
new GuiTextEditCtrl() {
internalName = "PEP_pointTime_textEdit6";
Profile = "ToolsGuiTextEditProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_value;
Extent = $PE_guielement_ext_value;
altCommand = "$ThisControl.setText(mClamp( $ThisControl.getValue(), 0.0, 1.0)); $ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"times[6]\", $ThisControl.getText());";
};
};
new GuiControl(){ // Particle Point Time
class = "AggregateControl";
isContainer = "1";
HorizSizing = "width";
VertSizing = "bottom";
Position = $PE_guielement_pos_single_container ;
Extent = $PE_guielement_ext_single_container ;
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = $PE_guielement_pos_name;
Extent = $PE_guielement_ext_name;
text = "Time 8";
};
new GuiSliderCtrl() {
internalName = "PEP_pointTime_slider7";
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiSliderProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_slider;
Extent = $PE_guielement_ext_slider;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "";
hovertime = "1000";
range = "0 1";
ticks = "0";
value = "0";
Command = "PE_ParticleEditor.updateParticle( \"times[7]\", $ThisControl.getValue(), true, true );";
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"times[7]\", $ThisControl.getValue(), true, false );";
};
new GuiTextEditCtrl() {
internalName = "PEP_pointTime_textEdit7";
Profile = "ToolsGuiTextEditProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = $PE_guielement_pos_value;
Extent = $PE_guielement_ext_value;
altCommand = "$ThisControl.setText(mClamp( $ThisControl.getValue(), 0.0, 1.0)); $ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"times[7]\", $ThisControl.getText());";
};
};
}; // end stack
}; // end "Overtime" rollout
};// end stack "Particles"

View file

@ -71,6 +71,7 @@ function PE_EmitterEditor::guiSync( %this )
PE_EmitterEditor-->PEE_orientParticles.setValue( %data.orientParticles );
PE_EmitterEditor-->PEE_alignParticles.setValue( %data.alignParticles );
PE_EmitterEditor-->PEE_alignDirection.setText( %data.alignDirection );
PE_EmitterEditor-->PEE_ribbonParticles.setValue( %data.ribbonParticles );
PE_EmitterEditor-->PEE_thetaMin_slider.setValue( %data.thetaMin );
PE_EmitterEditor-->PEE_thetaMin_textEdit.setText( %data.thetaMin );
@ -78,6 +79,9 @@ function PE_EmitterEditor::guiSync( %this )
PE_EmitterEditor-->PEE_thetaMax_slider.setValue( %data.thetaMax );
PE_EmitterEditor-->PEE_thetaMax_textEdit.setText( %data.thetaMax );
PE_EmitterEditor-->PEE_thetaVar_slider.setValue( %data.thetaVariance );
PE_EmitterEditor-->PEE_thetaVar_textEdit.setText( %data.thetaVariance );
PE_EmitterEditor-->PEE_phiVariance_slider.setValue( %data.phiVariance );
PE_EmitterEditor-->PEE_phiVariance_textEdit.setText( %data.phiVariance );

View file

@ -110,6 +110,10 @@ function PE_ParticleEditor::guiSync( %this )
PE_ColorTintSwatch1.color = %data.colors[ 1 ];
PE_ColorTintSwatch2.color = %data.colors[ 2 ];
PE_ColorTintSwatch3.color = %data.colors[ 3 ];
PE_ColorTintSwatch4.color = %data.colors[ 4 ];
PE_ColorTintSwatch5.color = %data.colors[ 5 ];
PE_ColorTintSwatch6.color = %data.colors[ 6 ];
PE_ColorTintSwatch7.color = %data.colors[ 7 ];
PE_ParticleEditor-->PEP_pointSize_slider0.setValue( %data.sizes[ 0 ] );
PE_ParticleEditor-->PEP_pointSize_textEdit0.setText( %data.sizes[ 0 ] );
@ -123,6 +127,18 @@ function PE_ParticleEditor::guiSync( %this )
PE_ParticleEditor-->PEP_pointSize_slider3.setValue( %data.sizes[ 3 ] );
PE_ParticleEditor-->PEP_pointSize_textEdit3.setText( %data.sizes[ 3 ] );
PE_ParticleEditor-->PEP_pointSize_slider4.setValue( %data.sizes[ 4 ] );
PE_ParticleEditor-->PEP_pointSize_textEdit4.setText( %data.sizes[ 4 ] );
PE_ParticleEditor-->PEP_pointSize_slider5.setValue( %data.sizes[ 5 ] );
PE_ParticleEditor-->PEP_pointSize_textEdit5.setText( %data.sizes[ 5 ] );
PE_ParticleEditor-->PEP_pointSize_slider6.setValue( %data.sizes[ 6 ] );
PE_ParticleEditor-->PEP_pointSize_textEdit6.setText( %data.sizes[ 6 ] );
PE_ParticleEditor-->PEP_pointSize_slider7.setValue( %data.sizes[ 7 ] );
PE_ParticleEditor-->PEP_pointSize_textEdit7.setText( %data.sizes[ 7 ] );
PE_ParticleEditor-->PEP_pointTime_slider0.setValue( %data.times[ 0 ] );
PE_ParticleEditor-->PEP_pointTime_textEdit0.setText( %data.times[ 0 ] );
@ -134,6 +150,18 @@ function PE_ParticleEditor::guiSync( %this )
PE_ParticleEditor-->PEP_pointTime_slider3.setValue( %data.times[ 3 ] );
PE_ParticleEditor-->PEP_pointTime_textEdit3.setText( %data.times[ 3 ] );
PE_ParticleEditor-->PEP_pointTime_slider4.setValue( %data.times[ 4 ] );
PE_ParticleEditor-->PEP_pointTime_textEdit4.setText( %data.times[ 4 ] );
PE_ParticleEditor-->PEP_pointTime_slider5.setValue( %data.times[ 5 ] );
PE_ParticleEditor-->PEP_pointTime_textEdit5.setText( %data.times[ 5 ] );
PE_ParticleEditor-->PEP_pointTime_slider6.setValue( %data.times[ 6 ] );
PE_ParticleEditor-->PEP_pointTime_textEdit6.setText( %data.times[ 6 ] );
PE_ParticleEditor-->PEP_pointTime_slider7.setValue( %data.times[ 7 ] );
PE_ParticleEditor-->PEP_pointTime_textEdit7.setText( %data.times[ 7 ] );
//particle animation
PE_ParticleEditor-->PEP_animateTexture.setValue( %data.animateTexture );