Merge branch 'ModernEditorLayoutWIP' of https://github.com/Areloch/Torque3D into development

This commit is contained in:
Areloch 2019-05-13 00:28:23 -05:00
commit 3697737498
148 changed files with 3463 additions and 547 deletions

View file

@ -4476,7 +4476,7 @@
isContainer = "0";
HorizSizing = "left";
VertSizing = "bottom";
position = "86 1";
position = "66 1";
Extent = "16 16";
MinExtent = "8 2";
canSave = "1";
@ -4497,7 +4497,7 @@
Profile = "ToolsGuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "106 1";
position = "86 1";
Extent = "16 16";
MinExtent = "8 2";
canSave = "1";
@ -4519,7 +4519,7 @@
Profile = "ToolsGuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "123 1";
position = "106 1";
Extent = "16 16";
MinExtent = "8 2";
canSave = "1";
@ -4533,6 +4533,27 @@
useMouseEvents = "0";
bitmap = "tools/gui/images/save-icon";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "126 1";
Extent = "16 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "MaterialEditorGui.lookupMaterialInstances();";
hovertime = "1000";
groupNum = "-1";
text ="";
tooltip = "Lookup Material Instances";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/gui/images/visible";
};
new GuiBitmapCtrl(){
position = "147 1";
Extent = "2 16";

View file

@ -32,9 +32,13 @@ function initializeMaterialEditor()
// Load Properties Window
exec("~/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui");
//Material Instance viewer
exec("~/materialEditor/gui/materialInstancesView.ed.gui");
// Load Client Scripts.
exec("./scripts/materialEditor.ed.cs");
exec("./scripts/materialEditorUndo.ed.cs");
exec("./scripts/materialInstanceView.ed.cs");
//exec("./gui/profiles.ed.cs");
MaterialEditorPreviewWindow.setVisible( false );

View file

@ -2278,6 +2278,32 @@ function MaterialEditorGui::refreshMaterial(%this)
MaterialEditorGui.setMaterialNotDirty();
}
//==============================================================================
// Looking up material instances/getting mat info
function MaterialEditorGui::lookupMaterialInstances( %this )
{
if( MaterialEditorGui.currentMaterial.getName() $= "" )
{
MessageBoxOK("Cannot perform operation", "Unable to look up a material with a blank name" );
return;
}
MaterialInstanceViewTree.clear();
MaterialInstanceViewTree.setFilterChildren(false);
MaterialInstanceViewTree.setItemFilterException(1, true);
MaterialEditorGui.currentMaterial.getMaterialInstances(MaterialInstanceViewTree);
if(MaterialInstanceFilter.Text !$= "\c2Filter...")
{
MaterialInstanceViewTree.setFilterText(MaterialInstanceFilter.Text);
}
MaterialInstanceViewTree.buildVisibleTree(true);
Canvas.pushDialog(MaterialInstanceViewCtrl);
}
//==============================================================================
// Switching and Changing Materials