mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-23 21:35:34 +00:00
Converts the ad-hoc design of the Material Editor to utilize the same inspector interface as most everything else does.
- Overhauls the material editor to simplify and streamline the logic behind it since the inspector does most of the work - Tweak a few order positions of materialdefinition fields to work better - Sets AO, Rough and Metal channel fields to use an enum type for human readability - Updates the MaterialPreview gui control to work with assetIds - MatEd now supports setting of parent material to inherit from - Creating a new material now can prompt selecting an existing material to inherit from - Can now edit the mapTo value of a material in the matEd - New standalone Composite Texture Editor window for convering AO, Roughness and Metalness maps in a material to an ORMMap - Can also star the creation of a composite texture via RMB context menu in AB on an image asset - Moved logic of CubemapEditor from MatEd to it's own stuff - Made ImageAsset fields now be more clear when they have nothing assigned, and also have a clear button to empty the field's value so it's consistent across the board - Reorganized the layout of the gui and image files for the MatEd to be easier to navigate - MaterialEditor now overlays the EditorGUI instead of being forcefully embedded in it, allowing easy editing of the MatEd Gui via the Gui editor
This commit is contained in:
parent
8e93753b15
commit
f3cad0d77e
173 changed files with 3713 additions and 6977 deletions
|
|
@ -26,30 +26,19 @@ function initializeMaterialEditor()
|
|||
{
|
||||
echo(" % - Initializing Material Editor");
|
||||
|
||||
// Load Preview Window
|
||||
exec("~/materialEditor/gui/guiMaterialPreviewWindow.ed.gui");
|
||||
|
||||
// Load Properties Window
|
||||
exec("~/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui");
|
||||
|
||||
//Material Instance viewer
|
||||
exec("~/materialEditor/gui/materialInstancesView.ed.gui");
|
||||
|
||||
exec("./gui/MaterialEditorGui.gui");
|
||||
|
||||
// Load Client Scripts.
|
||||
exec("./scripts/materialEditor.ed." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/materialEditorUndo.ed." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/materialInstanceView.ed." @ $TorqueScriptFileExtension);
|
||||
//exec("./gui/profiles.ed." @ $TorqueScriptFileExtension);
|
||||
|
||||
MaterialEditorPreviewWindow.setVisible( false );
|
||||
//matEd_cubemapEditor.setVisible( false );
|
||||
matEd_addCubemapWindow.setVisible( false );
|
||||
MaterialEditorPropertiesWindow.setVisible( false );
|
||||
|
||||
MainSceneTabPanel.add( MaterialEditorPreviewWindow );
|
||||
MainSceneTabPanel.add( matEd_cubemapEditor );
|
||||
MainSceneTabPanel.add( matEd_addCubemapWindow );
|
||||
MainSceneTabPanel.add( MaterialEditorPropertiesWindow );
|
||||
exec("./scripts/materialAnimationFieldTypes." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/bakeCompositeButtonFieldType." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/ORMSliderFieldType." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
function destroyMaterialEditor()
|
||||
|
|
@ -131,8 +120,8 @@ function MaterialEditorPlugin::onActivated( %this )
|
|||
materialAdvancedPropertiesRollout.Expanded = false;
|
||||
WorldEditorPlugin.onActivated();
|
||||
|
||||
EditorGui-->MatEdPropertiesWindow.setVisible( true );
|
||||
EditorGui-->MatEdPreviewWindow.setVisible( true );
|
||||
//EditorGui-->MatEdPropertiesWindow.setVisible( true );
|
||||
//EditorGui-->MatEdPreviewWindow.setVisible( true );
|
||||
EditorGui-->WorldEditorToolbar.setVisible( true );
|
||||
|
||||
MaterialEditorGui.currentObject = $Tools::materialEditorList;
|
||||
|
|
@ -143,6 +132,8 @@ function MaterialEditorPlugin::onActivated( %this )
|
|||
// Do resize the windows at start
|
||||
MaterialEditorGui.onWake();
|
||||
|
||||
Canvas.pushDialog(MaterialEditorGui);
|
||||
|
||||
Parent::onActivated(%this);
|
||||
}
|
||||
|
||||
|
|
@ -158,10 +149,11 @@ function MaterialEditorPlugin::onDeactivated( %this )
|
|||
|
||||
WorldEditorPlugin.onDeactivated();
|
||||
|
||||
Canvas.popDialog(MaterialEditorGui);
|
||||
MaterialEditorGui.quit();
|
||||
|
||||
EditorGui-->MatEdPropertiesWindow.setVisible( false );
|
||||
EditorGui-->MatEdPreviewWindow.setVisible( false );
|
||||
//EditorGui-->MatEdPropertiesWindow.setVisible( false );
|
||||
//EditorGui-->MatEdPreviewWindow.setVisible( false );
|
||||
EditorGui-->WorldEditorToolbar.setVisible( false );
|
||||
%this.map.pop();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue