mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
Merge branch 'development' of https://github.com/TorqueGameEngines/Torque3D into mipwip
This commit is contained in:
commit
12fdab166f
4 changed files with 12 additions and 7 deletions
|
|
@ -110,13 +110,12 @@ function CompositeEditorDoSaveComposite(%assetId)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
%targetFilePath = %assetDef.getImagePath();
|
%targetFilePath = filePath(%assetDef.getFilename()) @ "/" @ fileName(%assetDef.imageFile);
|
||||||
|
|
||||||
%aoMapAsset = CompTextureEd_RedChan-->Bitmap.getBitmap();
|
%aoMapAsset = CompTextureEd_RedChan-->Bitmap.getBitmap();
|
||||||
%roughMapAsset = CompTextureEd_GreenChan-->Bitmap.getBitmap();
|
%roughMapAsset = CompTextureEd_GreenChan-->Bitmap.getBitmap();
|
||||||
%metalMapAsset = CompTextureEd_BlueChan-->Bitmap.getBitmap();
|
%metalMapAsset = CompTextureEd_BlueChan-->Bitmap.getBitmap();
|
||||||
|
|
||||||
|
|
||||||
if(%aoMapAsset $= "ToolsModule:unknownImage_image")
|
if(%aoMapAsset $= "ToolsModule:unknownImage_image")
|
||||||
{
|
{
|
||||||
%aoMap = "";
|
%aoMap = "";
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@ $guiContent = new GuiControl(MaterialEditorGui) {
|
||||||
position = "3 24";
|
position = "3 24";
|
||||||
extent = "387 1269";
|
extent = "387 1269";
|
||||||
horizSizing = "width";
|
horizSizing = "width";
|
||||||
|
vertSizing = "height";
|
||||||
profile = "ToolsGuiDefaultProfile";
|
profile = "ToolsGuiDefaultProfile";
|
||||||
tooltipProfile = "GuiToolTipProfile";
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
|
|
||||||
|
|
@ -433,6 +434,7 @@ $guiContent = new GuiControl(MaterialEditorGui) {
|
||||||
extent = "382 793";
|
extent = "382 793";
|
||||||
minExtent = "64 64";
|
minExtent = "64 64";
|
||||||
horizSizing = "width";
|
horizSizing = "width";
|
||||||
|
vertSizing = "height";
|
||||||
profile = "ToolsGuiDefaultProfile";
|
profile = "ToolsGuiDefaultProfile";
|
||||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
isContainer = "0";
|
isContainer = "0";
|
||||||
|
|
|
||||||
|
|
@ -526,7 +526,7 @@ function MaterialEditorGui::prepareActiveObject( %this, %override )
|
||||||
{
|
{
|
||||||
%fieldName = %obj.getField(%i);
|
%fieldName = %obj.getField(%i);
|
||||||
|
|
||||||
if( %obj.getFieldType(%fieldName) !$= "TypeMaterialAssetId" /*&& %obj.getFieldType(%fieldName) !$= "TypeMaterialName"*/)
|
if( %obj.getFieldType(%fieldName) !$= "TypeMaterialAssetId" && %obj.getFieldType(%fieldName) !$= "TypeMaterialAssetPtr")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( !%canSupportMaterial )
|
if( !%canSupportMaterial )
|
||||||
|
|
@ -1022,6 +1022,7 @@ function MaterialEditorGui::guiSync( %this )
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialEditorPropInspector.loadCollapseState();
|
MaterialEditorPropInspector.loadCollapseState();
|
||||||
|
MaterialEditorPropInspector.loadScrollState();
|
||||||
|
|
||||||
cancel(MaterialEditorGui.refreshSchedule);
|
cancel(MaterialEditorGui.refreshSchedule);
|
||||||
|
|
||||||
|
|
@ -1990,12 +1991,15 @@ function MaterialEditorGui::doSwapMaterial(%this, %materialAsset)
|
||||||
|
|
||||||
function MaterialEditorPropInspector::onInspectorFieldModified(%this, %object, %fieldName, %arrayIndex, %oldValue, %newValue)
|
function MaterialEditorPropInspector::onInspectorFieldModified(%this, %object, %fieldName, %arrayIndex, %oldValue, %newValue)
|
||||||
{
|
{
|
||||||
|
MaterialEditorPropInspector.saveScrollState();
|
||||||
|
|
||||||
if(%arrayIndex !$= "" && %arrayIndex !$= "(null)")
|
if(%arrayIndex !$= "" && %arrayIndex !$= "(null)")
|
||||||
MaterialEditorGui.updateActiveMaterial(%fieldName @ "[" @ %arrayIndex @ "]", %newValue);
|
MaterialEditorGui.updateActiveMaterial(%fieldName @ "[" @ %arrayIndex @ "]", %newValue);
|
||||||
else
|
else
|
||||||
MaterialEditorGui.updateActiveMaterial(%fieldName, %newValue);
|
MaterialEditorGui.updateActiveMaterial(%fieldName, %newValue);
|
||||||
|
|
||||||
MaterialEditorGui.refreshSchedule = MaterialEditorGui.schedule(32, "guiSync");
|
cancel(MaterialEditorGui.refreshSchedule);
|
||||||
|
MaterialEditorGui.refreshSchedule = MaterialEditorGui.schedule(256, "guiSync");
|
||||||
}
|
}
|
||||||
|
|
||||||
function MaterialEditorPropInspector::getScrollbar(%this)
|
function MaterialEditorPropInspector::getScrollbar(%this)
|
||||||
|
|
@ -2026,7 +2030,7 @@ function MaterialEditorPropInspector::onPostInspectObject(%this, %obj)
|
||||||
function MaterialEditorPropInspector::saveScrollState(%this)
|
function MaterialEditorPropInspector::saveScrollState(%this)
|
||||||
{
|
{
|
||||||
%this.scrollPos = %this.getScrollbar().getScrollPosition();
|
%this.scrollPos = %this.getScrollbar().getScrollPosition();
|
||||||
//echo(%this.getName() @ "::saveScrollState" SPC %this.scrollPos);
|
echo(%this.getName() @ "::saveScrollState" SPC %this.scrollPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
function MaterialEditorPropInspector::loadScrollState(%this)
|
function MaterialEditorPropInspector::loadScrollState(%this)
|
||||||
|
|
@ -2034,7 +2038,7 @@ function MaterialEditorPropInspector::loadScrollState(%this)
|
||||||
if (%this.scrollPos $= "")
|
if (%this.scrollPos $= "")
|
||||||
return;
|
return;
|
||||||
%this.getScrollbar().setScrollPosition(%this.scrollPos.x, %this.scrollPos.y);
|
%this.getScrollbar().setScrollPosition(%this.scrollPos.x, %this.scrollPos.y);
|
||||||
//echo(%this.getName() @ "::loadScrollState" SPC %this.scrollPos);
|
echo(%this.getName() @ "::loadScrollState" SPC %this.scrollPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ function WorldEditor::onSelect( %this, %obj )
|
||||||
|
|
||||||
// Used to help the Material Editor( the M.E doesn't utilize its own TS control )
|
// Used to help the Material Editor( the M.E doesn't utilize its own TS control )
|
||||||
// so this dirty extension is used to fake it
|
// so this dirty extension is used to fake it
|
||||||
if ( MaterialEditorGui.isVisible() )
|
if ( MaterialEditorGui.isAwake() )
|
||||||
MaterialEditorGui.prepareActiveObject();
|
MaterialEditorGui.prepareActiveObject();
|
||||||
|
|
||||||
// Update the Transform Selection window
|
// Update the Transform Selection window
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue