mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Merge pull request #1682 from Areloch/EmptyTemplateTools
Duplicating changes in the tools folder over to the Empty template
This commit is contained in:
commit
32afa6209b
21 changed files with 1070 additions and 74 deletions
|
|
@ -0,0 +1,45 @@
|
||||||
|
%guiContent = new GuiControl(SuperTooltipDlg) {
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
Profile = "GuiTransparentProfileModeless";
|
||||||
|
class = "SuperTooltip";
|
||||||
|
HorizSizing = "right";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
position = "0 0";
|
||||||
|
Extent = "640 480";
|
||||||
|
MinExtent = "8 2";
|
||||||
|
canSave = "1";
|
||||||
|
Visible = "1";
|
||||||
|
hovertime = "1000";
|
||||||
|
|
||||||
|
new GuiControl(SuperTooltipWindow) {
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
Profile = "EditorTextEditBoldModeless";
|
||||||
|
HorizSizing = "right";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
position = "216 160";
|
||||||
|
Extent = "221 134";
|
||||||
|
MinExtent = "8 2";
|
||||||
|
canSave = "1";
|
||||||
|
Visible = "1";
|
||||||
|
hovertime = "1000";
|
||||||
|
internalName = "tooltipWindow";
|
||||||
|
|
||||||
|
new GuiMLTextCtrl(SuperTooltipMLText) {
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
Profile = "EditorMLTextProfileModeless";
|
||||||
|
HorizSizing = "right";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
position = "5 5";
|
||||||
|
Extent = "210 14";
|
||||||
|
MinExtent = "8 2";
|
||||||
|
canSave = "1";
|
||||||
|
Visible = "1";
|
||||||
|
hovertime = "1000";
|
||||||
|
lineSpacing = "2";
|
||||||
|
allowColorChars = "0";
|
||||||
|
maxChars = "-1";
|
||||||
|
internalName = "tooltipMLText";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
28
Templates/Empty/game/tools/componentEditor/main.cs
Normal file
28
Templates/Empty/game/tools/componentEditor/main.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Copyright (c) 2012 GarageGames, LLC
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
// of this software and associated documentation files (the "Software"), to
|
||||||
|
// deal in the Software without restriction, including without limitation the
|
||||||
|
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
// sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
// furnished to do so, subject to the following conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be included in
|
||||||
|
// all copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
// IN THE SOFTWARE.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
//Scripts
|
||||||
|
exec("./scripts/componentEditor.ed.cs");
|
||||||
|
exec("./scripts/superToolTipDlg.ed.cs");
|
||||||
|
|
||||||
|
//gui
|
||||||
|
exec("./gui/superToolTipDlg.ed.gui");
|
||||||
|
|
@ -0,0 +1,233 @@
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Copyright (c) 2012 GarageGames, LLC
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
// of this software and associated documentation files (the "Software"), to
|
||||||
|
// deal in the Software without restriction, including without limitation the
|
||||||
|
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
// sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
// furnished to do so, subject to the following conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be included in
|
||||||
|
// all copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
// IN THE SOFTWARE.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function GuiInspectorEntityGroup::CreateContent(%this)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
function GuiInspectorEntityGroup::InspectObject( %this, %targetObject )
|
||||||
|
{
|
||||||
|
%this.stack.clear();
|
||||||
|
%this.stack.addGuiControl(%this.createAddComponentList());
|
||||||
|
}
|
||||||
|
|
||||||
|
function GuiInspectorEntityGroup::createAddComponentList(%this)
|
||||||
|
{
|
||||||
|
%extent = %this.getExtent();
|
||||||
|
|
||||||
|
%container = new GuiControl()
|
||||||
|
{
|
||||||
|
Profile = "EditorContainerProfile";
|
||||||
|
HorizSizing = "width";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
Position = "0 0";
|
||||||
|
Extent = %extent.x SPC "25";
|
||||||
|
};
|
||||||
|
|
||||||
|
%componentList = new GuiPopUpMenuCtrlEx(QuickEditComponentList)
|
||||||
|
{
|
||||||
|
Profile = "GuiPopupMenuProfile";
|
||||||
|
HorizSizing = "width";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
position = "28 4";
|
||||||
|
Extent = (%extent.x - 28) SPC "18";
|
||||||
|
hovertime = "100";
|
||||||
|
tooltip = "The component to add to the object";
|
||||||
|
tooltipProfile = "EditorToolTipProfile";
|
||||||
|
};
|
||||||
|
|
||||||
|
%addButton = new GuiIconButtonCtrl() {
|
||||||
|
class = AddComponentQuickEditButton;
|
||||||
|
Profile = "EditorButton";
|
||||||
|
HorizSizing = "right";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
Position = "2 0";
|
||||||
|
Extent = "24 24";
|
||||||
|
buttonMargin = "4 4";
|
||||||
|
iconLocation = "Left";
|
||||||
|
sizeIconToButton = "0";
|
||||||
|
iconBitmap = "tools/gui/images/iconAdd.png";
|
||||||
|
hovertime = "100";
|
||||||
|
tooltip = "Add the selected component to the object";
|
||||||
|
tooltipProfile = "EditorToolTipProfile";
|
||||||
|
componentList = %componentList;
|
||||||
|
};
|
||||||
|
|
||||||
|
%componentList.refresh();
|
||||||
|
|
||||||
|
%container.add(%componentList);
|
||||||
|
%container.add(%addButton);
|
||||||
|
|
||||||
|
if(!isObject("componentTooltipTheme"))
|
||||||
|
{
|
||||||
|
%theme = createsupertooltiptheme("componentTooltipTheme");
|
||||||
|
%theme.addstyle("headerstyle", "<just:left><font:arial bold:16><color:000000>");
|
||||||
|
%theme.addstyle("headertwostyle", "<font:arial bold:14><color:000000>");
|
||||||
|
%theme.addstyle("basictextstyle", "<font:arial:14><color:000000>");
|
||||||
|
%theme.setdefaultstyle("title", "headerstyle");
|
||||||
|
%theme.setdefaultstyle("paramtitle", "headertwostyle");
|
||||||
|
%theme.setdefaultstyle("param", "basictextstyle");
|
||||||
|
%theme.setspacing(3, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
return %container;
|
||||||
|
}
|
||||||
|
|
||||||
|
function QuickEditComponentList::refresh(%this)
|
||||||
|
{
|
||||||
|
%this.clear();
|
||||||
|
|
||||||
|
//find all ComponentAssets
|
||||||
|
%assetQuery = new AssetQuery();
|
||||||
|
if(!AssetDatabase.findAssetType(%assetQuery, "ComponentAsset"))
|
||||||
|
return; //if we didn't find ANY, just exit
|
||||||
|
|
||||||
|
// Find all the types.
|
||||||
|
%count = %assetQuery.getCount();
|
||||||
|
|
||||||
|
%categories = "";
|
||||||
|
for (%i = 0; %i < %count; %i++)
|
||||||
|
{
|
||||||
|
%assetId = %assetQuery.getAsset(%i);
|
||||||
|
|
||||||
|
%componentAsset = AssetDatabase.acquireAsset(%assetId);
|
||||||
|
%componentType = %componentAsset.componentType;
|
||||||
|
if (!isInList(%componentType, %categories))
|
||||||
|
%categories = %categories TAB %componentType;
|
||||||
|
}
|
||||||
|
|
||||||
|
%categories = trim(%categories);
|
||||||
|
|
||||||
|
%index = 0;
|
||||||
|
%categoryCount = getFieldCount(%categories);
|
||||||
|
for (%i = 0; %i < %categoryCount; %i++)
|
||||||
|
{
|
||||||
|
%category = getField(%categories, %i);
|
||||||
|
%this.addCategory(%category);
|
||||||
|
|
||||||
|
for (%j = 0; %j < %count; %j++)
|
||||||
|
{
|
||||||
|
%assetId = %assetQuery.getAsset(%j);
|
||||||
|
|
||||||
|
%componentAsset = AssetDatabase.acquireAsset(%assetId);
|
||||||
|
%componentType = %componentAsset.componentType;
|
||||||
|
%friendlyName = %componentAsset.friendlyName;
|
||||||
|
|
||||||
|
if (%componentType $= %category)
|
||||||
|
{
|
||||||
|
//TODO: Haven't worked out getting categories to look distinct
|
||||||
|
//from entries in the drop-down so for now just indent them for the visual distinction
|
||||||
|
%spacedName = " " @ %friendlyName;
|
||||||
|
%this.add(%spacedName, %index);
|
||||||
|
%this.component[%index] = %componentAsset;
|
||||||
|
%index++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function QuickEditComponentList::onHotTrackItem( %this, %itemID )
|
||||||
|
{
|
||||||
|
%componentObj = %this.component[%itemID];
|
||||||
|
if( isObject( %componentObj ) && %this.componentDesc != %componentObj )
|
||||||
|
{
|
||||||
|
SuperTooltipDlg.init("componentTooltipTheme");
|
||||||
|
SuperTooltipDlg.setTitle(%componentObj.friendlyName);
|
||||||
|
SuperTooltipDlg.addParam("", %componentObj.description @ "\n");
|
||||||
|
|
||||||
|
%fieldCount = %componentObj.getComponentFieldCount();
|
||||||
|
for (%i = 0; %i < %fieldCount; %i++)
|
||||||
|
{
|
||||||
|
%name = getField(%componentObj.getComponentField(%i), 0);
|
||||||
|
|
||||||
|
SuperTooltipDlg.addParam(%name, %description @ "\n");
|
||||||
|
}
|
||||||
|
%position = %this.getGlobalPosition();
|
||||||
|
SuperTooltipDlg.processTooltip( %position,0,1 );
|
||||||
|
%this.opened = true;
|
||||||
|
%this.componentDesc = %componentObj;
|
||||||
|
}
|
||||||
|
else if( !isObject( %componentObj ) )
|
||||||
|
{
|
||||||
|
if( %this.opened == true )
|
||||||
|
SuperTooltipDlg.hide();
|
||||||
|
%this.componentDesc = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function QuickEditComponentList::setProperty(%this, %object)
|
||||||
|
{
|
||||||
|
%this.objectToAdd = %object;
|
||||||
|
}
|
||||||
|
|
||||||
|
function QuickEditComponentList::onSelect(%this)
|
||||||
|
{
|
||||||
|
if( %this.opened == true )
|
||||||
|
SuperTooltipDlg.hide();
|
||||||
|
|
||||||
|
%this.componentToAdd = %this.component[%this.getSelected()];
|
||||||
|
}
|
||||||
|
|
||||||
|
function QuickEditComponentList::onCancel( %this )
|
||||||
|
{
|
||||||
|
if( %this.opened == true )
|
||||||
|
SuperTooltipDlg.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
function AddComponentQuickEditButton::onClick(%this)
|
||||||
|
{
|
||||||
|
%component = %this.componentList.componentToAdd;
|
||||||
|
|
||||||
|
%componentName = %this.componentList.componentToAdd.componentName;
|
||||||
|
%componentClass = %this.componentList.componentToAdd.componentClass;
|
||||||
|
|
||||||
|
%command = "$ComponentEditor::newComponent = new" SPC %componentClass SPC "(){ class = \""
|
||||||
|
@ %componentName @ "\"; };";
|
||||||
|
|
||||||
|
eval(%command);
|
||||||
|
|
||||||
|
%instance = $ComponentEditor::newComponent;
|
||||||
|
%undo = new UndoScriptAction()
|
||||||
|
{
|
||||||
|
actionName = "Added Component";
|
||||||
|
class = UndoAddComponent;
|
||||||
|
object = %this.componentList.objectToAdd;
|
||||||
|
component = %instance;
|
||||||
|
};
|
||||||
|
|
||||||
|
%undo.addToManager(LevelBuilderUndoManager);
|
||||||
|
|
||||||
|
%instance.owner = Inspector.getInspectObject(0);
|
||||||
|
%instance.owner.add(%instance);
|
||||||
|
|
||||||
|
Inspector.schedule( 50, "refresh" );
|
||||||
|
EWorldEditor.isDirty = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function addComponent(%obj, %instance)
|
||||||
|
{
|
||||||
|
echo("Adding the component!");
|
||||||
|
%obj.addComponent(%instance);
|
||||||
|
Inspector.schedule( 50, "refresh" );
|
||||||
|
EWorldEditor.isDirty = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,155 @@
|
||||||
|
function createSuperTooltipTheme(%name)
|
||||||
|
{
|
||||||
|
%theme = new ScriptObject()
|
||||||
|
{
|
||||||
|
class = SuperTooltipTheme;
|
||||||
|
};
|
||||||
|
|
||||||
|
%theme.setName(%name);
|
||||||
|
|
||||||
|
return %theme;
|
||||||
|
}
|
||||||
|
|
||||||
|
function SuperTooltipTheme::addStyle(%this, %name, %style)
|
||||||
|
{
|
||||||
|
%this.styles[%name] = %style;
|
||||||
|
}
|
||||||
|
|
||||||
|
function SuperTooltipTheme::setDefaultStyle(%this, %type, %default)
|
||||||
|
{
|
||||||
|
%this.defaultStyles[%type] = %default;
|
||||||
|
}
|
||||||
|
|
||||||
|
function SuperTooltipTheme::setSpacing(%this, %verticalSpace, %horizontalSpace)
|
||||||
|
{
|
||||||
|
%this.verticalSpace = %verticalSpace;
|
||||||
|
%this.horizontalSpace = %horizontalSpace;
|
||||||
|
}
|
||||||
|
|
||||||
|
function SuperTooltipTheme::getStyle(%this, %name)
|
||||||
|
{
|
||||||
|
return %this.styles[%name];
|
||||||
|
}
|
||||||
|
|
||||||
|
function SuperTooltip::init(%this, %theme)
|
||||||
|
{
|
||||||
|
%this.clearTooltip();
|
||||||
|
|
||||||
|
if(isObject(%theme))
|
||||||
|
%this.setTheme(%theme);
|
||||||
|
}
|
||||||
|
|
||||||
|
function SuperTooltip::clearTooltip(%this)
|
||||||
|
{
|
||||||
|
if(%this.paramCount > 0)
|
||||||
|
{
|
||||||
|
for(%i=0;%i<%this.paramCount;%i++)
|
||||||
|
%this.param[%i] = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
%this.title = "";
|
||||||
|
%this.paramCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function SuperTooltip::processTooltip(%this, %globalPos, %verticalAlign, %horizontalAlign)
|
||||||
|
{
|
||||||
|
if (%verticalAlign $= "")
|
||||||
|
%verticalAlign = 1;
|
||||||
|
if (%horizontalAlign $= "")
|
||||||
|
%horizontalAlign = 0;
|
||||||
|
|
||||||
|
%tooltipWindow = %this.findObjectByInternalName("tooltipWindow");
|
||||||
|
|
||||||
|
if(isObject(%tooltipWindow))
|
||||||
|
%tooltipMLText = %tooltipWindow.findObjectByInternalName("tooltipMLText");
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if(!isObject(%tooltipMLText))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
%verticalSpace = %this.theme.verticalSpace;
|
||||||
|
%horizontalSpace = %this.theme.horizontalSpace;
|
||||||
|
|
||||||
|
if (%verticalAlign == 1)
|
||||||
|
%verticalSpace = -%verticalSpace;
|
||||||
|
if (%horizontalAlign == 1)
|
||||||
|
%horizontalSpace = -%horizontalSpace;
|
||||||
|
|
||||||
|
%text = %this.getFormatedText();
|
||||||
|
%tooltipMLText.setText(%text);
|
||||||
|
|
||||||
|
canvas.pushDialog(%this);
|
||||||
|
|
||||||
|
%tooltipMLText.forceReflow();
|
||||||
|
%MLExtent = %tooltipMLText.extent;
|
||||||
|
%MLHeight = getWord(%MLExtent, 1);
|
||||||
|
|
||||||
|
%tooltipExtent = %tooltipWindow.extent;
|
||||||
|
%tooltipWidth = getWord(%tooltipExtent, 0);
|
||||||
|
%tooltipHeight = %MLHeight;
|
||||||
|
%tooltipWindow.extent = %tooltipWidth SPC %tooltipHeight;
|
||||||
|
|
||||||
|
%globalPosX = getWord(%globalPos, 0);
|
||||||
|
%globalPosY = getWord(%globalPos, 1);
|
||||||
|
|
||||||
|
%tooltipPosX = %globalPosX - (%horizontalAlign * %tooltipWidth) + %horizontalSpace;
|
||||||
|
%tooltipPosY = %globalPosY - (%verticalAlign * %tooltipHeight) + %verticalSpace;
|
||||||
|
|
||||||
|
%tooltipWindow.setPosition(%tooltipPosX, %tooltipPosY);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function SuperTooltip::hide(%this)
|
||||||
|
{
|
||||||
|
canvas.popDialog(%this);
|
||||||
|
|
||||||
|
%this.clearTooltip();
|
||||||
|
}
|
||||||
|
|
||||||
|
function SuperTooltip::setTheme(%this, %theme)
|
||||||
|
{
|
||||||
|
%this.theme = %theme;
|
||||||
|
}
|
||||||
|
|
||||||
|
function SuperTooltip::setTitle(%this, %title, %style)
|
||||||
|
{
|
||||||
|
if(%style !$= "")
|
||||||
|
%themeStyle = %this.theme.styles[%style];
|
||||||
|
else
|
||||||
|
%themeStyle = %this.theme.getStyle(%this.theme.defaultStyles[Title]);
|
||||||
|
|
||||||
|
%this.title = %themeStyle @ %title;
|
||||||
|
}
|
||||||
|
|
||||||
|
function SuperTooltip::addParam(%this, %title, %text, %paramTitleStyle, %paramStyle)
|
||||||
|
{
|
||||||
|
if(%paramTitleStyle !$= "")
|
||||||
|
%themeTitleStyle = %this.theme.styles[%paramTitleStyle];
|
||||||
|
else
|
||||||
|
%themeTitleStyle = %this.theme.getStyle(%this.theme.defaultStyles[ParamTitle]);
|
||||||
|
|
||||||
|
if(%paramStyle !$= "")
|
||||||
|
%themeStyle = %this.theme.styles[%paramStyle];
|
||||||
|
else
|
||||||
|
%themeStyle = %this.theme.getStyle(%this.theme.defaultStyles[Param]);
|
||||||
|
|
||||||
|
if (%title $= "")
|
||||||
|
%this.param[%this.paramCount] = %themeStyle @ %text @ "\n";
|
||||||
|
else
|
||||||
|
%this.param[%this.paramCount] = %themeTitleStyle @ %title @ ": " @ %themeStyle @ %text @ "\n";
|
||||||
|
%this.paramCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
function SuperTooltip::getFormatedText(%this)
|
||||||
|
{
|
||||||
|
%text = %this.title @ "\n\n";
|
||||||
|
|
||||||
|
for(%i=0;%i<%this.paramCount;%i++)
|
||||||
|
{
|
||||||
|
%text = %text @ %this.param[%i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return %text;
|
||||||
|
}
|
||||||
|
|
@ -315,7 +315,7 @@ function DecalEditorGui::updateDecalPreview( %this, %material )
|
||||||
if( isObject( %material ) )
|
if( isObject( %material ) )
|
||||||
DecalPreviewWindow-->decalPreview.setBitmap( MaterialEditorGui.searchForTexture( %material.getId(), %material.diffuseMap[0]) );
|
DecalPreviewWindow-->decalPreview.setBitmap( MaterialEditorGui.searchForTexture( %material.getId(), %material.diffuseMap[0]) );
|
||||||
else
|
else
|
||||||
DecalPreviewWindow-->decalPreview.setBitmap("tools/materialeditor/gui/unknownImage");
|
DecalPreviewWindow-->decalPreview.setBitmap("tools/materialEditor/gui/unknownImage");
|
||||||
}
|
}
|
||||||
|
|
||||||
function DecalEditorGui::updateInstancePreview( %this, %material )
|
function DecalEditorGui::updateInstancePreview( %this, %material )
|
||||||
|
|
@ -323,7 +323,7 @@ function DecalEditorGui::updateInstancePreview( %this, %material )
|
||||||
if( isObject( %material ) )
|
if( isObject( %material ) )
|
||||||
DecalPreviewWindow-->instancePreview.setBitmap( MaterialEditorGui.searchForTexture( %material.getId(), %material.diffuseMap[0]) );
|
DecalPreviewWindow-->instancePreview.setBitmap( MaterialEditorGui.searchForTexture( %material.getId(), %material.diffuseMap[0]) );
|
||||||
else
|
else
|
||||||
DecalPreviewWindow-->instancePreview.setBitmap("tools/materialeditor/gui/unknownImage");
|
DecalPreviewWindow-->instancePreview.setBitmap("tools/materialEditor/gui/unknownImage");
|
||||||
}
|
}
|
||||||
|
|
||||||
function DecalEditorGui::rebuildInstanceTree( %this )
|
function DecalEditorGui::rebuildInstanceTree( %this )
|
||||||
|
|
|
||||||
|
|
@ -365,7 +365,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiTextCtrl(matEd_cubeMapEd_xPosTxt) {
|
new GuiTextCtrl(matEd_cubeMapEd_xPosTxt) {
|
||||||
|
|
@ -408,7 +408,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiTextCtrl(matEd_cubeMapEd_xNegTxt) {
|
new GuiTextCtrl(matEd_cubeMapEd_xNegTxt) {
|
||||||
|
|
@ -451,7 +451,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiTextCtrl(matEd_cubeMapEd_yPosTxt) {
|
new GuiTextCtrl(matEd_cubeMapEd_yPosTxt) {
|
||||||
|
|
@ -494,7 +494,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiTextCtrl(matEd_cubeMapEd_yNegTxt) {
|
new GuiTextCtrl(matEd_cubeMapEd_yNegTxt) {
|
||||||
|
|
@ -537,7 +537,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiTextCtrl(matEd_cubeMapEd_zPosTxt) {
|
new GuiTextCtrl(matEd_cubeMapEd_zPosTxt) {
|
||||||
|
|
@ -580,7 +580,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiTextCtrl(matEd_cubeMapEd_zNegTxt) {
|
new GuiTextCtrl(matEd_cubeMapEd_zNegTxt) {
|
||||||
|
|
|
||||||
|
|
@ -277,7 +277,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiBitmapButtonCtrl() {
|
new GuiBitmapButtonCtrl() {
|
||||||
|
|
@ -429,7 +429,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiTextCtrl() {
|
new GuiTextCtrl() {
|
||||||
|
|
@ -555,7 +555,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiTextCtrl() {
|
new GuiTextCtrl() {
|
||||||
|
|
@ -713,7 +713,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiBitmapButtonCtrl() {
|
new GuiBitmapButtonCtrl() {
|
||||||
|
|
@ -858,7 +858,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiBitmapButtonCtrl() {
|
new GuiBitmapButtonCtrl() {
|
||||||
|
|
@ -1003,7 +1003,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiBitmapButtonCtrl() {
|
new GuiBitmapButtonCtrl() {
|
||||||
|
|
@ -1129,7 +1129,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiTextCtrl() {
|
new GuiTextCtrl() {
|
||||||
|
|
@ -1255,7 +1255,7 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiTextCtrl() {
|
new GuiTextCtrl() {
|
||||||
|
|
@ -2240,6 +2240,29 @@
|
||||||
useMouseEvents = "0";
|
useMouseEvents = "0";
|
||||||
useInactiveState = "0";
|
useInactiveState = "0";
|
||||||
};
|
};
|
||||||
|
new GuiCheckBoxCtrl() {
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
internalName = "subSurfaceCheckbox";
|
||||||
|
Enabled = "1";
|
||||||
|
isContainer = "0";
|
||||||
|
Profile = "ToolsGuiCheckBoxProfile";
|
||||||
|
HorizSizing = "right";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
position = "8 46";
|
||||||
|
Extent = "79 16";
|
||||||
|
MinExtent = "8 2";
|
||||||
|
canSave = "1";
|
||||||
|
Visible = "1";
|
||||||
|
Command = "MaterialEditorGui.updateActiveMaterial(\"subSurface[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());";
|
||||||
|
tooltipprofile = "ToolsGuiDefaultProfile";
|
||||||
|
ToolTip = "Enables the use of subsurface scattering for this layer.";
|
||||||
|
hovertime = "1000";
|
||||||
|
text = "Sub Surface";
|
||||||
|
groupNum = "-1";
|
||||||
|
buttonType = "ToggleButton";
|
||||||
|
useMouseEvents = "0";
|
||||||
|
useInactiveState = "0";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,12 @@ function MaterialEditorGui::establishMaterials(%this)
|
||||||
//Cubemap used to preview other cubemaps in the editor.
|
//Cubemap used to preview other cubemaps in the editor.
|
||||||
singleton CubemapData( matEdCubeMapPreviewMat )
|
singleton CubemapData( matEdCubeMapPreviewMat )
|
||||||
{
|
{
|
||||||
cubeFace[0] = "tools/materialeditor/gui/cube_xNeg";
|
cubeFace[0] = "tools/materialEditor/gui/cube_xNeg";
|
||||||
cubeFace[1] = "tools/materialeditor/gui/cube_xPos";
|
cubeFace[1] = "tools/materialEditor/gui/cube_xPos";
|
||||||
cubeFace[2] = "tools/materialeditor/gui/cube_ZNeg";
|
cubeFace[2] = "tools/materialEditor/gui/cube_ZNeg";
|
||||||
cubeFace[3] = "tools/materialeditor/gui/cube_ZPos";
|
cubeFace[3] = "tools/materialEditor/gui/cube_ZPos";
|
||||||
cubeFace[4] = "tools/materialeditor/gui/cube_YNeg";
|
cubeFace[4] = "tools/materialEditor/gui/cube_YNeg";
|
||||||
cubeFace[5] = "tools/materialeditor/gui/cube_YPos";
|
cubeFace[5] = "tools/materialEditor/gui/cube_YPos";
|
||||||
parentGroup = "RootGroup";
|
parentGroup = "RootGroup";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ function MaterialEditorGui::establishMaterials(%this)
|
||||||
singleton Material(materialEd_previewMaterial)
|
singleton Material(materialEd_previewMaterial)
|
||||||
{
|
{
|
||||||
mapTo = "matEd_mappedMat";
|
mapTo = "matEd_mappedMat";
|
||||||
diffuseMap[0] = "tools/materialeditor/gui/matEd_mappedMat";
|
diffuseMap[0] = "tools/materialEditor/gui/matEd_mappedMat";
|
||||||
};
|
};
|
||||||
|
|
||||||
singleton CustomMaterial( materialEd_justAlphaMaterial )
|
singleton CustomMaterial( materialEd_justAlphaMaterial )
|
||||||
|
|
@ -371,32 +371,32 @@ function MaterialEditorGui::updatePreviewObject(%this)
|
||||||
{
|
{
|
||||||
case "sphere":
|
case "sphere":
|
||||||
matEd_quickPreview_Popup.selected = %newModel;
|
matEd_quickPreview_Popup.selected = %newModel;
|
||||||
matEd_previewObjectView.setModel("tools/materialeditor/gui/spherePreview.dts");
|
matEd_previewObjectView.setModel("tools/materialEditor/gui/spherePreview.dts");
|
||||||
matEd_previewObjectView.setOrbitDistance(4);
|
matEd_previewObjectView.setOrbitDistance(4);
|
||||||
|
|
||||||
case "cube":
|
case "cube":
|
||||||
matEd_quickPreview_Popup.selected = %newModel;
|
matEd_quickPreview_Popup.selected = %newModel;
|
||||||
matEd_previewObjectView.setModel("tools/materialeditor/gui/cubePreview.dts");
|
matEd_previewObjectView.setModel("tools/materialEditor/gui/cubePreview.dts");
|
||||||
matEd_previewObjectView.setOrbitDistance(5);
|
matEd_previewObjectView.setOrbitDistance(5);
|
||||||
|
|
||||||
case "pyramid":
|
case "pyramid":
|
||||||
matEd_quickPreview_Popup.selected = %newModel;
|
matEd_quickPreview_Popup.selected = %newModel;
|
||||||
matEd_previewObjectView.setModel("tools/materialeditor/gui/pyramidPreview.dts");
|
matEd_previewObjectView.setModel("tools/materialEditor/gui/pyramidPreview.dts");
|
||||||
matEd_previewObjectView.setOrbitDistance(5);
|
matEd_previewObjectView.setOrbitDistance(5);
|
||||||
|
|
||||||
case "cylinder":
|
case "cylinder":
|
||||||
matEd_quickPreview_Popup.selected = %newModel;
|
matEd_quickPreview_Popup.selected = %newModel;
|
||||||
matEd_previewObjectView.setModel("tools/materialeditor/gui/cylinderPreview.dts");
|
matEd_previewObjectView.setModel("tools/materialEditor/gui/cylinderPreview.dts");
|
||||||
matEd_previewObjectView.setOrbitDistance(4.2);
|
matEd_previewObjectView.setOrbitDistance(4.2);
|
||||||
|
|
||||||
case "torus":
|
case "torus":
|
||||||
matEd_quickPreview_Popup.selected = %newModel;
|
matEd_quickPreview_Popup.selected = %newModel;
|
||||||
matEd_previewObjectView.setModel("tools/materialeditor/gui/torusPreview.dts");
|
matEd_previewObjectView.setModel("tools/materialEditor/gui/torusPreview.dts");
|
||||||
matEd_previewObjectView.setOrbitDistance(4.2);
|
matEd_previewObjectView.setOrbitDistance(4.2);
|
||||||
|
|
||||||
case "knot":
|
case "knot":
|
||||||
matEd_quickPreview_Popup.selected = %newModel;
|
matEd_quickPreview_Popup.selected = %newModel;
|
||||||
matEd_previewObjectView.setModel("tools/materialeditor/gui/torusknotPreview.dts");
|
matEd_previewObjectView.setModel("tools/materialEditor/gui/torusknotPreview.dts");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -802,7 +802,7 @@ function MaterialEditorGui::guiSync( %this, %material )
|
||||||
if((%material).diffuseMap[%layer] $= "")
|
if((%material).diffuseMap[%layer] $= "")
|
||||||
{
|
{
|
||||||
MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( "None" );
|
MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( "None" );
|
||||||
MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -813,7 +813,7 @@ function MaterialEditorGui::guiSync( %this, %material )
|
||||||
if((%material).normalMap[%layer] $= "")
|
if((%material).normalMap[%layer] $= "")
|
||||||
{
|
{
|
||||||
MaterialEditorPropertiesWindow-->normalMapNameText.setText( "None" );
|
MaterialEditorPropertiesWindow-->normalMapNameText.setText( "None" );
|
||||||
MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -824,7 +824,7 @@ function MaterialEditorGui::guiSync( %this, %material )
|
||||||
if((%material).overlayMap[%layer] $= "")
|
if((%material).overlayMap[%layer] $= "")
|
||||||
{
|
{
|
||||||
MaterialEditorPropertiesWindow-->overlayMapNameText.setText( "None" );
|
MaterialEditorPropertiesWindow-->overlayMapNameText.setText( "None" );
|
||||||
MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -835,7 +835,7 @@ function MaterialEditorGui::guiSync( %this, %material )
|
||||||
if((%material).detailMap[%layer] $= "")
|
if((%material).detailMap[%layer] $= "")
|
||||||
{
|
{
|
||||||
MaterialEditorPropertiesWindow-->detailMapNameText.setText( "None" );
|
MaterialEditorPropertiesWindow-->detailMapNameText.setText( "None" );
|
||||||
MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -846,7 +846,7 @@ function MaterialEditorGui::guiSync( %this, %material )
|
||||||
if((%material).detailNormalMap[%layer] $= "")
|
if((%material).detailNormalMap[%layer] $= "")
|
||||||
{
|
{
|
||||||
MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( "None" );
|
MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( "None" );
|
||||||
MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -857,7 +857,7 @@ function MaterialEditorGui::guiSync( %this, %material )
|
||||||
if((%material).lightMap[%layer] $= "")
|
if((%material).lightMap[%layer] $= "")
|
||||||
{
|
{
|
||||||
MaterialEditorPropertiesWindow-->lightMapNameText.setText( "None" );
|
MaterialEditorPropertiesWindow-->lightMapNameText.setText( "None" );
|
||||||
MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -868,7 +868,7 @@ function MaterialEditorGui::guiSync( %this, %material )
|
||||||
if((%material).toneMap[%layer] $= "")
|
if((%material).toneMap[%layer] $= "")
|
||||||
{
|
{
|
||||||
MaterialEditorPropertiesWindow-->toneMapNameText.setText( "None" );
|
MaterialEditorPropertiesWindow-->toneMapNameText.setText( "None" );
|
||||||
MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -879,7 +879,7 @@ function MaterialEditorGui::guiSync( %this, %material )
|
||||||
if((%material).specularMap[%layer] $= "")
|
if((%material).specularMap[%layer] $= "")
|
||||||
{
|
{
|
||||||
MaterialEditorPropertiesWindow-->specMapNameText.setText( "None" );
|
MaterialEditorPropertiesWindow-->specMapNameText.setText( "None" );
|
||||||
MaterialEditorPropertiesWindow-->specMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
MaterialEditorPropertiesWindow-->specMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1141,7 +1141,7 @@ function MaterialEditorGui::updateTextureMap( %this, %type, %action )
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%textCtrl.setText("None");
|
%textCtrl.setText("None");
|
||||||
%bitmapCtrl.setBitmap("tools/materialeditor/gui/unknownImage");
|
%bitmapCtrl.setBitmap("tools/materialEditor/gui/unknownImage");
|
||||||
MaterialEditorGui.updateActiveMaterial(%type @ "Map[" @ %layer @ "]","");
|
MaterialEditorGui.updateActiveMaterial(%type @ "Map[" @ %layer @ "]","");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1185,7 +1185,7 @@ function MaterialEditorGui::updateSpecMap(%this,%action)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MaterialEditorPropertiesWindow-->specMapNameText.setText("None");
|
MaterialEditorPropertiesWindow-->specMapNameText.setText("None");
|
||||||
MaterialEditorPropertiesWindow-->specMapDisplayBitmap.setBitmap("tools/materialeditor/gui/unknownImage");
|
MaterialEditorPropertiesWindow-->specMapDisplayBitmap.setBitmap("tools/materialEditor/gui/unknownImage");
|
||||||
MaterialEditorGui.updateActiveMaterial("specularMap[" @ %layer @ "]","");
|
MaterialEditorGui.updateActiveMaterial("specularMap[" @ %layer @ "]","");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1604,12 +1604,12 @@ function MaterialEditorGui::createNewCubemap( %this, %cubemap )
|
||||||
|
|
||||||
new CubemapData(%cubemap)
|
new CubemapData(%cubemap)
|
||||||
{
|
{
|
||||||
cubeFace[0] = "tools/materialeditor/gui/cube_xNeg";
|
cubeFace[0] = "tools/materialEditor/gui/cube_xNeg";
|
||||||
cubeFace[1] = "tools/materialeditor/gui/cube_xPos";
|
cubeFace[1] = "tools/materialEditor/gui/cube_xPos";
|
||||||
cubeFace[2] = "tools/materialeditor/gui/cube_ZNeg";
|
cubeFace[2] = "tools/materialEditor/gui/cube_ZNeg";
|
||||||
cubeFace[3] = "tools/materialeditor/gui/cube_ZPos";
|
cubeFace[3] = "tools/materialEditor/gui/cube_ZPos";
|
||||||
cubeFace[4] = "tools/materialeditor/gui/cube_YNeg";
|
cubeFace[4] = "tools/materialEditor/gui/cube_YNeg";
|
||||||
cubeFace[5] = "tools/materialeditor/gui/cube_YPos";
|
cubeFace[5] = "tools/materialEditor/gui/cube_YPos";
|
||||||
|
|
||||||
parentGroup = RootGroup;
|
parentGroup = RootGroup;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1862,7 +1862,7 @@ $PE_guielement_ext_colorpicker = "18 18";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiTextCtrl() {
|
new GuiTextCtrl() {
|
||||||
|
|
@ -2343,6 +2343,52 @@ $PE_guielement_ext_colorpicker = "18 18";
|
||||||
Extent = $PE_guielement_ext_value;
|
Extent = $PE_guielement_ext_value;
|
||||||
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"dragCoefficient\", $ThisControl.getText());";
|
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"dragCoefficient\", $ThisControl.getText());";
|
||||||
};
|
};
|
||||||
|
}; //End Particle Drag
|
||||||
|
new GuiControl(){ // Particle Wind
|
||||||
|
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 = "Wind Coeff";
|
||||||
|
};
|
||||||
|
new GuiSliderCtrl(PEP_windCoefficient) {
|
||||||
|
internalName = "PEP_windCoefficient_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_ParticleEditor.updateParticle( \"windCoefficient\", $ThisControl.getValue(), true, true );";
|
||||||
|
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"windCoefficient\", $ThisControl.getValue(), true, false );";
|
||||||
|
hovertime = "1000";
|
||||||
|
range = "0 1";
|
||||||
|
ticks = "0";
|
||||||
|
value = "0.298143";
|
||||||
|
};
|
||||||
|
new GuiTextEditCtrl() {
|
||||||
|
internalName = "PEP_windCoefficient_textEdit";
|
||||||
|
Profile = "ToolsGuiTextEditProfile";
|
||||||
|
HorizSizing = "left";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
position = $PE_guielement_pos_value;
|
||||||
|
Extent = $PE_guielement_ext_value;
|
||||||
|
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"windCoefficient\", $ThisControl.getText());";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}; // end stack
|
}; // end stack
|
||||||
}; // end "motion" rollout
|
}; // end "motion" rollout
|
||||||
|
|
@ -2548,6 +2594,151 @@ $PE_guielement_ext_colorpicker = "18 18";
|
||||||
};
|
};
|
||||||
}; // end stack
|
}; // end stack
|
||||||
}; // end "Spin" rollout
|
}; // end "Spin" rollout
|
||||||
|
new GuiRolloutCtrl() {
|
||||||
|
class = "BehaviorQuickEditRollout";
|
||||||
|
superclass = LBQuickEditRollout;
|
||||||
|
Profile = "GuiRolloutProfile";
|
||||||
|
HorizSizing = "width";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
Position = "0 0";
|
||||||
|
Extent = "197 0";
|
||||||
|
Caption = "Animation";
|
||||||
|
Margin = "4 4 4 0";
|
||||||
|
DragSizable = false;
|
||||||
|
container = true;
|
||||||
|
parentRollout = %this.rollout;
|
||||||
|
object = %behavior;
|
||||||
|
|
||||||
|
new GuiStackControl() {
|
||||||
|
StackingType = "Vertical";
|
||||||
|
HorizStacking = "Left to Right";
|
||||||
|
VertStacking = "Top to Bottom";
|
||||||
|
Padding = "0";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
Enabled = "1";
|
||||||
|
isContainer = "1";
|
||||||
|
Profile = "ToolsGuiDefaultProfile";
|
||||||
|
HorizSizing = "width";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
Position = "1 3";
|
||||||
|
Extent = "197 16";
|
||||||
|
MinExtent = "16 16";
|
||||||
|
canSave = "1";
|
||||||
|
isDecoy = "0";
|
||||||
|
Visible = "1";
|
||||||
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
|
||||||
|
new GuiCheckBoxCtrl() {
|
||||||
|
internalName = "PEP_animateTexture";
|
||||||
|
HorizSizing = "width";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
position = "55 14";
|
||||||
|
Extent = "84 18";
|
||||||
|
MinExtent = "8 2";
|
||||||
|
text = "Animate Texture";
|
||||||
|
command = "PE_ParticleEditor.updateParticle( \"animateTexture\", $ThisControl.getValue());";
|
||||||
|
};
|
||||||
|
new GuiControl(){ // Particle framesPerSec
|
||||||
|
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 = "framesPerSec";
|
||||||
|
};
|
||||||
|
new GuiSliderCtrl(PEP_framesPerSec) {
|
||||||
|
internalName = "PEP_framesPerSec_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";
|
||||||
|
hovertime = "1000";
|
||||||
|
range = "0 60";
|
||||||
|
ticks = "0";
|
||||||
|
value = "0";
|
||||||
|
Command = "PE_ParticleEditor.updateParticle( \"framesPerSec\", $ThisControl.getValue(), true, true );";
|
||||||
|
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"framesPerSec\", $ThisControl.getValue(), true, false );";
|
||||||
|
};
|
||||||
|
new GuiTextEditCtrl() {
|
||||||
|
internalName = "PEP_framesPerSec_textEdit";
|
||||||
|
Profile = "ToolsGuiTextEditProfile";
|
||||||
|
HorizSizing = "left";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
position = $PE_guielement_pos_value;
|
||||||
|
Extent = $PE_guielement_ext_value;
|
||||||
|
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"framesPerSec\", $ThisControl.getText());";
|
||||||
|
};
|
||||||
|
}; // end framesPerSec
|
||||||
|
new GuiControl(){ // Particle animTexFramesList
|
||||||
|
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 = "animTexFrames";
|
||||||
|
};
|
||||||
|
new GuiTextEditCtrl() {
|
||||||
|
internalName = "PEP_animTexFramesList_textEdit";
|
||||||
|
Profile = "ToolsGuiTextEditProfile";
|
||||||
|
HorizSizing = "left";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
position = $PE_guielement_pos_textedit;
|
||||||
|
Extent = $PE_guielement_ext_textedit;
|
||||||
|
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"animTexFrames\", $ThisControl.getText());";
|
||||||
|
};
|
||||||
|
}; // end animTexFramesList
|
||||||
|
new GuiControl(){ // Particle animTileCount
|
||||||
|
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 = "TileCount (X Y)";
|
||||||
|
};
|
||||||
|
new GuiTextEditCtrl() {
|
||||||
|
internalName = "PEP_animTileCount_textEdit";
|
||||||
|
Profile = "ToolsGuiTextEditProfile";
|
||||||
|
HorizSizing = "left";
|
||||||
|
VertSizing = "bottom";
|
||||||
|
position = $PE_guielement_pos_value;
|
||||||
|
Extent = $PE_guielement_ext_value;
|
||||||
|
altCommand = "$ThisControl.getParent().updateFromChild($ThisControl); PE_ParticleEditor.updateParticle( \"animTexTiling\", $ThisControl.getText());";
|
||||||
|
};
|
||||||
|
}; // end animTileCount
|
||||||
|
}; // end stack
|
||||||
|
}; // end "Anim" rollout
|
||||||
new GuiRolloutCtrl() {
|
new GuiRolloutCtrl() {
|
||||||
class = "BehaviorQuickEditRollout";
|
class = "BehaviorQuickEditRollout";
|
||||||
superclass = LBQuickEditRollout;
|
superclass = LBQuickEditRollout;
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,9 @@ function PE_ParticleEditor::guiSync( %this )
|
||||||
PE_ParticleEditor-->PEP_dragCoefficient_slider.setValue( %data.dragCoefficient );
|
PE_ParticleEditor-->PEP_dragCoefficient_slider.setValue( %data.dragCoefficient );
|
||||||
PE_ParticleEditor-->PEP_dragCoefficient_textEdit.setText( %data.dragCoefficient );
|
PE_ParticleEditor-->PEP_dragCoefficient_textEdit.setText( %data.dragCoefficient );
|
||||||
|
|
||||||
|
PE_ParticleEditor-->PEP_windCoefficient_slider.setValue( %data.windCoefficient );
|
||||||
|
PE_ParticleEditor-->PEP_windCoefficient_textEdit.setText( %data.windCoefficient );
|
||||||
|
|
||||||
PE_ParticleEditor-->PEP_spinRandomMin_slider.setValue( %data.spinRandomMin );
|
PE_ParticleEditor-->PEP_spinRandomMin_slider.setValue( %data.spinRandomMin );
|
||||||
PE_ParticleEditor-->PEP_spinRandomMin_textEdit.setText( %data.spinRandomMin );
|
PE_ParticleEditor-->PEP_spinRandomMin_textEdit.setText( %data.spinRandomMin );
|
||||||
|
|
||||||
|
|
@ -131,6 +134,17 @@ function PE_ParticleEditor::guiSync( %this )
|
||||||
|
|
||||||
PE_ParticleEditor-->PEP_pointTime_slider3.setValue( %data.times[ 3 ] );
|
PE_ParticleEditor-->PEP_pointTime_slider3.setValue( %data.times[ 3 ] );
|
||||||
PE_ParticleEditor-->PEP_pointTime_textEdit3.setText( %data.times[ 3 ] );
|
PE_ParticleEditor-->PEP_pointTime_textEdit3.setText( %data.times[ 3 ] );
|
||||||
|
|
||||||
|
//particle animation
|
||||||
|
PE_ParticleEditor-->PEP_animateTexture.setValue( %data.animateTexture );
|
||||||
|
|
||||||
|
PE_ParticleEditor-->PEP_framesPerSec_slider.setValue( %data.framesPerSec );
|
||||||
|
PE_ParticleEditor-->PEP_framesPerSec_textEdit.setText( %data.framesPerSec );
|
||||||
|
|
||||||
|
PE_ParticleEditor-->PEP_animTexFramesList_textEdit.setText( %data.animTexFrames );
|
||||||
|
|
||||||
|
PE_ParticleEditor-->PEP_animTileCount_textEdit.setText( %data.animTexTiling );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,77 @@
|
||||||
editorSettingsWrite = "EditorGui.writeWorldEditorSettings();";
|
editorSettingsWrite = "EditorGui.writeWorldEditorSettings();";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
new GuiControl() {
|
||||||
|
position = "0 0";
|
||||||
|
extent = "430 18";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "ToolsGuiDefaultProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "1";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
|
||||||
|
new GuiTextCtrl() {
|
||||||
|
text = "New Game Objects";
|
||||||
|
maxLength = "1024";
|
||||||
|
margin = "0 0 0 0";
|
||||||
|
padding = "0 0 0 0";
|
||||||
|
anchorTop = "1";
|
||||||
|
anchorBottom = "0";
|
||||||
|
anchorLeft = "1";
|
||||||
|
anchorRight = "0";
|
||||||
|
position = "5 1";
|
||||||
|
extent = "70 16";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "ToolsGuiTextRightProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "0";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
};
|
||||||
|
new GuiTextEditCtrl() {
|
||||||
|
historySize = "0";
|
||||||
|
tabComplete = "0";
|
||||||
|
sinkAllKeyEvents = "0";
|
||||||
|
password = "0";
|
||||||
|
passwordMask = "*";
|
||||||
|
text = "scripts/server/gameObjects";
|
||||||
|
maxLength = "1024";
|
||||||
|
margin = "0 0 0 0";
|
||||||
|
padding = "0 0 0 0";
|
||||||
|
anchorTop = "1";
|
||||||
|
anchorBottom = "0";
|
||||||
|
anchorLeft = "1";
|
||||||
|
anchorRight = "0";
|
||||||
|
position = "81 0";
|
||||||
|
extent = "345 17";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "width";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "ToolsGuiTextEditProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "0";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "1";
|
||||||
|
class = "ESettingsWindowTextEdit";
|
||||||
|
editorSettingsRead = "EditorGui.readWorldEditorSettings();";
|
||||||
|
editorSettingsValue = "WorldEditor/newGameObjectDir";
|
||||||
|
editorSettingsWrite = "EditorGui.writeWorldEditorSettings();";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -402,3 +402,4 @@ function generateProceduralTerrainMask()
|
||||||
Canvas.popDialog(ProceduralTerrainPainterGui);
|
Canvas.popDialog(ProceduralTerrainPainterGui);
|
||||||
ETerrainEditor.autoMaterialLayer($TPPHeightMin, $TPPHeightMax, $TPPSlopeMin, $TPPSlopeMax, $TPPCoverage);
|
ETerrainEditor.autoMaterialLayer($TPPHeightMin, $TPPHeightMax, $TPPSlopeMin, $TPPSlopeMax, $TPPCoverage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
bitmap= "tools/materialeditor/gui/unknownImage";
|
bitmap= "tools/materialEditor/gui/unknownImage";
|
||||||
};
|
};
|
||||||
new GuiBitmapCtrl(ETerrainMaterialSelectedBorder) {
|
new GuiBitmapCtrl(ETerrainMaterialSelectedBorder) {
|
||||||
canSaveDynamicFields = "0";
|
canSaveDynamicFields = "0";
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
ToolTip = "Paint (5)";
|
ToolTip = "Paint (5)";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/foresteditor/images/paint-forest-btn";
|
bitmap = "tools/forestEditor/images/paint-forest-btn";
|
||||||
buttonType = "RadioButton";
|
buttonType = "RadioButton";
|
||||||
useMouseEvents = "0";
|
useMouseEvents = "0";
|
||||||
};
|
};
|
||||||
|
|
@ -134,7 +134,7 @@
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
ToolTip = "Erase (6)";
|
ToolTip = "Erase (6)";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/foresteditor/images/erase-all-btn";
|
bitmap = "tools/forestEditor/images/erase-all-btn";
|
||||||
buttonType = "RadioButton";
|
buttonType = "RadioButton";
|
||||||
useMouseEvents = "0";
|
useMouseEvents = "0";
|
||||||
};
|
};
|
||||||
|
|
@ -156,7 +156,7 @@
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
ToolTip = "Erase Selected (7)";
|
ToolTip = "Erase Selected (7)";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/foresteditor/images/erase-element-btn";
|
bitmap = "tools/forestEditor/images/erase-element-btn";
|
||||||
buttonType = "RadioButton";
|
buttonType = "RadioButton";
|
||||||
useMouseEvents = "0";
|
useMouseEvents = "0";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiBitmapButtonCtrl() {
|
new GuiBitmapButtonCtrl() {
|
||||||
|
|
@ -358,7 +358,7 @@
|
||||||
MinExtent = "8 2";
|
MinExtent = "8 2";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
Command = "TerrainMaterialDlg-->baseTexCtrl.setBitmap(\"tools/materialeditor/gui/unknownImage\");";
|
Command = "TerrainMaterialDlg-->baseTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
groupNum = "-1";
|
groupNum = "-1";
|
||||||
|
|
@ -466,7 +466,7 @@
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiTextCtrl() {
|
new GuiTextCtrl() {
|
||||||
|
|
@ -563,7 +563,7 @@
|
||||||
MinExtent = "8 2";
|
MinExtent = "8 2";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
Command = "TerrainMaterialDlg-->normTexCtrl.setBitmap(\"tools/materialeditor/gui/unknownImage\");";
|
Command = "TerrainMaterialDlg-->normTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
groupNum = "-1";
|
groupNum = "-1";
|
||||||
|
|
@ -662,7 +662,7 @@
|
||||||
canSaveDynamicFields = "0";
|
canSaveDynamicFields = "0";
|
||||||
|
|
||||||
new GuiBitmapCtrl() {
|
new GuiBitmapCtrl() {
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
position = "1 1";
|
position = "1 1";
|
||||||
extent = "47 47";
|
extent = "47 47";
|
||||||
|
|
@ -787,7 +787,7 @@
|
||||||
profile = "ToolsGuiDefaultProfile";
|
profile = "ToolsGuiDefaultProfile";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
active = "1";
|
active = "1";
|
||||||
command = "TerrainMaterialDlg-->macroTexCtrl.setBitmap(\"tools/materialeditor/gui/unknownImage\");";
|
command = "TerrainMaterialDlg-->macroTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
|
||||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
isContainer = "0";
|
isContainer = "0";
|
||||||
|
|
@ -999,7 +999,7 @@
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
bitmap = "tools/materialeditor/gui/unknownImage";
|
bitmap = "tools/materialEditor/gui/unknownImage";
|
||||||
wrap = "0";
|
wrap = "0";
|
||||||
};
|
};
|
||||||
new GuiBitmapButtonCtrl() {
|
new GuiBitmapButtonCtrl() {
|
||||||
|
|
@ -1096,7 +1096,7 @@
|
||||||
MinExtent = "8 2";
|
MinExtent = "8 2";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
Command = "TerrainMaterialDlg-->detailTexCtrl.setBitmap(\"tools/materialeditor/gui/unknownImage\");";
|
Command = "TerrainMaterialDlg-->detailTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
groupNum = "-1";
|
groupNum = "-1";
|
||||||
|
|
|
||||||
|
|
@ -1619,7 +1619,7 @@ function EditorTree::onRightMouseUp( %this, %itemId, %mouse, %obj )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open context menu if this is a SimGroup
|
// Open context menu if this is a SimGroup
|
||||||
else if( %obj.isMemberOfClass( "SimGroup" ) )
|
else if( !%obj.isMemberOfClass( "SceneObject" ) )
|
||||||
{
|
{
|
||||||
%popup = ETSimGroupContextPopup;
|
%popup = ETSimGroupContextPopup;
|
||||||
if( !isObject( %popup ) )
|
if( !isObject( %popup ) )
|
||||||
|
|
@ -1675,9 +1675,23 @@ function EditorTree::onRightMouseUp( %this, %itemId, %mouse, %obj )
|
||||||
|
|
||||||
object = -1;
|
object = -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(%obj.isMemberOfClass("Entity"))
|
||||||
|
{
|
||||||
|
%popup = ETEntityContextPopup;
|
||||||
|
if( !isObject( %popup ) )
|
||||||
|
%popup = new PopupMenu( ETEntityContextPopup : ETSimGroupContextPopup )
|
||||||
|
{
|
||||||
|
superClass = "MenuBuilder";
|
||||||
|
isPopup = "1";
|
||||||
|
|
||||||
|
item[ 12 ] = "-";
|
||||||
|
item[ 13 ] = "Convert to Game Object" TAB "" TAB "EWorldEditor.createGameObject( %this.object );";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Specialized version for ConvexShapes.
|
// Specialized version for ConvexShapes.
|
||||||
if( %obj.isMemberOfClass( "ConvexShape" ) )
|
else if( %obj.isMemberOfClass( "ConvexShape" ) )
|
||||||
{
|
{
|
||||||
%popup = ETConvexShapeContextPopup;
|
%popup = ETConvexShapeContextPopup;
|
||||||
if( !isObject( %popup ) )
|
if( !isObject( %popup ) )
|
||||||
|
|
@ -2204,6 +2218,155 @@ function EWorldEditor::deleteMissionObject( %this, %object )
|
||||||
EditorTree.buildVisibleTree( true );
|
EditorTree.buildVisibleTree( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function EWorldEditor::createGameObject( %this, %entity )
|
||||||
|
{
|
||||||
|
if(!isObject(GameObjectBuilder))
|
||||||
|
{
|
||||||
|
new GuiControl(GameObjectBuilder, EditorGuiGroup) {
|
||||||
|
profile = "ToolsGuiDefaultProfile";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
position = "0 0";
|
||||||
|
extent = "800 600";
|
||||||
|
minExtent = "8 8";
|
||||||
|
visible = "1";
|
||||||
|
setFirstResponder = "0";
|
||||||
|
modal = "1";
|
||||||
|
helpTag = "0";
|
||||||
|
|
||||||
|
new GuiWindowCtrl(GameObjectBuilderTargetWindow) {
|
||||||
|
profile = "ToolsGuiWindowProfile";
|
||||||
|
horizSizing = "center";
|
||||||
|
vertSizing = "center";
|
||||||
|
position = "384 205";
|
||||||
|
extent = "256 102";
|
||||||
|
minExtent = "256 8";
|
||||||
|
visible = "1";
|
||||||
|
setFirstResponder = "0";
|
||||||
|
modal = "1";
|
||||||
|
helpTag = "0";
|
||||||
|
resizeWidth = "1";
|
||||||
|
resizeHeight = "1";
|
||||||
|
canMove = "1";
|
||||||
|
canClose = "0";
|
||||||
|
canMinimize = "0";
|
||||||
|
canMaximize = "0";
|
||||||
|
minSize = "50 50";
|
||||||
|
text = "Create Object";
|
||||||
|
|
||||||
|
new GuiTextCtrl() {
|
||||||
|
profile = "GuiCenterTextProfile";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
position = "9 26";
|
||||||
|
extent = "84 16";
|
||||||
|
minExtent = "8 8";
|
||||||
|
visible = "1";
|
||||||
|
setFirstResponder = "0";
|
||||||
|
modal = "1";
|
||||||
|
helpTag = "0";
|
||||||
|
text = "Object Name:";
|
||||||
|
};
|
||||||
|
new GuiTextEditCtrl(GameObjectBuilderObjectName) {
|
||||||
|
class = ObjectBuilderGuiTextEditCtrl;
|
||||||
|
profile = "ToolsGuiTextEditProfile";
|
||||||
|
horizSizing = "width";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
position = "78 26";
|
||||||
|
extent = "172 18";
|
||||||
|
minExtent = "8 8";
|
||||||
|
visible = "1";
|
||||||
|
setFirstResponder = "0";
|
||||||
|
modal = "1";
|
||||||
|
helpTag = "0";
|
||||||
|
historySize = "0";
|
||||||
|
};
|
||||||
|
new GuiButtonCtrl(GameObjectBuilderOKButton) {
|
||||||
|
profile = "ToolsGuiButtonProfile";
|
||||||
|
horizSizing = "width";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
position = "7 250";
|
||||||
|
extent = "156 24";
|
||||||
|
minExtent = "8 8";
|
||||||
|
visible = "1";
|
||||||
|
setFirstResponder = "0";
|
||||||
|
modal = "1";
|
||||||
|
command = "EWorldEditor.buildGameObject();";
|
||||||
|
helpTag = "0";
|
||||||
|
text = "Create New";
|
||||||
|
Accelerator = "return";
|
||||||
|
};
|
||||||
|
new GuiButtonCtrl(GameObjectBuilderCancelButton) {
|
||||||
|
profile = "ToolsGuiButtonProfile";
|
||||||
|
horizSizing = "left";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
position = "170 250";
|
||||||
|
extent = "80 24";
|
||||||
|
minExtent = "8 8";
|
||||||
|
visible = "1";
|
||||||
|
setFirstResponder = "0";
|
||||||
|
modal = "1";
|
||||||
|
command = "Canvas.popDialog(GameObjectBuilder);";
|
||||||
|
helpTag = "0";
|
||||||
|
text = "Cancel";
|
||||||
|
Accelerator = "escape";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
GameObjectBuilderTargetWindow.extent = getWord(GameObjectBuilderTargetWindow.extent, 0) SPC 88;
|
||||||
|
GameObjectBuilderOKButton.position = getWord(GameObjectBuilderOKButton.position, 0) SPC 57;
|
||||||
|
GameObjectBuilderCancelButton.position = getWord(GameObjectBuilderCancelButton.position, 0) SPC 57;
|
||||||
|
}
|
||||||
|
|
||||||
|
GameObjectBuilderObjectName.text = "";
|
||||||
|
GameObjectBuilder.selectedEntity = %entity;
|
||||||
|
|
||||||
|
Canvas.pushDialog(GameObjectBuilder);
|
||||||
|
}
|
||||||
|
|
||||||
|
function EWorldEditor::buildGameObject(%this)
|
||||||
|
{
|
||||||
|
if(GameObjectBuilderObjectName.getText() $= "")
|
||||||
|
{
|
||||||
|
error("Attempted to make a new Game Object with no name!");
|
||||||
|
Canvas.popDialog(GameObjectBuilder);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
%path = EditorSettings.value( "WorldEditor/newGameObjectDir" );
|
||||||
|
%className = GameObjectBuilderObjectName.getText();
|
||||||
|
GameObjectBuilder.selectedEntity.class = %className;
|
||||||
|
Inspector.inspect(GameObjectBuilder.selectedEntity);
|
||||||
|
|
||||||
|
%file = new FileObject();
|
||||||
|
|
||||||
|
if(%file.openForWrite(%path @ "\\" @ %className @ ".cs"))
|
||||||
|
{
|
||||||
|
%file.writeline("function " @ %className @ "::onAdd(%this)\n{\n\n}\n");
|
||||||
|
%file.writeline("function " @ %className @ "::onRemove(%this)\n{\n\n}\n");
|
||||||
|
|
||||||
|
//todo, pre-write any event functions of interest
|
||||||
|
|
||||||
|
%file.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
//set up the paths
|
||||||
|
%tamlPath = %path @ "/" @ %className @ ".taml";
|
||||||
|
%scriptPath = %path @ "/" @ %className @ ".cs";
|
||||||
|
saveGameObject(%className, %tamlPath, %scriptPath);
|
||||||
|
|
||||||
|
//reload it
|
||||||
|
execGameObjects();
|
||||||
|
|
||||||
|
//now, add the script file and a ref to the taml into our SGO manifest so we can readily spawn it later.
|
||||||
|
TamlWrite(GameObjectBuilder.selectedEntity, %tamlpath);
|
||||||
|
|
||||||
|
GameObjectBuilder.selectedEntity = "";
|
||||||
|
|
||||||
|
Canvas.popDialog(GameObjectBuilder);
|
||||||
|
}
|
||||||
|
|
||||||
function EWorldEditor::selectAllObjectsInSet( %this, %set, %deselect )
|
function EWorldEditor::selectAllObjectsInSet( %this, %set, %deselect )
|
||||||
{
|
{
|
||||||
if( !isObject( %set ) )
|
if( !isObject( %set ) )
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ EditorSettings.setDefaultValue( "orthoFOV", "50" );
|
||||||
EditorSettings.setDefaultValue( "orthoShowGrid", "1" );
|
EditorSettings.setDefaultValue( "orthoShowGrid", "1" );
|
||||||
EditorSettings.setDefaultValue( "currentEditor", "WorldEditorInspectorPlugin" );
|
EditorSettings.setDefaultValue( "currentEditor", "WorldEditorInspectorPlugin" );
|
||||||
EditorSettings.setDefaultValue( "newLevelFile", "tools/levels/BlankRoom.mis" );
|
EditorSettings.setDefaultValue( "newLevelFile", "tools/levels/BlankRoom.mis" );
|
||||||
|
EditorSettings.setDefaultValue( "newGameObjectDir", "scripts/server/gameObjects" );
|
||||||
|
|
||||||
if( isFile( "C:/Program Files/Torsion/Torsion.exe" ) )
|
if( isFile( "C:/Program Files/Torsion/Torsion.exe" ) )
|
||||||
EditorSettings.setDefaultValue( "torsionPath", "C:/Program Files/Torsion/Torsion.exe" );
|
EditorSettings.setDefaultValue( "torsionPath", "C:/Program Files/Torsion/Torsion.exe" );
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ function EWCreatorWindow::init( %this )
|
||||||
%this.registerMissionObject( "SFXEmitter", "Sound Emitter" );
|
%this.registerMissionObject( "SFXEmitter", "Sound Emitter" );
|
||||||
%this.registerMissionObject( "Precipitation" );
|
%this.registerMissionObject( "Precipitation" );
|
||||||
%this.registerMissionObject( "ParticleEmitterNode", "Particle Emitter" );
|
%this.registerMissionObject( "ParticleEmitterNode", "Particle Emitter" );
|
||||||
%this.registerMissionObject( "VolumetricFog", "Volumetric Fog" );
|
%this.registerMissionObject( "VolumetricFog", "Volumetric Fog" );
|
||||||
%this.registerMissionObject( "RibbonNode", "Ribbon" );
|
%this.registerMissionObject( "RibbonNode", "Ribbon" );
|
||||||
|
|
||||||
// Legacy features. Users should use Ground Cover and the Forest Editor.
|
// Legacy features. Users should use Ground Cover and the Forest Editor.
|
||||||
|
|
@ -85,6 +85,7 @@ function EWCreatorWindow::init( %this )
|
||||||
%this.registerMissionObject( "SFXSpace", "Sound Space" );
|
%this.registerMissionObject( "SFXSpace", "Sound Space" );
|
||||||
%this.registerMissionObject( "OcclusionVolume", "Occlusion Volume" );
|
%this.registerMissionObject( "OcclusionVolume", "Occlusion Volume" );
|
||||||
%this.registerMissionObject( "AccumulationVolume", "Accumulation Volume" );
|
%this.registerMissionObject( "AccumulationVolume", "Accumulation Volume" );
|
||||||
|
%this.registerMissionObject( "Entity", "Entity" );
|
||||||
|
|
||||||
%this.endGroup();
|
%this.endGroup();
|
||||||
|
|
||||||
|
|
@ -303,6 +304,36 @@ function EWCreatorWindow::navigate( %this, %address )
|
||||||
%this.addShapeIcon( %obj );
|
%this.addShapeIcon( %obj );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Add a separate folder for Game Objects
|
||||||
|
if(isClass("Entity"))
|
||||||
|
{
|
||||||
|
if(%address $= "")
|
||||||
|
{
|
||||||
|
%this.addFolderIcon("GameObjects");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//find all GameObjectAssets
|
||||||
|
%assetQuery = new AssetQuery();
|
||||||
|
if(!AssetDatabase.findAssetType(%assetQuery, "GameObjectAsset"))
|
||||||
|
return 0; //if we didn't find ANY, just exit
|
||||||
|
|
||||||
|
%count = %assetQuery.getCount();
|
||||||
|
|
||||||
|
for(%i=0; %i < %count; %i++)
|
||||||
|
{
|
||||||
|
%assetId = %assetQuery.getAsset(%i);
|
||||||
|
|
||||||
|
%gameObjectAsset = AssetDatabase.acquireAsset(%assetId);
|
||||||
|
|
||||||
|
if(isFile(%gameObjectAsset.TAMLFilePath))
|
||||||
|
{
|
||||||
|
%this.addGameObjectIcon( %gameObjectAsset.gameObjectName );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( %this.tab $= "Meshes" )
|
if ( %this.tab $= "Meshes" )
|
||||||
|
|
@ -319,7 +350,7 @@ function EWCreatorWindow::navigate( %this, %address )
|
||||||
|
|
||||||
%fullPath = makeRelativePath( %fullPath, getMainDotCSDir() );
|
%fullPath = makeRelativePath( %fullPath, getMainDotCSDir() );
|
||||||
%splitPath = strreplace( %fullPath, " ", "_" );
|
%splitPath = strreplace( %fullPath, " ", "_" );
|
||||||
%splitPath = strreplace( %splitPath, "/", " " );
|
%splitPath = strreplace( %splitPath, "/", " " );
|
||||||
if( getWord(%splitPath, 0) $= "tools" )
|
if( getWord(%splitPath, 0) $= "tools" )
|
||||||
{
|
{
|
||||||
%fullPath = findNextFileMultiExpr( getFormatExtensions() );
|
%fullPath = findNextFileMultiExpr( getFormatExtensions() );
|
||||||
|
|
@ -737,6 +768,22 @@ function EWCreatorWindow::addPrefabIcon( %this, %fullPath )
|
||||||
%this.contentCtrl.addGuiControl( %ctrl );
|
%this.contentCtrl.addGuiControl( %ctrl );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function EWCreatorWindow::addGameObjectIcon( %this, %gameObjectName )
|
||||||
|
{
|
||||||
|
%ctrl = %this.createIcon();
|
||||||
|
|
||||||
|
%ctrl.altCommand = "spawnGameObject( \"" @ %gameObjectName @ "\", true );";
|
||||||
|
%ctrl.iconBitmap = EditorIconRegistry::findIconByClassName( "Prefab" );
|
||||||
|
%ctrl.text = %gameObjectName;
|
||||||
|
%ctrl.class = "CreatorGameObjectIconBtn";
|
||||||
|
%ctrl.tooltip = "Spawn the " @ %gameObjectName @ " GameObject";
|
||||||
|
|
||||||
|
%ctrl.buttonType = "radioButton";
|
||||||
|
%ctrl.groupNum = "-1";
|
||||||
|
|
||||||
|
%this.contentCtrl.addGuiControl( %ctrl );
|
||||||
|
}
|
||||||
|
|
||||||
function CreatorPopupMenu::onSelect( %this, %id, %text )
|
function CreatorPopupMenu::onSelect( %this, %id, %text )
|
||||||
{
|
{
|
||||||
%split = strreplace( %text, "/", " " );
|
%split = strreplace( %text, "/", " " );
|
||||||
|
|
|
||||||
|
|
@ -218,7 +218,7 @@ function TerrainMaterialDlg::changeBase( %this )
|
||||||
if( %ctrl.bitmap !$= "" )
|
if( %ctrl.bitmap !$= "" )
|
||||||
%file = %ctrl.bitmap;
|
%file = %ctrl.bitmap;
|
||||||
else
|
else
|
||||||
%file = "tools/materialeditor/gui/unknownImage";
|
%file = "tools/materialEditor/gui/unknownImage";
|
||||||
}
|
}
|
||||||
|
|
||||||
%file = makeRelativePath( %file, getMainDotCsDir() );
|
%file = makeRelativePath( %file, getMainDotCsDir() );
|
||||||
|
|
@ -240,7 +240,7 @@ function TerrainMaterialDlg::changeDetail( %this )
|
||||||
if( %ctrl.bitmap !$= "" )
|
if( %ctrl.bitmap !$= "" )
|
||||||
%file = %ctrl.bitmap;
|
%file = %ctrl.bitmap;
|
||||||
else
|
else
|
||||||
%file = "tools/materialeditor/gui/unknownImage";
|
%file = "tools/materialEditor/gui/unknownImage";
|
||||||
}
|
}
|
||||||
|
|
||||||
%file = makeRelativePath( %file, getMainDotCsDir() );
|
%file = makeRelativePath( %file, getMainDotCsDir() );
|
||||||
|
|
@ -262,7 +262,7 @@ function TerrainMaterialDlg::changeMacro( %this )
|
||||||
if( %ctrl.bitmap !$= "" )
|
if( %ctrl.bitmap !$= "" )
|
||||||
%file = %ctrl.bitmap;
|
%file = %ctrl.bitmap;
|
||||||
else
|
else
|
||||||
%file = "tools/materialeditor/gui/unknownImage";
|
%file = "tools/materialEditor/gui/unknownImage";
|
||||||
}
|
}
|
||||||
|
|
||||||
%file = makeRelativePath( %file, getMainDotCsDir() );
|
%file = makeRelativePath( %file, getMainDotCsDir() );
|
||||||
|
|
@ -285,7 +285,7 @@ function TerrainMaterialDlg::changeNormal( %this )
|
||||||
if( %ctrl.bitmap !$= "" )
|
if( %ctrl.bitmap !$= "" )
|
||||||
%file = %ctrl.bitmap;
|
%file = %ctrl.bitmap;
|
||||||
else
|
else
|
||||||
%file = "tools/materialeditor/gui/unknownImage";
|
%file = "tools/materialEditor/gui/unknownImage";
|
||||||
}
|
}
|
||||||
|
|
||||||
%file = makeRelativePath( %file, getMainDotCsDir() );
|
%file = makeRelativePath( %file, getMainDotCsDir() );
|
||||||
|
|
@ -376,22 +376,22 @@ function TerrainMaterialDlg::setActiveMaterial( %this, %mat )
|
||||||
|
|
||||||
%this-->matNameCtrl.setText( %mat.internalName );
|
%this-->matNameCtrl.setText( %mat.internalName );
|
||||||
if (%mat.diffuseMap $= ""){
|
if (%mat.diffuseMap $= ""){
|
||||||
%this-->baseTexCtrl.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
%this-->baseTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||||
}else{
|
}else{
|
||||||
%this-->baseTexCtrl.setBitmap( %mat.diffuseMap );
|
%this-->baseTexCtrl.setBitmap( %mat.diffuseMap );
|
||||||
}
|
}
|
||||||
if (%mat.detailMap $= ""){
|
if (%mat.detailMap $= ""){
|
||||||
%this-->detailTexCtrl.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
%this-->detailTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||||
}else{
|
}else{
|
||||||
%this-->detailTexCtrl.setBitmap( %mat.detailMap );
|
%this-->detailTexCtrl.setBitmap( %mat.detailMap );
|
||||||
}
|
}
|
||||||
if (%mat.macroMap $= ""){
|
if (%mat.macroMap $= ""){
|
||||||
%this-->macroTexCtrl.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
%this-->macroTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||||
}else{
|
}else{
|
||||||
%this-->macroTexCtrl.setBitmap( %mat.macroMap );
|
%this-->macroTexCtrl.setBitmap( %mat.macroMap );
|
||||||
}
|
}
|
||||||
if (%mat.normalMap $= ""){
|
if (%mat.normalMap $= ""){
|
||||||
%this-->normTexCtrl.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
%this-->normTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||||
}else{
|
}else{
|
||||||
%this-->normTexCtrl.setBitmap( %mat.normalMap );
|
%this-->normTexCtrl.setBitmap( %mat.normalMap );
|
||||||
}
|
}
|
||||||
|
|
@ -428,22 +428,22 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
|
||||||
|
|
||||||
%newName = %this-->matNameCtrl.getText();
|
%newName = %this-->matNameCtrl.getText();
|
||||||
|
|
||||||
if (%this-->baseTexCtrl.bitmap $= "tools/materialeditor/gui/unknownImage"){
|
if (%this-->baseTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
|
||||||
%newDiffuse = "";
|
%newDiffuse = "";
|
||||||
}else{
|
}else{
|
||||||
%newDiffuse = %this-->baseTexCtrl.bitmap;
|
%newDiffuse = %this-->baseTexCtrl.bitmap;
|
||||||
}
|
}
|
||||||
if (%this-->normTexCtrl.bitmap $= "tools/materialeditor/gui/unknownImage"){
|
if (%this-->normTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
|
||||||
%newNormal = "";
|
%newNormal = "";
|
||||||
}else{
|
}else{
|
||||||
%newNormal = %this-->normTexCtrl.bitmap;
|
%newNormal = %this-->normTexCtrl.bitmap;
|
||||||
}
|
}
|
||||||
if (%this-->detailTexCtrl.bitmap $= "tools/materialeditor/gui/unknownImage"){
|
if (%this-->detailTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
|
||||||
%newDetail = "";
|
%newDetail = "";
|
||||||
}else{
|
}else{
|
||||||
%newDetail = %this-->detailTexCtrl.bitmap;
|
%newDetail = %this-->detailTexCtrl.bitmap;
|
||||||
}
|
}
|
||||||
if (%this-->macroTexCtrl.bitmap $= "tools/materialeditor/gui/unknownImage"){
|
if (%this-->macroTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
|
||||||
%newMacro = "";
|
%newMacro = "";
|
||||||
}else{
|
}else{
|
||||||
%newMacro = %this-->macroTexCtrl.bitmap;
|
%newMacro = %this-->macroTexCtrl.bitmap;
|
||||||
|
|
|
||||||
|
|
@ -485,6 +485,7 @@ function EditorOpenMission(%filename)
|
||||||
|
|
||||||
function EditorExportToCollada()
|
function EditorExportToCollada()
|
||||||
{
|
{
|
||||||
|
|
||||||
%dlg = new SaveFileDialog()
|
%dlg = new SaveFileDialog()
|
||||||
{
|
{
|
||||||
Filters = "COLLADA Files (*.dae)|*.dae|";
|
Filters = "COLLADA Files (*.dae)|*.dae|";
|
||||||
|
|
@ -517,6 +518,7 @@ function EditorExportToCollada()
|
||||||
|
|
||||||
function EditorMakePrefab()
|
function EditorMakePrefab()
|
||||||
{
|
{
|
||||||
|
|
||||||
%dlg = new SaveFileDialog()
|
%dlg = new SaveFileDialog()
|
||||||
{
|
{
|
||||||
Filters = "Prefab Files (*.prefab)|*.prefab|";
|
Filters = "Prefab Files (*.prefab)|*.prefab|";
|
||||||
|
|
@ -768,6 +770,15 @@ function EditorCameraSpeedMenu::setupGuiControls(%this)
|
||||||
// Set up min/max camera slider range
|
// Set up min/max camera slider range
|
||||||
eval("CameraSpeedDropdownCtrlContainer-->Slider.range = \"" @ %minSpeed @ " " @ %maxSpeed @ "\";");
|
eval("CameraSpeedDropdownCtrlContainer-->Slider.range = \"" @ %minSpeed @ " " @ %maxSpeed @ "\";");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
// Tools Menu Handler
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
function EditorUtilitiesMenu::onSelectItem(%this, %id, %text)
|
||||||
|
{
|
||||||
|
return Parent::onSelectItem(%this, %id, %text);
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// World Menu Handler Object Menu
|
// World Menu Handler Object Menu
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
||||||
|
|
@ -252,6 +252,19 @@ function EditorGui::buildMenus(%this)
|
||||||
// last menu items in EditorLightingMenu::onAdd().
|
// last menu items in EditorLightingMenu::onAdd().
|
||||||
};
|
};
|
||||||
%this.menuBar.insert(%lightingMenu, %this.menuBar.getCount());
|
%this.menuBar.insert(%lightingMenu, %this.menuBar.getCount());
|
||||||
|
|
||||||
|
// Tools Menu
|
||||||
|
%toolsMenu = new PopupMenu()
|
||||||
|
{
|
||||||
|
superClass = "MenuBuilder";
|
||||||
|
class = "EditorUtilitiesMenu";
|
||||||
|
|
||||||
|
barTitle = "Tools";
|
||||||
|
|
||||||
|
item[0] = "Network Graph" TAB "n" TAB "toggleNetGraph();";
|
||||||
|
item[1] = "Profiler" TAB "ctrl F2" TAB "showMetrics(true);";
|
||||||
|
};
|
||||||
|
%this.menuBar.insert(%toolsMenu, %this.menuBar.getCount());
|
||||||
|
|
||||||
// Help Menu
|
// Help Menu
|
||||||
%helpMenu = new PopupMenu()
|
%helpMenu = new PopupMenu()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue