WIP corrections for drag-n-drop handling for cubemap and shape asset types

Added ability to override radio button behavior when selecting items in popup menus
Added ability to turn on rotation snapping as a setting, with SHIFT just inverting the rot snap mode
Implemented proper asset type filtering, complete with multiple type selection, and listing of active filters in AB footer. Selectable via visibility popup Menu
Moved asset preview button generation from code to template GUI file
added ability to move asset with drag-n-drop(Image asset only so far)
New AB folder icon
Properly link image asset fields to material asset if 'AlwaysPresentImageMaps' config setting is active
This commit is contained in:
Areloch 2019-11-24 06:52:34 -06:00
parent 27ee09e491
commit b2fcd5e7fb
23 changed files with 851 additions and 475 deletions

View file

@ -200,10 +200,10 @@ GuiControl* GuiInspectorTypeCubemapAssetPtr::constructEditControl()
// Change filespec
char szBuffer[512];
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"CubemapAsset\", \"AssetBrowser.changeAsset\", %d, %s);",
mInspector->getComponentGroupTargetId(), mCaption);
mInspector->getInspectObject(), mCaption);
mBrowseButton->setField("Command", szBuffer);
setDataField(StringTable->insert("ComponentOwner"), NULL, String::ToString(mInspector->getComponentGroupTargetId()).c_str());
setDataField(StringTable->insert("object"), NULL, String::ToString(mInspector->getInspectObject()).c_str());
// Create "Open in ShapeEditor" button
mShapeEdButton = new GuiBitmapButtonCtrl();

View file

@ -367,10 +367,12 @@ GuiControl* GuiInspectorTypeShapeAssetPtr::constructEditControl()
// Change filespec
char szBuffer[512];
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ShapeAsset\", \"AssetBrowser.changeAsset\", %d, %s);",
mInspector->getComponentGroupTargetId(), mCaption);
mInspector->getInspectObject()->getIdString(), mCaption);
mBrowseButton->setField("Command", szBuffer);
setDataField(StringTable->insert("ComponentOwner"), NULL, String::ToString(mInspector->getComponentGroupTargetId()).c_str());
const char* id = mInspector->getInspectObject()->getIdString();
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
// Create "Open in ShapeEditor" button
mShapeEdButton = new GuiBitmapButtonCtrl();

View file

@ -60,6 +60,8 @@ PopupMenu::PopupMenu()
mTextList = nullptr;
mIsSubmenu = false;
mRadioSelection = true;
}
PopupMenu::~PopupMenu()
@ -83,6 +85,7 @@ void PopupMenu::initPersistFields()
Parent::initPersistFields();
addField("barTitle", TypeCaseString, Offset(mBarTitle, PopupMenu), "");
addField("radioSelection", TypeBool, Offset(mRadioSelection, PopupMenu), "");
}
//-----------------------------------------------------------------------------
@ -225,7 +228,7 @@ void PopupMenu::checkItem(S32 pos, bool checked)
if (mMenuItems.empty() || mMenuItems.size() < pos || pos < 0)
return;
if (checked && mMenuItems[pos].mCheckGroup != -1)
if (checked && mMenuItems[pos].mCheckGroup != -1 && mRadioSelection)
{
// first, uncheck everything in the group:
for (U32 i = 0; i < mMenuItems.size(); i++)

View file

@ -83,6 +83,9 @@ protected:
bool mIsSubmenu;
bool mRadioSelection; ///If true, we treat all the items in the same check group as a radio item, so we uncheck everything else in the group if an item is checked
///If false, then we don't clear other selections
//This is the gui control that renders our popup
GuiPopupMenuTextListCtrl *mTextList;

View file

@ -188,6 +188,7 @@ GizmoProfile::GizmoProfile()
rotationSnap = 15.0f;
allowSnapScale = true;
scaleSnap = 0.1f;
forceSnapRotations = false;
rotateScalar = 0.8f;
scaleScalar = 0.8f;
@ -246,6 +247,7 @@ void GizmoProfile::initPersistFields()
addField( "rotationSnap", TypeF32, Offset(rotationSnap, GizmoProfile) );
addField( "allowSnapScale", TypeBool, Offset(allowSnapScale, GizmoProfile) );
addField( "scaleSnap", TypeF32, Offset(scaleSnap, GizmoProfile) );
addField( "forceSnapRotations", TypeBool, Offset(forceSnapRotations, GizmoProfile));
addField( "renderWhenUsed", TypeBool, Offset(renderWhenUsed, GizmoProfile) );
addField( "renderInfoText", TypeBool, Offset(renderInfoText, GizmoProfile) );
addField( "renderPlane", TypeBool, Offset(renderPlane, GizmoProfile) );
@ -1083,7 +1085,7 @@ void Gizmo::on3DMouseDragged( const Gui3DMouseEvent & event )
angle *= 0.02f; // scale down to not require rotate scalar to be microscopic
//
if( mProfile->allowSnapRotations && event.modifier & SI_SHIFT )
if((mProfile->forceSnapRotations && event.modifier | SI_SHIFT) || (mProfile->allowSnapRotations && event.modifier & SI_SHIFT ))
angle = mDegToRad( _snapFloat( mRadToDeg( angle ), mProfile->rotationSnap ) );
mDeltaAngle = angle - mLastAngle;

View file

@ -108,6 +108,7 @@ public:
bool allowSnapScale;
F32 rotationSnap;
bool allowSnapRotations;
bool forceSnapRotations;
bool renderWhenUsed;
bool renderInfoText;
@ -415,4 +416,4 @@ protected:
static F32 smProjectDistance;
};
#endif // _GIZMO_H_
#endif // _GIZMO_H_

View file

@ -402,6 +402,12 @@ bool TSShapeConstructor::onAdd()
if ( !Parent::onAdd() )
return false;
static const U32 bufSize = 512;
char* buf = Con::getReturnBuffer(bufSize);
Platform::makeFullPathName(mShapePath, buf, bufSize, NULL);
mShapePath = buf;
// Prevent multiple objects pointing at the same shape file
TSShapeConstructor* tss = findShapeConstructor( mShapePath );
if ( tss )

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -1,60 +1,64 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<AssetImportSettings>
<Group name="TestConfig">
<Group name="Images">
<Setting name="GenerateMaterialOnImport">1</Setting>
<Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
<Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
<Setting name="IsHDR">0</Setting>
<Setting name="Scaling">1.0</Setting>
<Setting name="PopulateMaterialMaps">1</Setting>
<Setting name="Compressed">1</Setting>
<Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
<Setting name="TextureFilteringMode">Bilinear</Setting>
<Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a,</Setting>
<Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
<Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
<Setting name="CompositeTypeSuffixes">_COMP,_COMPOSITE</Setting>
<Setting name="ImageType">N/A</Setting>
<Setting name="UseMips">1</Setting>
</Group>
<Group name="Meshes">
<Setting name="invertNormals">0</Setting>
<Setting name="UpAxisOverride">Z_AXIS</Setting>
<Setting name="AdjustFloor">0</Setting>
<Setting name="LODType">TrailingNumber</Setting>
<Setting name="ScaleOverride">0.01</Setting>
<Setting name="IgnoreNodeScale">0</Setting>
<Setting name="AdjustFloor">0</Setting>
<Setting name="reverseWindingOrder">0</Setting>
<Setting name="DoScaleOverride">1</Setting>
<Setting name="JoinIdenticalVerts">1</Setting>
<Setting name="DoUpAxisOverride">0</Setting>
<Setting name="CollapseSubmeshes">0</Setting>
<Setting name="ScaleOverride">1</Setting>
<Setting name="AdjustCenter">0</Setting>
</Group>
<Group name="General">
<Setting name="DuplicatAutoResolution">AutoPrune</Setting>
<Setting name="CollapseSubmeshes">0</Setting>
</Group>
<Group name="Collision">
<Setting name="GenCollisionType">CollisionMesh</Setting>
<Setting name="CollisionMeshPrefix">Col</Setting>
<Setting name="GenLOSCollisionType">CollisionMesh</Setting>
<Setting name="GenCollisionType">CollisionMesh</Setting>
<Setting name="GenerateLOSCollisions">1</Setting>
<Setting name="LOSCollisionMeshPrefix">LOS</Setting>
<Setting name="GenLOSCollisionType">CollisionMesh</Setting>
<Setting name="GenerateCollisions">1</Setting>
</Group>
<Group name="Images">
<Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
<Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
<Setting name="Compressed">1</Setting>
<Setting name="CompositeTypeSuffixes">_COMP,_COMPOSITE</Setting>
<Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
<Setting name="GenerateMaterialOnImport">1</Setting>
<Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a,</Setting>
<Setting name="IsHDR">0</Setting>
<Setting name="PopulateMaterialMaps">1</Setting>
<Setting name="ImageType">N/A</Setting>
<Setting name="UseMips">1</Setting>
<Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
<Setting name="Scaling">1.0</Setting>
<Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
<Setting name="TextureFilteringMode">Bilinear</Setting>
</Group>
<Group name="Materials">
<Setting name="IgnoreMaterials">ColorEffect*,</Setting>
<Setting name="ImportMaterials">1</Setting>
<Setting name="UseExistingMaterials">1</Setting>
<Setting name="CreateComposites">1</Setting>
<Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
<Setting name="UseExistingMaterials">1</Setting>
<Setting name="AlwaysPresentImageMaps">1</Setting>
</Group>
<Group name="Sounds">
<Setting name="PitchAdjust">1.0</Setting>
<Setting name="Compressed">0</Setting>
<Setting name="VolumeAdjust">1.0</Setting>
<Setting name="AlwaysPresentImageMaps">0</Setting>
<Setting name="ImportMaterials">1</Setting>
</Group>
<Group name="Animations">
<Setting name="ImportAnimations">1</Setting>
<Setting name="SeparateAnimations">1</Setting>
</Group>
<Group name="Sounds">
<Setting name="VolumeAdjust">1.0</Setting>
<Setting name="Compressed">0</Setting>
<Setting name="PitchAdjust">1.0</Setting>
</Group>
<Group name="General">
<Setting name="DuplicatAutoResolution">AutoPrune</Setting>
</Group>
</Group>
</AssetImportSettings>

View file

@ -0,0 +1,272 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(AssetPreviewButtonsTemplate) {
position = "0 0";
extent = "1024 768";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
new GuiControl() {
position = "0 0";
extent = "100 124";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "ShapeAssetPreviewButton";
canSave = "1";
canSaveDynamicFields = "0";
new GuiObjectView() {
shapeFile = "data/Blockout_Basics/Walls/DoorWall2x2.fbx";
mountedNode = "mount0";
lightColor = "1 1 1 1";
lightAmbient = "0.5 0.5 0.5 1";
lightDirection = "0 0.707 -0.707";
orbitDiststance = "5";
minOrbitDiststance = "141.715";
maxOrbitDiststance = "5";
cameraSpeed = "0.01";
cameraRotation = "0 0 0";
cameraZRot = "0";
forceFOV = "0";
reflectPriority = "0";
renderStyle = "standard";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "7 4";
extent = "80 80";
minExtent = "8 8";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "shapeAssetView";
class = "AssetPreviewControl";
canSave = "1";
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl() {
bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "0";
buttonType = "ToggleButton";
useMouseEvents = "0";
position = "0 0";
extent = "80 80";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
internalName="AssetPreviewBorderButton";
};
};
new GuiButtonCtrl() {
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "1";
position = "0 0";
extent = "100 104";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiThumbHighlightButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser.updateSelection( $ThisControl.getParent().assetName, $ThisControl.getParent().moduleName );";
altCommand = "AssetBrowser.editAsset( 20540 );";
tooltipProfile = "GuiToolTipProfile";
tooltip = "\n20540";
hovertime = "1000";
isContainer = "0";
internalName = "Button";
class = "AssetPreviewButton";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl() {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
text = "DoorWall2x2";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 84";
extent = "100 18";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextEditProfile";
visible = "1";
active = "0";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "AssetNameLabel";
class = "AssetNameField";
canSave = "1";
canSaveDynamicFields = "0";
};
};
new GuiControl() {
position = "102 0";
extent = "100 124";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "GeneralAssetPreviewButton";
canSave = "1";
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl() {
bitmap = "Data/Blockout_Basics/Walls/WallGrid2x2_Albedo.png";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "0";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "10 4";
extent = "80 80";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
internalName = "assetPreviewImage";
canSave = "1";
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl() {
bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "0";
buttonType = "ToggleButton";
useMouseEvents = "0";
position = "0 0";
extent = "80 80";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
internalName="AssetPreviewBorderButton";
};
};
new GuiButtonCtrl() {
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "1";
position = "0 0";
extent = "100 104";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiThumbHighlightButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser.updateSelection( $ThisControl.getParent().assetName, $ThisControl.getParent().moduleName );";
altCommand = "20550.materialDefinitionName.reload(); $Tools::materialEditorList = \"\";EWorldEditor.clearSelection();MaterialEditorGui.currentObject = 0;MaterialEditorGui.currentMode = \"asset\";MaterialEditorGui.currentMaterial = 20550.materialDefinitionName;MaterialEditorGui.setActiveMaterial( 20550.materialDefinitionName );EditorGui.setEditor(MaterialEditorPlugin); AssetBrowser.hideDialog();";
tooltipProfile = "GuiToolTipProfile";
tooltip = "\n20550";
hovertime = "1000";
isContainer = "0";
internalName = "Button";
class = "AssetPreviewButton";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl() {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
text = "WallGrid2x2";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 84";
extent = "100 18";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextEditProfile";
visible = "1";
active = "0";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "AssetNameLabel";
class = "AssetNameField";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -37,23 +37,24 @@ function initializeAssetBrowser()
{
new ArrayObject(AssetFilterTypeList);
AssetFilterTypeList.add("All");
AssetFilterTypeList.add("Component");
AssetFilterTypeList.add("Cpp");
AssetFilterTypeList.add("Cubemap");
AssetFilterTypeList.add("GameObjects");
AssetFilterTypeList.add("GUIs");
AssetFilterTypeList.add("Images");
AssetFilterTypeList.add("Levels");
AssetFilterTypeList.add("Materials");
AssetFilterTypeList.add("Particles");
AssetFilterTypeList.add("PostFXs");
AssetFilterTypeList.add("Scripts");
AssetFilterTypeList.add("Shapes");
AssetFilterTypeList.add("ShapeAnimations");
AssetFilterTypeList.add("Sounds");
AssetFilterTypeList.add("StateMachines");
AssetFilterTypeList.add("GameObject");
AssetFilterTypeList.add("GUI");
AssetFilterTypeList.add("Image");
AssetFilterTypeList.add("Level");
AssetFilterTypeList.add("Material");
AssetFilterTypeList.add("Particle");
AssetFilterTypeList.add("PostFX");
AssetFilterTypeList.add("Script");
AssetFilterTypeList.add("Shape");
AssetFilterTypeList.add("ShapeAnimation");
AssetFilterTypeList.add("Sound");
AssetFilterTypeList.add("StateMachine");
AssetFilterTypeList.add("Terrain");
AssetFilterTypeList.add("TerrainMaterials");
AssetFilterTypeList.add("TerrainMaterial");
}
exec("./guis/assetBrowser.gui");
@ -66,6 +67,7 @@ function initializeAssetBrowser()
exec("./guis/selectModule.gui");
exec("./guis/editModule.gui");
exec("./guis/importTemplateModules.gui");
exec("./guis/assetPreviewButtonsTemplate.gui");
exec("./scripts/assetBrowser.cs");
exec("./scripts/popupMenus.cs");

View file

@ -172,10 +172,55 @@ function AssetBrowser::viewTagsFilter(%this)
AssetBrowser.loadFilters();
}
function AssetBrowser::toggleAssetTypeFilter(%assetTypeIdx)
function AssetBrowser::toggleAssetTypeFilter(%this, %assetTypeIdx)
{
%isChecked = AssetTypeListPopup.isItemChecked(%assetTypeIdx);
AssetTypeListPopup.checkItem(%assetTypeIdx, !%isChecked);
//Clear existing filters
if(%assetTypeIdx == 0)
{
for(%i=0; %i < AssetFilterTypeList.Count() + 1; %i++)
{
AssetTypeListPopup.checkItem(%i, false);
}
AssetTypeListPopup.checkItem(0, true);
}
else
{
if(%isChecked)
{
%anyOtherFilters = false;
for(%i=1; %i < AssetFilterTypeList.Count() + 1; %i++)
{
if(%assetTypeIdx == %i)
continue;
if(AssetTypeListPopup.isItemChecked(%i))
{
%anyOtherFilters = true;
break;
}
}
}
if(%isChecked && !%anyOtherFilters)
{
for(%i=0; %i < AssetFilterTypeList.Count() + 1; %i++)
{
AssetTypeListPopup.checkItem(%i, false);
}
AssetTypeListPopup.checkItem(0, true);
}
else
{
AssetTypeListPopup.checkItem(0, false);
AssetTypeListPopup.checkItem(%assetTypeIdx, !%isChecked);
}
}
%this.rebuildAssetArray();
}
function AssetBrowser::selectAsset( %this, %asset )
@ -219,6 +264,13 @@ function AssetBrowser::showDialog( %this, %AssetTypeFilter, %selectCallback, %ta
AssetBrowserWindow.setVisible(1);
AssetBrowserWindow.selectWindow();
//If we're special-case filtering(like for selecting a given type), then ignore our normal
//visibility filter
if(%AssetTypeFilter !$= "")
{
AssetBrowser.toggleAssetTypeFilter(0);
}
if(%selectCallback $= "")
{
//we're not in selection mode, so just hide the select button
@ -268,6 +320,7 @@ function AssetBrowser::buildPreviewArray( %this, %asset, %moduleName )
%fullPath = strreplace(%fullPath, "/", "_");
if(isObject(%fullPath))
%assetDesc = %fullPath;
else
%assetDesc = new ScriptObject(%fullPath);
@ -280,194 +333,65 @@ function AssetBrowser::buildPreviewArray( %this, %asset, %moduleName )
%assetName = %asset;
%assetType = "Folder";
}
// it may seem goofy why the checkbox can't be instanciated inside the container
// reason being its because we need to store the checkbox ctrl in order to make changes
// on it later in the function.
%previewSize = %this.previewSize SPC %this.previewSize;
%previewBounds = 20;
%container = new GuiControl(){
profile = "ToolsGuiDefaultProfile";
Position = "0 0";
Extent = %previewSize.x + %previewBounds SPC %previewSize.y + %previewBounds + 24;
HorizSizing = "right";
VertSizing = "bottom";
isContainer = "1";
assetName = %assetName;
moduleName = %moduleName;
assetType = %assetType;
};
%tooltip = %assetName;
%doubleClickCommand = "AssetBrowser.editAsset( "@%assetDesc@" );";
if(%assetType $= "ShapeAsset")
{
%this.previewData.assetName = %assetDesc.assetName;
%this.previewData.assetPath = %assetDesc.scriptFile;
%this.previewData.doubleClickCommand = %doubleClickCommand;
%this.previewData.previewImage = "tools/assetBrowser/art/componentIcon";
%this.previewData.assetFriendlyName = %assetDesc.friendlyName;
%this.previewData.assetDesc = %assetDesc.description;
%this.previewData.tooltip = %assetDesc.friendlyName @ "\n" @ %assetDesc;
%previewButton = new GuiObjectView()
{
className = "AssetPreviewControl";
internalName = %matName;
HorizSizing = "right";
VertSizing = "bottom";
Profile = "ToolsGuiDefaultProfile";
position = "7 4";
extent = %previewSize;
MinExtent = "8 8";
canSave = "1";
Visible = "1";
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
renderMissionArea = "0";
GizmoProfile = "GlobalGizmoProfile";
cameraZRot = "0";
forceFOV = "0";
gridColor = "0 0 0 0";
renderNodes = "0";
renderObjBox = "0";
renderMounts = "0";
renderColMeshes = "0";
selectedNode = "-1";
sunDiffuse = "255 255 255 255";
sunAmbient = "180 180 180 255";
timeScale = "1.0";
fixedDetail = "0";
orbitNode = "0";
new GuiBitmapButtonCtrl()
{
HorizSizing = "right";
VertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
position = "0 0";
extent = %previewSize;
Variable = "";
buttonType = "ToggleButton";
bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
groupNum = "0";
text = "";
};
};
%assetQuery = new AssetQuery();
%numAssetsFound = AssetDatabase.findAllAssets(%assetQuery);
for( %i=0; %i < %numAssetsFound; %i++)
{
%assetId = %assetQuery.getAsset(%i);
%name = AssetDatabase.getAssetName(%assetId);
if(%name $= %assetName)
{
%asset = AssetDatabase.acquireAsset(%assetId);
%previewButton.setModel(%asset.fileName);
//%previewButton.refreshShape();
//%previewButton.currentDL = 0;
//%previewButton.fitToShape();
break;
}
}
%previewButton = AssetPreviewButtonsTemplate-->ShapeAssetPreviewButton.deepClone();
}
else
{
//Build out the preview
%buildCommand = %this @ ".build" @ %assetType @ "Preview(" @ %assetDesc @ "," @ %this.previewData @ ");";
eval(%buildCommand);
//debug dump
%tooltip = %this.previewData.tooltip;
%assetName = %this.previewData.assetName;
%previewImage = %this.previewData.previewImage;
%doubleClickCommand = %this.previewData.doubleClickCommand;
%previewButton = new GuiBitmapButtonCtrl()
{
className = "AssetPreviewControl";
internalName = %this.previewData.assetName;
HorizSizing = "right";
VertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
position = "10 4";
extent = %previewSize;
buttonType = "PushButton";
bitmap = %this.previewData.previewImage;
Command = "";
text = "";
useStates = false;
new GuiBitmapButtonCtrl()
{
HorizSizing = "right";
VertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
position = "0 0";
extent = %previewSize;
Variable = "";
buttonType = "toggleButton";
bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
groupNum = "0";
text = "";
};
};
%previewButton = AssetPreviewButtonsTemplate-->GeneralAssetPreviewButton.deepClone();
}
%previewBorder = new GuiButtonCtrl(){
class = "AssetPreviewButton";
internalName = %this.previewData.assetName@"Border";
HorizSizing = "right";
VertSizing = "bottom";
profile = "ToolsGuiThumbHighlightButtonProfile";
position = "0 0";
extent = %previewSize.x + %previewBounds SPC %previewSize.y + 24;
Variable = "";
buttonType = "radioButton";
tooltip = %this.previewData.tooltip;
Command = "AssetBrowser.updateSelection( $ThisControl.getParent().assetName, $ThisControl.getParent().moduleName );";
altCommand = %this.previewData.doubleClickCommand;
groupNum = "0";
useMouseEvents = true;
text = "";
icon = %this.previewData.previewImage;
};
%previewButton.extent = %previewSize.x + %previewBounds SPC %previewSize.y + %previewBounds + 24;
%previewButton.assetName = %assetName;
%previewButton.moduleName = %moduleName;
%previewButton.assetType = %assetType;
%previewNameCtrl = new GuiTextEditCtrl(){
position = 0 SPC %previewSize.y + %previewBounds - 16;
profile = ToolsGuiTextEditCenterProfile;
extent = %previewSize.x + %previewBounds SPC 16;
text = %this.previewData.assetName;
originalAssetName = %this.previewData.assetName; //special internal field used in renaming assets
internalName = "AssetNameLabel";
class = "AssetNameField";
active = false;
};
//Build out the preview
%buildCommand = %this @ ".build" @ %assetType @ "Preview(" @ %assetDesc @ "," @ %this.previewData @ ");";
eval(%buildCommand);
%container.add(%previewButton);
%container.add(%previewBorder);
%container.add(%previewNameCtrl);
//debug dump
%tooltip = %this.previewData.tooltip;
%assetName = %this.previewData.assetName;
%previewImage = %this.previewData.previewImage;
%doubleClickCommand = %this.previewData.doubleClickCommand;
if(%assetType $= "ShapeAsset")
{
%previewButton-->shapeAssetView.setModel(%previewImage);
%previewButton-->shapeAssetView.extent = %previewSize;
}
else
{
%previewButton-->assetPreviewImage.bitmap = %this.previewData.previewImage;
%previewButton-->assetPreviewImage.extent = %previewSize;
}
%previewButton-->AssetPreviewBorderButton.extent = %previewSize;
//%previewButton-->AssetPreviewButton.internalName = %this.previewData.assetName@"Border";
%previewButton-->AssetPreviewButton.extent = %previewSize.x + %previewBounds SPC %previewSize.y + 24;
%previewButton-->AssetPreviewButton.tooltip = %this.previewData.tooltip;
%previewButton-->AssetPreviewButton.Command = "AssetBrowser.updateSelection( $ThisControl.getParent().assetName, $ThisControl.getParent().moduleName );";
%previewButton-->AssetPreviewButton.altCommand = %this.previewData.doubleClickCommand;
//%previewButton-->AssetPreviewButton.icon = %this.previewData.previewImage;
%previewButton-->AssetNameLabel.position = 0 SPC %previewSize.y + %previewBounds - 16;
%previewButton-->AssetNameLabel.extent = %previewSize.x + %previewBounds SPC 16;
%previewButton-->AssetNameLabel.text = %this.previewData.assetName;
%previewButton-->AssetNameLabel.originalAssetName = %this.previewData.assetName;
// add to the gui control array
AssetBrowser-->assetList.add(%container);
AssetBrowser-->assetList.add(%previewButton);
// add to the array object for reference later
AssetPreviewArray.add( %previewButton, %this.previewData.previewImage );
@ -502,7 +426,7 @@ function AssetBrowser::loadFolders(%this, %path, %parentId)
%folderName = getToken(%childPath, "/", %f);
//we don't need to display the shadercache folder
if(%parentId == 1 && %folderName $= "shaderCache")
if(%parentId == 1 && (%folderName $= "shaderCache" || %folderName $= "cache"))
continue;
%iconIdx = 1;
@ -1171,12 +1095,12 @@ function AssetBrowser::setPreviewSize(%this, %size)
else if(%size $= "Large")
{
%this.previewSize = 160;
AssetPreviewSizePopup.checkItem(2, false);
AssetPreviewSizePopup.checkItem(2, true);
}
EditorSettings.setValue("Assets/Browser/previewTileSize", %size);
%this.refreshPreviews();
%this.rebuildAssetArray();
}
function AssetBrowser::refreshPreviews(%this)
@ -1193,12 +1117,17 @@ function AssetBrowserFilterTree::onSelect(%this, %itemId)
//Make sure we have an actual module selected!
%parentId = %this.getParentItem(%itemId);
%name = %this.getItemText(%itemId);
%breadcrumbPath = %this.getItemValue(%itemId);
if(%breadcrumbPath !$= "")
%breadcrumbPath = %breadcrumbPath @ "/" @ %this.getItemText(%itemId);
else
%breadcrumbPath = %this.getItemText(%itemId);
if(%breadcrumbPath $= "")
%breadcrumbPath = AssetBrowser.currentAddress;
AssetBrowser.navigateTo(%breadcrumbPath);
}
@ -1215,6 +1144,8 @@ function AssetBrowser::rebuildAssetArray(%this)
//First, Query for our assets
%assetQuery = new AssetQuery();
%numAssetsFound = AssetDatabase.findAllAssets(%assetQuery);
%finalAssetCount = 0;
//now, we'll iterate through, and find the assets that are in this module, and this category
for( %i=0; %i < %numAssetsFound; %i++)
@ -1240,8 +1171,46 @@ function AssetBrowser::rebuildAssetArray(%this)
%assetType = AssetDatabase.getAssetType(%assetId);
}
if(AssetBrowser.assetTypeFilter !$= "" && AssetBrowser.assetTypeFilter !$= %assetType)
continue;
%validType = false;
if(AssetBrowser.assetTypeFilter $= "")
{
if(AssetTypeListPopup.isItemChecked(0))
{
%validType = true;
}
else
{
for(%f=1; %f < AssetFilterTypeList.Count(); %f++)
{
%isChecked = AssetTypeListPopup.isItemChecked(%f+1);
if(%isChecked)
{
%filterTypeName = AssetFilterTypeList.getKey(%f);
if(%activeTypeFilterList $= "")
%activeTypeFilterList = %filterTypeName;
else
%activeTypeFilterList = %activeTypeFilterList @ ", " @ %filterTypeName;
if(%filterTypeName @ "Asset" $= %assetType)
{
%validType = true;
break;
}
}
}
}
if(!%validType)
continue;
}
else
{
if(%assetType !$= AssetBrowser.assetTypeFilter)
continue;
}
/*if(%this.getItemText(%itemId) $= %assetType || (%assetType $= "" && %this.getItemText(%itemId) $= "Misc")
|| %moduleItemId == 1)
@ -1253,12 +1222,20 @@ function AssetBrowser::rebuildAssetArray(%this)
if(%searchText !$= "Search Assets...")
{
if(strstr(strlwr(%assetName), strlwr(%searchText)) != -1)
{
%assetArray.add( %moduleName, %assetId);
if(%assetType !$= "Folder")
%finalAssetCount++;
}
}
else
{
//got it.
%assetArray.add( %moduleName, %assetId );
if(%assetType !$= "Folder")
%finalAssetCount++;
}
//}
}
@ -1292,7 +1269,39 @@ function AssetBrowser::rebuildAssetArray(%this)
for(%i=0; %i < %assetArray.count(); %i++)
AssetBrowser.buildPreviewArray( %assetArray.getValue(%i), %assetArray.getKey(%i) );
AssetBrowser_FooterText.text = %assetArray.count() @ " Assets";
AssetBrowser_FooterText.text = %finalAssetCount @ " Assets";
%activeTypeFilterList = "";
if(AssetBrowser.assetTypeFilter $= "")
{
if(!AssetTypeListPopup.isItemChecked(0))
{
for(%f=1; %f < AssetFilterTypeList.Count(); %f++)
{
%isChecked = AssetTypeListPopup.isItemChecked(%f+1);
if(%isChecked)
{
%filterTypeName = AssetFilterTypeList.getKey(%f);
if(%activeTypeFilterList $= "")
%activeTypeFilterList = %filterTypeName;
else
%activeTypeFilterList = %activeTypeFilterList @ ", " @ %filterTypeName;
}
}
}
if(!%validType)
continue;
}
else
{
%activeTypeFilterList = AssetBrowser.assetTypeFilter;
}
if(%activeTypeFilterList !$= "")
AssetBrowser_FooterText.text = AssetBrowser_FooterText.text @ " | Active Type Filters: " @ %activeTypeFilterList;
}
//
@ -1835,17 +1844,22 @@ function AssetBrowserFilterTree::onControlDropped( %this, %payload, %position )
%parent = %this.getParentItem(%item);
if(%parent == 1)
if(%item != 1)
{
//we're a module entry, cool
%targetModuleName = %this.getItemText(%item);
echo("DROPPED IT ON MODULE " @ %targetModuleName);
//we're a folder entry, cool
%path = %this.getItemValue(%item) @ "/" @ %this.getItemText(%item);
echo("DROPPED IT ON PATH " @ %path);
if(%moduleName !$= %targetModuleName)
if(%path !$= AssetBrowser.CurrentAddress)
{
//we're trying to move the asset to a different module!
MessageBoxYesNo( "Move Asset", "Do you wish to move asset " @ %assetName @ " to module " @ %targetModuleName @ "?",
"AssetBrowser.moveAsset("@%assetName@", "@%targetModuleName@");", "");
MessageBoxYesNo( "Move Asset", "Do you wish to move asset " @ %assetName @ " to " @ %path @ "?",
"AssetBrowser.moveAsset(\""@ %moduleName @ ":" @ %assetName @"\", \""@%path@"\");", "");
}
}
}
}
function AssetBrowserFilterTree::onDragDropped( %this )
{
%asdgadfhg =true;
}

View file

@ -60,7 +60,7 @@ function GuiInspectorTypeCubemapAssetPtr::onControlDropped( %this, %payload, %po
%module = %payload.dragSourceControl.parentGroup.moduleName;
%asset = %payload.dragSourceControl.parentGroup.assetName;
%targetComponent = %this.ComponentOwner;
%targetComponent = %this.object;
%targetComponent.CubemapAsset = %module @ ":" @ %asset;
//Inspector.refresh();

View file

@ -3,8 +3,7 @@ function AssetBrowser::buildFolderPreview(%this, %assetDef, %previewData)
%previewData.assetName = %assetDef.assetName;
%previewData.assetPath = %assetDef.dirPath;
//%previewData.previewImage = "tools/assetBrowser/art/folderIcon";
%previewData.previewImage = "tools/gui/images/folder";
%previewData.previewImage = "tools/assetBrowser/art/folderIcon";
//%previewData.assetFriendlyName = %assetDef.assetName;
%previewData.assetDesc = %assetDef.description;
@ -92,4 +91,6 @@ function AssetBrowser::moveFolder(%this, %folderPath, %newFolderPath)
%copiedSuccess = pathCopy(%fullPath, %newFullPath @ "/" @ %newFolderName);
%this.deleteFolder(%fullPath);
//thrash the modules and reload them
}

View file

@ -164,6 +164,33 @@ function AssetBrowser::buildImageAssetPreview(%this, %assetDef, %previewData)
%previewData.tooltip = %assetDef.friendlyName @ "\n" @ %assetDef;
}
function AssetBrowser::moveImageAsset(%this, %assetDef, %destination)
{
%currentModule = AssetDatabase.getAssetModule(%assetDef.getAssetId());
%targetModule = AssetBrowser.getModuleFromAddress(%destination);
if(%currentModule $= %targetModule)
{
//just move the files
%assetPath = makeFullPath(AssetDatabase.getAssetFilePath(%assetDef.getAssetId()));
%assetFilename = fileName(%assetPath);
%newAssetPath = %destination @ "/" @ %assetFilename;
%copiedSuccess = pathCopy(%assetPath, %destination @ "/" @ %assetFilename);
%deleteSuccess = fileDelete(%assetPath);
%imagePath = %assetDef.imageFile;
%imageFilename = fileName(%imagePath);
%copiedSuccess = pathCopy(%imagePath, %destination @ "/" @ %imageFilename);
%deleteSuccess = fileDelete(%imagePath);
}
AssetDatabase.removeDeclaredAsset(%assetDef.getAssetId());
AssetDatabase.addDeclaredAsset(%targetModule, %newAssetPath);
}
function GuiInspectorTypeImageAssetPtr::onControlDropped( %this, %payload, %position )
{
Canvas.popDialog(EditorDragAndDropLayer);

View file

@ -92,6 +92,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%diffuseTypeSuffixes, ",;") == 0 ? "_albedo" : getToken(%diffuseTypeSuffixes, ",;", 0);
%diffuseAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.diffuseImageAsset = %diffuseAsset;
}
}
@ -114,6 +115,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%normalTypeSuffixes, ",;") == 0 ? "_normal" : getToken(%normalTypeSuffixes, ",;", 0);
%normalAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.normalImageAsset = %normalAsset;
}
}
@ -134,6 +136,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%metalnessTypeSuffixes, ",;") == 0 ? "_metalness" : getToken(%metalnessTypeSuffixes, ",;", 0);
%metalAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.metalImageAsset = %metalAsset;
}
}
@ -154,6 +157,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%roughnessTypeSuffixes, ",;") == 0 ? "_roughness" : getToken(%roughnessTypeSuffixes, ",;", 0);
%roughnessAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.roughnessImageAsset = %roughnessAsset;
}
}
@ -174,6 +178,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%smoothnessTypeSuffixes, ",;") == 0 ? "_smoothness" : getToken(%smoothnessTypeSuffixes, ",;", 0);
%smoothnessAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.SmoothnessImageAsset = %smoothnessAsset;
}
}
@ -194,6 +199,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%aoTypeSuffixes, ",;") == 0 ? "_AO" : getToken(%aoTypeSuffixes, ",;", 0);
%AOAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.AOImageAsset = %AOAsset;
}
}
@ -214,6 +220,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
//the material name), then we go ahead and create a blank entry
%suff = getTokenCount(%compositeTypeSuffixes, ",;") == 0 ? "_composite" : getToken(%compositeTypeSuffixes, ",;", 0);
%compositeAsset = AssetBrowser.addImportingAsset("Image", %assetItem.AssetName @ %suff, %assetItem);
%assetItem.compositeImageAsset = %compositeAsset;
}
}

View file

@ -175,7 +175,7 @@ function AssetBrowser::importShapeAsset(%this, %assetItem)
%assetId = %moduleName@":"@%assetName;
%assetPath = AssetBrowser.currentAddress @ "/";
%assetFullPath = %assetPath @ "/" @ fileName(%filePath);
%assetFullPath = %assetPath @ fileName(%filePath);
%newAsset = new ShapeAsset()
{
@ -213,7 +213,7 @@ function AssetBrowser::importShapeAsset(%this, %assetItem)
}
}
%assetImportSuccessful = TAMLWrite(%newAsset, %assetPath @ "/" @ %assetName @ ".asset.taml");
%assetImportSuccessful = TAMLWrite(%newAsset, %assetPath @ %assetName @ ".asset.taml");
//and copy the file into the relevent directory
%doOverwrite = !AssetBrowser.isAssetReImport;
@ -245,6 +245,11 @@ function AssetBrowser::importShapeAsset(%this, %assetItem)
if(getAssetImportConfigValue("Materials/DoUpAxisOverride", "") $= "1")
%constructor.upAxis = getAssetImportConfigValue("Meshes/UpAxisOverride", "Z_AXIS");
if(getAssetImportConfigValue("Meshes/DoScaleOverride", "0") $= "1")
%constructor.unit = getAssetImportConfigValue("Meshes/ScaleOverride", "1");
else
%constructor.unit = -1;
%constructor.lodType = getAssetImportConfigValue("Meshes/LODType", "0");
//%constructor.singleDetailSize = getAssetImportConfigValue("Meshes/convertLeftHanded", "0");
@ -287,11 +292,23 @@ function AssetBrowser::importShapeAsset(%this, %assetItem)
%moduleDef = ModuleDatabase.findModule(%moduleName,1);
if(!AssetBrowser.isAssetReImport)
AssetDatabase.addDeclaredAsset(%moduleDef, %assetPath @ "/" @ %assetName @ ".asset.taml");
AssetDatabase.addDeclaredAsset(%moduleDef, %assetPath @ %assetName @ ".asset.taml");
else
AssetDatabase.refreshAsset(%assetId);
}
function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData)
{
%previewData.assetName = %assetDef.assetName;
%previewData.assetPath = %assetDef.fileName;
%previewData.previewImage = fileName;
%previewData.assetFriendlyName = %assetDef.assetName;
%previewData.assetDesc = %assetDef.description;
%previewData.tooltip = %assetDef.friendlyName @ "\n" @ %assetDef;
}
function GuiInspectorTypeShapeAssetPtr::onControlDropped( %this, %payload, %position )
{
Canvas.popDialog(EditorDragAndDropLayer);
@ -304,12 +321,12 @@ function GuiInspectorTypeShapeAssetPtr::onControlDropped( %this, %payload, %posi
if(%assetType $= "ShapeAsset")
{
echo("DROPPED A SHAPE ON A SHAPE ASSET COMPONENT FIELD!");
//echo("DROPPED A SHAPE ON A SHAPE ASSET COMPONENT FIELD!");
%module = %payload.dragSourceControl.parentGroup.moduleName;
%asset = %payload.dragSourceControl.parentGroup.assetName;
%targetComponent = %this.ComponentOwner;
%targetComponent = %this.targetObject;
%targetComponent.MeshAsset = %module @ ":" @ %asset;
//Inspector.refresh();

View file

@ -153,7 +153,7 @@ function AssetNameField::onReturn(%this)
}
//------------------------------------------------------------
function AssetBrowser::moveAsset(%this, %destination)
function AssetBrowser::moveAsset(%this, %assetId, %destination)
{
if(EditAssetPopup.assetType $= "Folder")
{
@ -163,12 +163,15 @@ function AssetBrowser::moveAsset(%this, %destination)
}
else
{
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
%assetType = AssetDatabase.getAssetType(EditAssetPopup.assetType);
%assetDef = AssetDatabase.acquireAsset(%assetId);
%assetType = AssetDatabase.getAssetType(%assetId);
//Do any cleanup required given the type
if(%this.isMethod("move"@%assetType))
eval(%this @ ".move"@%assetType@"("@%assetDef@");");
{
%command = %this @ ".move" @ %assetType @ "(" @ %assetDef @ ",\"" @ %destination @ "\");";
eval(%this @ ".move" @ %assetType @ "(" @ %assetDef @ ",\"" @ %destination @ "\");");
}
}
}

View file

@ -104,24 +104,24 @@ function AssetBrowser::buildPopupMenus(%this)
class = "EditorWorldMenu";
//isPopup = true;
item[ 0 ] = "Create Material" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"MaterialAsset\", AssetBrowser.selectedModule);";//"createNewMaterialAsset(\"NewMaterial\", AssetBrowser.selectedModule);";
item[ 1 ] = "Create Terrain Material" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"TerrainMaterialAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewImageAsset(\"NewImage\", AssetBrowser.selectedModule);";
item[ 2 ] = "Create Image" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ImageAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewImageAsset(\"NewImage\", AssetBrowser.selectedModule);";
item[ 0 ] = "Material" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"MaterialAsset\", AssetBrowser.selectedModule);";//"createNewMaterialAsset(\"NewMaterial\", AssetBrowser.selectedModule);";
item[ 1 ] = "Terrain Material" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"TerrainMaterialAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewImageAsset(\"NewImage\", AssetBrowser.selectedModule);";
item[ 2 ] = "Image" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ImageAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewImageAsset(\"NewImage\", AssetBrowser.selectedModule);";
item[ 3 ] = "-";
item[ 4 ] = "Create Terrain Data" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"TerrainAsset\", AssetBrowser.selectedModule);";
item[ 4 ] = "Terrain Data" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"TerrainAsset\", AssetBrowser.selectedModule);";
item[ 5 ] = "-";
item[ 6 ] = "Create Shape" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"Shape\", AssetBrowser.selectedModule);";
item[ 7 ] = "Create Shape Animation" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ShapeAnimationAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewShapeAnimationAsset(\"NewShapeAnimation\", AssetBrowser.selectedModule);";
item[ 6 ] = "Shape" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"Shape\", AssetBrowser.selectedModule);";
item[ 7 ] = "Shape Animation" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ShapeAnimationAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewShapeAnimationAsset(\"NewShapeAnimation\", AssetBrowser.selectedModule);";
item[ 8 ] = "-";
item[ 9 ] = "Create GUI" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"GUIAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewGUIAsset(\"NewGUI\", AssetBrowser.selectedModule);";
item[ 9 ] = "GUI" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"GUIAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewGUIAsset(\"NewGUI\", AssetBrowser.selectedModule);";
item[ 10 ] = "-";
item[ 11 ] = "Create Post Effect" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"PostEffectAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewPostEffectAsset(\"NewPostEffect\", AssetBrowser.selectedModule);";
item[ 11 ] = "Post Effect" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"PostEffectAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewPostEffectAsset(\"NewPostEffect\", AssetBrowser.selectedModule);";
item[ 12 ] = "-";
item[ 13 ] = "Create Sound" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"SoundAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewSoundAsset(\"NewSound\", AssetBrowser.selectedModule);";
item[ 13 ] = "Sound" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"SoundAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewSoundAsset(\"NewSound\", AssetBrowser.selectedModule);";
item[ 14 ] = "-";
item[ 15 ] = "Create Particle Effect" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ParticleEffectAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewParticleEffectAsset(\"NewParticleEffect\", AssetBrowser.selectedModule);";
item[ 15 ] = "Particle Effect" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ParticleEffectAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewParticleEffectAsset(\"NewParticleEffect\", AssetBrowser.selectedModule);";
item[ 16 ] = "-";
item[ 17 ] = "Create Cubemap" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"CubemapAsset\", AssetBrowser.selectedModule);";
item[ 17 ] = "Cubemap" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"CubemapAsset\", AssetBrowser.selectedModule);";
};
}
@ -139,7 +139,7 @@ function AssetBrowser::buildPopupMenus(%this)
item[ 3 ] = "Create Component Class" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"CppComponentAsset\", AssetBrowser.selectedModule);";
item[ 4 ] = "Create Script Class" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"CppScriptClass\", AssetBrowser.selectedModule);";*/
item[ 0 ] = "Create C++ Class" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"CppAsset\", AssetBrowser.selectedModule);";
item[ 0 ] = "C++ Class" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"CppAsset\", AssetBrowser.selectedModule);";
};
//%this.AddNewScriptAssetPopup.insertSubMenu(0, "Create Component", AddNewComponentAssetPopup);
}
@ -151,17 +151,17 @@ function AssetBrowser::buildPopupMenus(%this)
superClass = "MenuBuilder";
class = "EditorWorldMenu";
item[0] = "Create Folder" TAB "" TAB "AssetBrowser.CreateNewFolder();";
item[0] = "Folder" TAB "" TAB "AssetBrowser.CreateNewFolder();";
item[1] = "-";
item[2] = "Create Code Asset" TAB AddNewScriptAssetPopup;
item[2] = "Code Asset" TAB AddNewScriptAssetPopup;
item[3] = "-";
item[4] = "Create Art Asset" TAB AddNewArtAssetPopup;
item[4] = "Art Asset" TAB AddNewArtAssetPopup;
item[5] = "-";
item[6] = "Create Level" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"LevelAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewLevelAsset(\"NewLevel\", AssetBrowser.selectedModule);";
item[6] = "Level" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"LevelAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewLevelAsset(\"NewLevel\", AssetBrowser.selectedModule);";
item[7] = "-";
item[8] = "Create C++ Asset" TAB AddNewCppAssetPopup;
item[8] = "C++ Asset" TAB AddNewCppAssetPopup;
item[9] = "-";
item[10] = "Create New Module" TAB "" TAB "AssetBrowser.CreateNewModule();";
item[10] = "New Module" TAB "" TAB "AssetBrowser.CreateNewModule();";
};
}
@ -174,7 +174,7 @@ function AssetBrowser::buildPopupMenus(%this)
class = "EditorWorldMenu";
//isPopup = true;
item[ 0 ] = "Create New Asset" TAB AddNewAssetPopup;
item[ 0 ] = "New Asset" TAB AddNewAssetPopup;
item[ 1 ] = "Reload Module" TAB "" TAB "AssetBrowser.reloadModule();";
Item[ 2 ] = "-";
Item[ 3 ] = "Edit Module" TAB "" TAB "AssetBrowser.editModuleInfo();";
@ -199,7 +199,7 @@ function AssetBrowser::buildPopupMenus(%this)
class = "EditorWorldMenu";
//isPopup = true;
Item[ 0 ] = "Create in Folder" TAB AddNewAssetPopup;
Item[ 0 ] = "Create" TAB AddNewAssetPopup;
item[ 1 ] = "-";
item[ 2 ] = "Rename Folder" TAB "" TAB "AssetBrowser.renameAsset();";
Item[ 3 ] = "Duplicate Folder" TAB "" TAB "AssetBrowser.duplicateAsset();";
@ -243,15 +243,22 @@ function AssetBrowser::buildPopupMenus(%this)
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
radioSelection = false;
};
/*for(%i=0; %i < AssetFilterTypeList.Count(); %i++)
AssetTypeListPopup.addItem(0, AssetFilterTypeList.getKey(0) TAB "" TAB "AssetBrowser.toggleAssetTypeFilter(" @ 0 @ ");");
AssetTypeListPopup.addItem(1, "-");
for(%i=1; %i < AssetFilterTypeList.Count(); %i++)
{
%assetTypeName = AssetFilterTypeList.getKey(%i);
AssetTypeListPopup.insertItem(%i, %assetTypeName, "", "AssetBrowser.toggleAssetTypeFilter(" @ %i @ ");");
}*/
AssetTypeListPopup.addItem(%i+1, %assetTypeName TAB "" TAB "AssetBrowser.toggleAssetTypeFilter(" @ %i + 1 @ ");");
}
}
AssetBrowser.toggleAssetTypeFilter(0);
//Browser visibility menu
if( !isObject( BrowserVisibilityPopup ) )
{
@ -276,7 +283,6 @@ function AssetBrowser::buildPopupMenus(%this)
};
BrowserVisibilityPopup.enableItem(5, false);
BrowserVisibilityPopup.enableItem(7, false);
BrowserVisibilityPopup.enableItem(9, false);
}

View file

@ -1,257 +1,259 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<EditorSettings>
<Group name="ShapeEditor">
<Setting name="gridSize">0.1</Setting>
<Setting name="showObjBox">1</Setting>
<Setting name="showNodes">1</Setting>
<Setting name="SunAngleX">45</Setting>
<Setting name="AdvancedWndVisible">1</Setting>
<Setting name="SunAmbientColor">180 180 180 255</Setting>
<Setting name="backgroundColor">0 0 0 100</Setting>
<Setting name="SunAngleZ">135</Setting>
<Setting name="renderMounts">1</Setting>
<Setting name="RenderCollision">0</Setting>
<Setting name="showBounds">0</Setting>
<Setting name="ShowGrid">1</Setting>
<Setting name="SunDiffuseColor">255 255 255 255</Setting>
<Setting name="highlightMaterial">1</Setting>
<Setting name="gridDimension">40 40</Setting>
</Group>
<Group name="WorldEditor">
<Setting name="EditorLayoutMode">Modern</Setting>
<Setting name="orthoFOV">50</Setting>
<Setting name="forceLoadDAE">0</Setting>
<Setting name="displayType">6</Setting>
<Setting name="recentLevelsList">TTR:DasBootLevel,pbr:PbrMatTestLevel</Setting>
<Setting name="lastEditedLevel">TTR:DasBootLevel</Setting>
<Setting name="dropType">screenCenter</Setting>
<Setting name="undoLimit">40</Setting>
<Setting name="torsionPath">AssetWork_Debug.exe</Setting>
<Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
<Setting name="startupMode">Blank Level</Setting>
<Setting name="orthoShowGrid">1</Setting>
<Group name="Docs">
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
</Group>
<Group name="Layout">
<Setting name="LayoutMode">Classic</Setting>
</Group>
<Group name="Render">
<Setting name="renderObjHandle">1</Setting>
<Setting name="renderPopupBackground">1</Setting>
<Setting name="renderObjText">1</Setting>
<Setting name="renderSelectionBox">1</Setting>
<Setting name="showMousePopupInfo">1</Setting>
</Group>
<Group name="Tools">
<Setting name="OffsetZValue">0.01</Setting>
<Setting name="TerrainSnapOffsetZ">0</Setting>
<Setting name="snapSoft">0</Setting>
<Setting name="snapSoftSize">2</Setting>
<Setting name="boundingBoxCollision">0</Setting>
<Setting name="snapGround">0</Setting>
<Setting name="dropAtScreenCenterMax">100</Setting>
<Setting name="objectsUseBoxCenter">1</Setting>
<Setting name="dropAtScreenCenterScalar">1</Setting>
</Group>
<Group name="Color">
<Setting name="objSelectColor">255 0 0 255</Setting>
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
<Setting name="objectTextColor">255 255 255 255</Setting>
<Setting name="selectionBoxColor">255 255 0 255</Setting>
<Setting name="dragRectColor">255 255 0 255</Setting>
<Setting name="objMouseOverColor">0 255 0 255</Setting>
</Group>
<Group name="ObjectIcons">
<Setting name="fadeIconsStartAlpha">255</Setting>
<Setting name="fadeIcons">1</Setting>
<Setting name="fadeIconsStartDist">8</Setting>
<Setting name="fadeIconsEndDist">20</Setting>
<Setting name="fadeIconsEndAlpha">0</Setting>
</Group>
<Group name="Grid">
<Setting name="gridMinorColor">51 51 51 100</Setting>
<Setting name="gridSize">1</Setting>
<Setting name="gridSnap">1</Setting>
<Setting name="gridColor">102 102 102 100</Setting>
<Setting name="gridOriginColor">255 255 255 100</Setting>
</Group>
<Group name="Theme">
<Setting name="windowTitleBGColor">50 50 50 255</Setting>
<Setting name="windowTitleFontHLColor">255 255 255 255</Setting>
<Setting name="windowTitleBGHLColor">48 48 48 255</Setting>
<Setting name="windowTitleFontColor">215 215 215 255</Setting>
<Setting name="windowTitleBGNAColor">180 180 180 255</Setting>
</Group>
<Group name="Images">
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
</Group>
</Group>
<Group name="AxisGizmo">
<Setting name="renderInfoText">1</Setting>
<Setting name="snapRotations">0</Setting>
<Setting name="mouseRotateScalar">0.8</Setting>
<Setting name="axisGizmoMaxScreenLen">100</Setting>
<Setting name="rotationSnap">15</Setting>
<Setting name="mouseScaleScalar">0.8</Setting>
<Setting name="renderWhenUsed">0</Setting>
<Group name="Grid">
<Setting name="gridColor">255 255 255 20</Setting>
<Setting name="planeDim">500</Setting>
<Setting name="renderPlaneHashes">0</Setting>
<Setting name="renderPlane">0</Setting>
<Setting name="gridSize">1 1 1</Setting>
<Setting name="snapToGrid">1</Setting>
</Group>
</Group>
<Group name="NavEditor">
<Setting name="spawnDatablock">DefaultPlayerData</Setting>
<Setting name="SpawnClass">AIPlayer</Setting>
<Setting name="backgroundBuild">1</Setting>
<Group name="RoadEditor">
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="DefaultWidth">10</Setting>
<Setting name="materialName">DefaultDecalRoadMaterial</Setting>
<Setting name="HoverNodeColor">255 255 255 255</Setting>
</Group>
<Group name="AssetCreation">
<Setting name="TerrainAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="LevelAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;AssetName&gt;/</Setting>
<Setting name="PostFXAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="TerrainMatAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="StatemachineAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="AutoImport">1</Setting>
<Setting name="CubemapAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="GUIAssetSubdirectoryFormat">&lt;AssetType&gt;/OtherFolder/</Setting>
<Setting name="CubemapAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="StatemachineAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="PostFXAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="LevelAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;AssetName&gt;/</Setting>
<Setting name="TerrainMatAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="AssetImporDefaultConfig">TestConfig</Setting>
<Setting name="AutoImport">1</Setting>
<Setting name="CppAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;SpecialAssetTag&gt;/</Setting>
<Setting name="ScriptAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;SpecialAssetTag&gt;/</Setting>
</Group>
<Group name="MeshRoadEditor">
<Setting name="DefaultNormal">0 0 1</Setting>
<Setting name="HoverSplineColor">255 0 0 255</Setting>
<Setting name="DefaultWidth">10</Setting>
<Setting name="sideMaterialName">DefaultRoadMaterialOther</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="topMaterialName">DefaultRoadMaterialTop</Setting>
<Group name="ShapeEditor">
<Setting name="ShowGrid">1</Setting>
<Setting name="SunAngleZ">135</Setting>
<Setting name="showBounds">0</Setting>
<Setting name="gridSize">0.1</Setting>
<Setting name="RenderCollision">0</Setting>
<Setting name="showNodes">1</Setting>
<Setting name="backgroundColor">0 0 0 100</Setting>
<Setting name="SunDiffuseColor">255 255 255 255</Setting>
<Setting name="SunAmbientColor">180 180 180 255</Setting>
<Setting name="showObjBox">1</Setting>
<Setting name="highlightMaterial">1</Setting>
<Setting name="AdvancedWndVisible">1</Setting>
<Setting name="SunAngleX">45</Setting>
<Setting name="gridDimension">40 40</Setting>
<Setting name="renderMounts">1</Setting>
</Group>
<Group name="TerrainEditor">
<Setting name="currentAction">lowerHeight</Setting>
<Group name="ActionValues">
<Setting name="softSelectFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
<Setting name="adjustHeightVal">10</Setting>
<Setting name="SlopeMaxAngle">90</Setting>
<Setting name="scaleVal">1</Setting>
<Setting name="noiseFactor">1</Setting>
<Setting name="softSelectDefaultFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
<Setting name="softSelectRadius">50</Setting>
<Setting name="SlopeMinAngle">0</Setting>
<Setting name="setHeightVal">100</Setting>
<Setting name="smoothFactor">0.1</Setting>
</Group>
<Group name="Brush">
<Setting name="maxBrushSize">40 40</Setting>
<Setting name="brushSoftness">1</Setting>
<Setting name="brushPressure">1</Setting>
<Setting name="brushSize">40 40</Setting>
<Setting name="brushType">ellipse</Setting>
<Setting name="brushSoftness">1</Setting>
<Setting name="brushPressure">1</Setting>
</Group>
</Group>
<Group name="RiverEditor">
<Setting name="DefaultDepth">5</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="HoverNodeColor">255 255 255 255</Setting>
<Setting name="HoverSplineColor">255 0 0 255</Setting>
<Setting name="DefaultNormal">0 0 1</Setting>
<Setting name="DefaultWidth">10</Setting>
</Group>
<Group name="Assets">
<Setting name="AutoImport">1</Setting>
<Setting name="AssetImporDefaultConfig">TestConfig</Setting>
<Group name="Browser">
<Setting name="previewTileSize">small</Setting>
<Group name="ActionValues">
<Setting name="smoothFactor">0.1</Setting>
<Setting name="softSelectDefaultFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
<Setting name="scaleVal">1</Setting>
<Setting name="softSelectFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
<Setting name="setHeightVal">100</Setting>
<Setting name="SlopeMaxAngle">90</Setting>
<Setting name="SlopeMinAngle">0</Setting>
<Setting name="noiseFactor">1</Setting>
<Setting name="adjustHeightVal">10</Setting>
<Setting name="softSelectRadius">50</Setting>
</Group>
</Group>
<Group name="Theme">
<Setting name="headerTextColor">236 234 232 255</Setting>
<Setting name="fieldBGColor">59 58 57 255</Setting>
<Setting name="windowBackgroundColor">32 31 30 255</Setting>
<Setting name="tabsHLColor">50 49 48 255</Setting>
<Setting name="fieldTextColor">178 175 172 255</Setting>
<Setting name="fieldTextSELColor">255 255 255 255</Setting>
<Setting name="tooltipBGColor">43 43 43 255</Setting>
<Setting name="tabsColor">37 36 35 255</Setting>
<Setting name="tabsSELColor">59 58 57 255</Setting>
<Setting name="fieldBGHLColor">72 70 68 255</Setting>
<Setting name="fieldTextNAColor">77 77 77 255</Setting>
<Setting name="headerColor">50 49 48 255</Setting>
<Setting name="dividerDarkColor">17 16 15 255</Setting>
<Setting name="tooltipDividerColor">72 70 68 255</Setting>
<Setting name="dividerMidColor">50 49 48 255</Setting>
<Setting name="fieldTextHLColor">234 232 230 255</Setting>
<Setting name="fieldBGSELColor">100 98 96 255</Setting>
<Setting name="dividerLightColor">96 94 92 255</Setting>
<Setting name="tooltipTextColor">255 255 255 255</Setting>
</Group>
<Group name="GuiEditor">
<Setting name="lastPath">tools/gui/messageBoxes</Setting>
<Setting name="lastPath">tools/gui</Setting>
<Setting name="previewResolution">1024 768</Setting>
<Group name="Help">
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
</Group>
<Group name="EngineDevelopment">
<Setting name="showEditorProfiles">0</Setting>
<Setting name="toggleIntoEditor">0</Setting>
<Setting name="showEditorGuis">0</Setting>
</Group>
<Group name="Snapping">
<Setting name="snapToEdges">1</Setting>
<Setting name="snapToGuides">1</Setting>
<Setting name="snapToCanvas">1</Setting>
<Setting name="snapToCenters">1</Setting>
<Setting name="sensitivity">2</Setting>
<Setting name="snap2Grid">0</Setting>
<Setting name="snap2GridSize">8</Setting>
<Setting name="snapToControls">1</Setting>
<Setting name="snapToEdges">1</Setting>
<Setting name="snapToGuides">1</Setting>
</Group>
<Group name="Rendering">
<Setting name="drawGuides">1</Setting>
<Setting name="drawBorderLines">1</Setting>
</Group>
<Group name="Library">
<Setting name="viewType">Categorized</Setting>
</Group>
<Group name="Selection">
<Setting name="fullBox">0</Setting>
</Group>
<Group name="EngineDevelopment">
<Setting name="toggleIntoEditor">0</Setting>
<Setting name="showEditorGuis">0</Setting>
<Setting name="showEditorProfiles">0</Setting>
</Group>
<Group name="WorldEditor">
<Setting name="undoLimit">40</Setting>
<Setting name="forceSidebarToSide">1</Setting>
<Setting name="recentLevelsList">pbr:PbrMatTestLevel,TTR:DasBootLevel</Setting>
<Setting name="orthoFOV">50</Setting>
<Setting name="orthoShowGrid">1</Setting>
<Setting name="lastEditedLevel">pbr:PbrMatTestLevel</Setting>
<Setting name="startupMode">Blank Level</Setting>
<Setting name="dropType">screenCenter</Setting>
<Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
<Setting name="displayType">6</Setting>
<Setting name="torsionPath">AssetWork_Debug.exe</Setting>
<Setting name="EditorLayoutMode">Modern</Setting>
<Setting name="forceLoadDAE">0</Setting>
<Group name="Grid">
<Setting name="gridSnap">1</Setting>
<Setting name="gridColor">102 102 102 100</Setting>
<Setting name="gridOriginColor">255 255 255 100</Setting>
<Setting name="gridMinorColor">51 51 51 100</Setting>
<Setting name="gridSize">1</Setting>
</Group>
<Group name="Library">
<Setting name="viewType">Categorized</Setting>
<Group name="Color">
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
<Setting name="selectionBoxColor">255 255 0 255</Setting>
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
<Setting name="objectTextColor">255 255 255 255</Setting>
<Setting name="objSelectColor">255 0 0 255</Setting>
<Setting name="dragRectColor">255 255 0 255</Setting>
<Setting name="objMouseOverColor">0 255 0 255</Setting>
</Group>
<Group name="Theme">
<Setting name="windowTitleBGHLColor">48 48 48 255</Setting>
<Setting name="windowTitleBGColor">50 50 50 255</Setting>
<Setting name="windowTitleBGNAColor">180 180 180 255</Setting>
<Setting name="windowTitleFontHLColor">255 255 255 255</Setting>
<Setting name="windowTitleFontColor">215 215 215 255</Setting>
</Group>
<Group name="Docs">
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
</Group>
<Group name="Tools">
<Setting name="boundingBoxCollision">0</Setting>
<Setting name="snapSoftSize">2</Setting>
<Setting name="TerrainSnapOffsetZ">0</Setting>
<Setting name="snapSoft">0</Setting>
<Setting name="OffsetZValue">0.01</Setting>
<Setting name="snapGround">0</Setting>
<Setting name="dropAtScreenCenterMax">100</Setting>
<Setting name="objectsUseBoxCenter">1</Setting>
<Setting name="dropAtScreenCenterScalar">1</Setting>
</Group>
<Group name="Images">
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
</Group>
<Group name="Render">
<Setting name="renderObjHandle">1</Setting>
<Setting name="renderObjText">1</Setting>
<Setting name="renderPopupBackground">1</Setting>
<Setting name="showMousePopupInfo">1</Setting>
<Setting name="renderSelectionBox">1</Setting>
</Group>
<Group name="ObjectIcons">
<Setting name="fadeIconsEndDist">20</Setting>
<Setting name="fadeIconsEndAlpha">0</Setting>
<Setting name="fadeIconsStartAlpha">255</Setting>
<Setting name="fadeIcons">1</Setting>
<Setting name="fadeIconsStartDist">8</Setting>
</Group>
<Group name="Layout">
<Setting name="LayoutMode">Classic</Setting>
</Group>
</Group>
<Group name="MeshRoadEditor">
<Setting name="DefaultWidth">10</Setting>
<Setting name="topMaterialName">DefaultRoadMaterialTop</Setting>
<Setting name="DefaultNormal">0 0 1</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="HoverSplineColor">255 0 0 255</Setting>
<Setting name="sideMaterialName">DefaultRoadMaterialOther</Setting>
</Group>
<Group name="AxisGizmo">
<Setting name="renderWhenUsed">0</Setting>
<Setting name="renderInfoText">1</Setting>
<Setting name="snapRotations">0</Setting>
<Setting name="mouseRotateScalar">0.8</Setting>
<Setting name="axisGizmoMaxScreenLen">100</Setting>
<Setting name="rotationSnap">15</Setting>
<Setting name="mouseScaleScalar">0.8</Setting>
<Group name="Grid">
<Setting name="renderPlaneHashes">0</Setting>
<Setting name="forceSnapRotations">1</Setting>
<Setting name="gridSize">1 1 1</Setting>
<Setting name="planeDim">500</Setting>
<Setting name="renderPlane">0</Setting>
<Setting name="gridColor">255 255 255 20</Setting>
<Setting name="snapToGrid">1</Setting>
</Group>
</Group>
<Group name="RiverEditor">
<Setting name="DefaultDepth">5</Setting>
<Setting name="HoverSplineColor">255 0 0 255</Setting>
<Setting name="HoverNodeColor">255 255 255 255</Setting>
<Setting name="DefaultNormal">0 0 1</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="DefaultWidth">10</Setting>
</Group>
<Group name="NavEditor">
<Setting name="spawnDatablock">DefaultPlayerData</Setting>
<Setting name="SpawnClass">AIPlayer</Setting>
<Setting name="backgroundBuild">1</Setting>
</Group>
<Group name="AssetBrowser">
<Setting name="previewSize">Small</Setting>
</Group>
<Group name="Theme">
<Setting name="fieldBGSELColor">100 98 96 255</Setting>
<Setting name="dividerMidColor">50 49 48 255</Setting>
<Setting name="headerColor">50 49 48 255</Setting>
<Setting name="windowBackgroundColor">32 31 30 255</Setting>
<Setting name="tooltipDividerColor">72 70 68 255</Setting>
<Setting name="fieldTextHLColor">234 232 230 255</Setting>
<Setting name="dividerDarkColor">17 16 15 255</Setting>
<Setting name="fieldBGHLColor">72 70 68 255</Setting>
<Setting name="headerTextColor">236 234 232 255</Setting>
<Setting name="tooltipBGColor">43 43 43 255</Setting>
<Setting name="fieldTextNAColor">77 77 77 255</Setting>
<Setting name="tooltipTextColor">255 255 255 255</Setting>
<Setting name="fieldTextColor">178 175 172 255</Setting>
<Setting name="fieldBGColor">59 58 57 255</Setting>
<Setting name="dividerLightColor">96 94 92 255</Setting>
<Setting name="tabsHLColor">50 49 48 255</Setting>
<Setting name="fieldTextSELColor">255 255 255 255</Setting>
<Setting name="tabsColor">37 36 35 255</Setting>
<Setting name="tabsSELColor">59 58 57 255</Setting>
</Group>
<Group name="Assets">
<Setting name="AssetImporDefaultConfig">TestConfig</Setting>
<Setting name="AutoImport">0</Setting>
<Group name="Browser">
<Setting name="previewTileSize">small</Setting>
</Group>
</Group>
<Group name="LevelInformation">
<Setting name="levelsDirectory">data/FPSGameplay/levels</Setting>
<Group name="levels">
<Group name="PbrMatTest.mis">
<Setting name="cameraSpeed">5</Setting>
</Group>
<Group name="BlankRoom.mis">
<Setting name="cameraSpeed">25</Setting>
</Group>
<Group name="PbrMatTest.mis">
<Setting name="cameraSpeed">5</Setting>
</Group>
</Group>
</Group>
<Group name="RoadEditor">
<Setting name="DefaultWidth">10</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="HoverNodeColor">255 255 255 255</Setting>
<Setting name="materialName">DefaultDecalRoadMaterial</Setting>
</Group>
<Group name="ConvexEditor">
<Setting name="materialName">Grid_512_Orange</Setting>
</Group>
<Group name="DatablockEditor">
<Setting name="libraryTab">1</Setting>
</Group>
<Group name="AssetBrowser">
<Setting name="previewSize">Small</Setting>
</Group>
</EditorSettings>

View file

@ -1344,6 +1344,7 @@ function EWorldEditor::setGridSnap( %this, %value )
{
%this.gridSnap = %value;
GlobalGizmoProfile.snapToGrid = %value;
GlobalGizmoProfile.forceSnapRotations = %value;
%this.syncGui();
}

View file

@ -131,6 +131,7 @@ EditorSettings.beginGroup( "Grid" );
EditorSettings.setDefaultValue( "gridColor", "255 255 255 20" );
EditorSettings.setDefaultValue( "gridSize", "1 1 1" );
EditorSettings.setDefaultValue( "snapToGrid", "0" ); //<-- Not currently used
EditorSettings.setDefaultValue( "forceSnapRotations", "0" ); //<-- Not currently used
EditorSettings.setDefaultValue( "renderPlane", "0" );
EditorSettings.setDefaultValue( "renderPlaneHashes", "0" );
EditorSettings.setDefaultValue( "planeDim", "500" );
@ -276,6 +277,7 @@ function EditorGui::readWorldEditorSettings(%this)
GlobalGizmoProfile.gridColor = EditorSettings.value("gridColor"); //$pref::WorldEditor::gridColor;
GlobalGizmoProfile.gridSize = EditorSettings.value("gridSize"); //$pref::WorldEditor::gridSize;
GlobalGizmoProfile.snapToGrid = EditorSettings.value("snapToGrid"); //$pref::WorldEditor::snapToGrid;
GlobalGizmoProfile.forceSnapRotations = EditorSettings.value("forceSnapRotations"); //$pref::WorldEditor::forceSnapRotations;
GlobalGizmoProfile.renderPlane = EditorSettings.value("renderPlane"); //$pref::WorldEditor::renderPlane;
GlobalGizmoProfile.renderPlaneHashes = EditorSettings.value("renderPlaneHashes"); //$pref::WorldEditor::renderPlaneHashes;
GlobalGizmoProfile.planeDim = EditorSettings.value("planeDim"); //$pref::WorldEditor::planeDim;
@ -371,6 +373,7 @@ function EditorGui::writeWorldEditorSettings(%this)
EditorSettings.setValue( "gridColor", GlobalGizmoProfile.gridColor ); //$Pref::WorldEditor::gridColor
EditorSettings.setValue( "gridSize", GlobalGizmoProfile.gridSize ); //$Pref::WorldEditor::gridSize
EditorSettings.setValue( "snapToGrid", GlobalGizmoProfile.snapToGrid ); //$Pref::WorldEditor::snapToGrid
EditorSettings.setValue( "forceSnapRotations", GlobalGizmoProfile.forceSnapRotations ); //$Pref::WorldEditor::forceSnapRotations
EditorSettings.setValue( "renderPlane", GlobalGizmoProfile.renderPlane ); //$Pref::WorldEditor::renderPlane
EditorSettings.setValue( "renderPlaneHashes", GlobalGizmoProfile.renderPlaneHashes );//$Pref::WorldEditor::renderPlaneHashes
EditorSettings.setValue( "planeDim", GlobalGizmoProfile.planeDim ); //$Pref::WorldEditor::planeDim

View file

@ -216,9 +216,9 @@ function toggleSurfacePropertiesViz( %mode )
for(%i=0; %i < 15; %i++)
{
if(%i == $Viz_SurfacePropertiesModeVar)
EVisibilityBufferVizOptions.checkItem(%i, true);
EVisibilityBufferVizOptions.checkItem(%i+1, true);
else
EVisibilityBufferVizOptions.checkItem(%i, false);
EVisibilityBufferVizOptions.checkItem(%i+1, false);
}
//forces the forward materials to get dis viz properly