mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 09:04:38 +00:00
Merge remote-tracking branch 'devhead/Preview4_0' into tsneo
# Conflicts: # Templates/BaseGame/game/data/ui/guis/loadingGui.gui # Templates/BaseGame/game/data/ui/guis/mainMenu.gui # Templates/BaseGame/game/tools/MainEditor/guis/MainEditorWindow.gui # Templates/BaseGame/game/tools/assetBrowser/guis/assetPreviewButtonsTemplate.gui # Templates/BaseGame/game/tools/forestEditor/brushes.tscript
This commit is contained in:
commit
717c7acca9
2266 changed files with 48780 additions and 26034 deletions
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="ConvexEditorGui"
|
||||
scriptFile="@assetFile=convexEditorGui.gui"
|
||||
GUIFile="@assetFile=convexEditorGui.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="ConvexEditorOptions"
|
||||
scriptFile="@assetFile=convexEditorSidebarGui.gui"
|
||||
GUIFile="@assetFile=convexEditorSidebarGui.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="ConvexEditorSettingsTab,EditorGuiGroup"
|
||||
scriptFile="@assetFile=convexEditorSettingsTab.ed.gui"
|
||||
GUIFile="@assetFile=convexEditorSettingsTab.ed.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<MaterialAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="OccluderProxyMaterial"
|
||||
scriptFile="@assetFile=materials.tscript"
|
||||
materialDefinitionName="OccluderProxyMaterial"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<MaterialAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="PortalProxyMaterial"
|
||||
scriptFile="@assetFile=materials.tscript"
|
||||
materialDefinitionName="PortalProxyMaterial"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<MaterialAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="TriggerProxyMaterial"
|
||||
scriptFile="@assetFile=materials.tscript"
|
||||
materialDefinitionName="TriggerProxyMaterial"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<MaterialAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="ZoneProxyMaterial"
|
||||
scriptFile="@assetFile=materials.tscript"
|
||||
materialDefinitionName="ZoneProxyMaterial"
|
||||
VersionId="1" />
|
||||
|
|
@ -24,14 +24,21 @@ function ConvexEditorGui::onWake( %this )
|
|||
{
|
||||
convexEditorToolbar-->gridSnapSizeEdit.setText(%this.getGridSnapSize());
|
||||
|
||||
if(ConvexEditorOptionsWindow-->matPreviewBtn.bitmap $= "")
|
||||
if(ConvexEditorOptionsWindow-->matPreviewBtn.getBitmap() $= "")
|
||||
{
|
||||
//no active material, so set one
|
||||
ConvexEditorOptionsWindow-->matPreviewBtn.setText("");
|
||||
|
||||
%mat = EditorSettings.Value("ConvexEditor/MaterialName");
|
||||
|
||||
ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(%mat.diffuseMap[0]);
|
||||
if(AssetDatabase.isDeclaredAsset(%mat))
|
||||
{
|
||||
%matName = AssetDatabase.acquireAsset(%mat).materialDefinitionName;
|
||||
AssetDatabase.releaseAsset(%mat);
|
||||
%mat = %matName;
|
||||
}
|
||||
|
||||
ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(%mat.getDiffuseMap(0));
|
||||
|
||||
ConvexEditorOptionsWindow.activeMaterial = %mat;
|
||||
}
|
||||
|
|
@ -68,7 +75,8 @@ function ConvexEditorGui::onSelectionChanged( %this, %shape, %face )
|
|||
ConvexEditorDeleteFaceBtn.setActive( true );
|
||||
|
||||
ConvexEditorOptionsWindow-->defMatPreviewBtn.setText("");
|
||||
ConvexEditorOptionsWindow-->defMatPreviewBtn.setBitmap(%shape.material.diffuseMap[0]);
|
||||
%shapeMat = %shape.getMaterial();
|
||||
ConvexEditorOptionsWindow-->defMatPreviewBtn.setBitmap(%shapeMat.getDiffuseMap(0));
|
||||
|
||||
ConvexEditorOptionsWindow.activeShape = %shape;
|
||||
|
||||
|
|
@ -156,10 +164,10 @@ function ConvexEditorMaterialBtn::gotMaterialName(%this, %name)
|
|||
//eval(%this.object @ "." @ %this.targetField @ " = " @ %name @ ";");
|
||||
//%this.object.changeMaterial(getTrailingNumber(%this.targetField), %name);
|
||||
//%this.object.inspectorApply();
|
||||
%diffusemap = %materialAsset.materialDefinitionName.diffuseMap[0];
|
||||
%diffusemap = %materialAsset.materialDefinitionName.getDiffuseMap(0);
|
||||
if(%diffusemap $= "")
|
||||
{
|
||||
%diffuseAsset = %materialAsset.materialDefinitionName.diffuseMapAsset[0];
|
||||
%diffuseAsset = %materialAsset.materialDefinitionName.getDiffuseMapAsset(0);
|
||||
if(%diffuseAsset !$= "")
|
||||
{
|
||||
%diffuseAssetDef = AssetDatabase.acquireAsset(%diffuseAsset);
|
||||
|
|
@ -183,7 +191,7 @@ function ConvexEditorMaterialLiftBtn::onClick(%this)
|
|||
{
|
||||
%mat = ConvexEditorGui.getSelectedFaceMaterial();
|
||||
ConvexEditorOptionsWindow.activeMaterial = %mat;
|
||||
ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(%mat.diffuseMap[0]);
|
||||
ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(%mat.getDiffuseMap(0));
|
||||
}
|
||||
|
||||
function ConvexEditorMaterialResetBtn::onClick(%this)
|
||||
|
|
@ -221,10 +229,10 @@ function ConvexEditorDefaultMaterialBtn::gotMaterialName(%this, %name)
|
|||
//eval(%this.object @ "." @ %this.targetField @ " = " @ %name @ ";");
|
||||
//%this.object.changeMaterial(getTrailingNumber(%this.targetField), %name);
|
||||
//%this.object.inspectorApply();
|
||||
%diffusemap = %materialAsset.materialDefinitionName.diffuseMap[0];
|
||||
%diffusemap = %materialAsset.materialDefinitionName.getDiffuseMap(0);
|
||||
if(%diffusemap $= "")
|
||||
{
|
||||
%diffuseAsset = %materialAsset.materialDefinitionName.diffuseMapAsset[0];
|
||||
%diffuseAsset = %materialAsset.materialDefinitionName.getDiffuseMapAsset(0);
|
||||
if(%diffuseAsset !$= "")
|
||||
{
|
||||
%diffuseAssetDef = AssetDatabase.acquireAsset(%diffuseAsset);
|
||||
|
|
@ -234,7 +242,7 @@ function ConvexEditorDefaultMaterialBtn::gotMaterialName(%this, %name)
|
|||
|
||||
ConvexEditorOptionsWindow-->defMatPreviewBtn.setBitmap(%diffusemap);
|
||||
|
||||
ConvexEditorOptionsWindow.activeShape.material = %materialAsset.materialDefinitionName;
|
||||
ConvexEditorOptionsWindow.activeShape.setMaterial(%name);
|
||||
|
||||
ConvexEditorGui.updateShape();
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="convexEditorToolbar, EditorGuiGroup"
|
||||
scriptFile="@assetFile=convexEditorToolbar.ed.gui"
|
||||
GUIFile="@assetFile=convexEditorToolbar.ed.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -38,7 +38,7 @@ $guiContent = new GuiControl(convexEditorToolbar, EditorGuiGroup) {
|
|||
position = "94 3";
|
||||
Extent = "2 26";
|
||||
MinExtent = "1 1";
|
||||
bitmap = "tools/gui/images/separator-h.png";
|
||||
bitmapAsset = "ToolsModule:separator_h_image";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(ConvexEditorCreateBoxBtn) {
|
||||
canSaveDynamicFields = "0";
|
||||
|
|
@ -55,7 +55,7 @@ $guiContent = new GuiControl(convexEditorToolbar, EditorGuiGroup) {
|
|||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
ToolTip = "Create ConvexShape Box" NL "Use Alt + Click-Drag instead of this for more control of starting placement.";
|
||||
hovertime = "1000";
|
||||
bitmap = "tools/convexEditor/images/convex-editor-btn";
|
||||
bitmapAsset = "ToolsModule:convex_editor_btn_n_image";
|
||||
text = "";
|
||||
groupNum = "-1";
|
||||
buttonType = "pushButton";
|
||||
|
|
@ -76,7 +76,7 @@ $guiContent = new GuiControl(convexEditorToolbar, EditorGuiGroup) {
|
|||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
ToolTip = "Split selected face" NL "Use Ctrl + Rotate instead for more control.";
|
||||
hovertime = "1000";
|
||||
bitmap = "tools/convexEditor/images/split-face-btn";
|
||||
bitmapAsset = "ToolsModule:split_face_btn_n_image";
|
||||
text = "";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
|
|
@ -97,7 +97,7 @@ $guiContent = new GuiControl(convexEditorToolbar, EditorGuiGroup) {
|
|||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
ToolTip = "Delete selected face" NL "(Delete)";
|
||||
hovertime = "1000";
|
||||
bitmap = "tools/gui/images/menubar/delete-btn";
|
||||
bitmapAsset = "ToolsModule:delete_btn_n_image";
|
||||
text = "";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
|
|
@ -108,7 +108,7 @@ $guiContent = new GuiControl(convexEditorToolbar, EditorGuiGroup) {
|
|||
position = "190 3";
|
||||
Extent = "2 26";
|
||||
MinExtent = "1 1";
|
||||
bitmap = "tools/gui/images/separator-h.png";
|
||||
bitmapAsset = "ToolsModule:separator_h_image";
|
||||
};
|
||||
new GuiContainer() {
|
||||
canSaveDynamicFields = "0";
|
||||
|
|
@ -145,7 +145,7 @@ $guiContent = new GuiControl(convexEditorToolbar, EditorGuiGroup) {
|
|||
buttonType = "toggleButton";
|
||||
useMouseEvents = "0";
|
||||
groupNum = "-1";
|
||||
bitmap = "tools/gui/images/menubar/snap-grid";
|
||||
bitmapAsset = "ToolsModule:menubar_snap_grid_n_image";
|
||||
textMargin = "4";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
|
|
@ -197,7 +197,7 @@ $guiContent = new GuiControl(convexEditorToolbar, EditorGuiGroup) {
|
|||
position = "380 3";
|
||||
Extent = "2 26";
|
||||
MinExtent = "1 1";
|
||||
bitmap = "tools/gui/images/separator-h.png";
|
||||
bitmapAsset = "ToolsModule:separator_h_image";
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="convex_editor_btn_d_image"
|
||||
imageFile="@assetFile=convex-editor-btn_d.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="convex_editor_btn_h_image"
|
||||
imageFile="@assetFile=convex-editor-btn_h.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="convex_editor_btn_n_image"
|
||||
imageFile="@assetFile=convex-editor-btn_n.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="occluderProxyImage_image"
|
||||
imageFile="@assetFile=occluderProxyImage.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="portalProxyImage_image"
|
||||
imageFile="@assetFile=portalProxyImage.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="split_face_btn_d_image"
|
||||
imageFile="@assetFile=split-face-btn_d.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="split_face_btn_h_image"
|
||||
imageFile="@assetFile=split-face-btn_h.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="split_face_btn_i_image"
|
||||
imageFile="@assetFile=split-face-btn_i.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="split_face_btn_n_image"
|
||||
imageFile="@assetFile=split-face-btn_n.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="triggerProxyImage_image"
|
||||
imageFile="@assetFile=triggerProxyImage.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="zoneProxyImage_image"
|
||||
imageFile="@assetFile=zoneProxyImage.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -68,7 +68,7 @@ function ConvexEditorPlugin::onWorldEditorStartup( %this )
|
|||
|
||||
// Add ourselves to the ToolsToolbar
|
||||
%tooltip = "Sketch Tool (" @ %accel @ ")";
|
||||
EditorGui.addToToolsToolbar( "ConvexEditorPlugin", "ConvexEditorPalette", expandFilename("tools/convexEditor/images/convex-editor-btn"), %tooltip );
|
||||
EditorGui.addToToolsToolbar( "ConvexEditorPlugin", "ConvexEditorPalette", "ToolsModule:convex_editor_btn_n_image", %tooltip );
|
||||
|
||||
//connect editor windows
|
||||
GuiWindowCtrl::attach( ConvexEditorOptionsWindow, ConvexEditorTreeWindow);
|
||||
|
|
@ -209,14 +209,14 @@ function ConvexEditorPlugin::onSaveMission( %this, %missionFile )
|
|||
function ConvexEditorPlugin::initSettings( %this )
|
||||
{
|
||||
EditorSettings.beginGroup( "ConvexEditor", true );
|
||||
EditorSettings.setDefaultValue( "MaterialName", "Grid_512_Orange" );
|
||||
EditorSettings.setDefaultValue( "MaterialName", "Prototyping:WallOrange" );
|
||||
EditorSettings.endGroup();
|
||||
}
|
||||
|
||||
function ESettingsWindow::getConvexEditorSettings(%this)
|
||||
{
|
||||
SettingsInspector.startGroup("General");
|
||||
SettingsInspector.addSettingsField("ConvexEditor/MaterialName", "Default Material Name", "string", "");
|
||||
SettingsInspector.addSettingsField("ConvexEditor/MaterialName", "Default Material Asset Name", "TypeMaterialAssetId", "");
|
||||
SettingsInspector.endGroup();
|
||||
}
|
||||
|
||||
|
|
@ -232,4 +232,4 @@ function ConvexEditorPlugin::writeSettings( %this )
|
|||
EditorSettings.beginGroup( "ConvexEditor", true );
|
||||
EditorSettings.setValue( "MaterialName", ConvexEditorGui.materialName );
|
||||
EditorSettings.endGroup();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
singleton Material( ZoneProxyMaterial )
|
||||
{
|
||||
mapTo = "ZoneProxyMaterial";
|
||||
diffuseMap[0] = "tools/convexEditor/images/zoneProxyImage";
|
||||
diffuseMapAsset[0] = "ToolsModule:zoneProxyImage_image";
|
||||
materialTag0 = "TestMaterial";
|
||||
translucent = true;
|
||||
translucentBlendOp = "LerpAlpha";
|
||||
|
|
@ -11,7 +11,7 @@ singleton Material( ZoneProxyMaterial )
|
|||
singleton Material( TriggerProxyMaterial )
|
||||
{
|
||||
mapTo = "TriggerProxyMaterial";
|
||||
diffuseMap[0] = "./images/triggerProxyImage";
|
||||
diffuseMapAsset[0] = "ToolsModule:triggerProxyImage_image";
|
||||
materialTag0 = "TestMaterial";
|
||||
translucent = true;
|
||||
translucentBlendOp = "PreMul";
|
||||
|
|
@ -21,7 +21,7 @@ singleton Material( TriggerProxyMaterial )
|
|||
singleton Material( PortalProxyMaterial )
|
||||
{
|
||||
mapTo = "PortalProxyMaterial";
|
||||
diffuseMap[0] = "./images/portalProxyImage";
|
||||
diffuseMapAsset[0] = "ToolsModule:portalProxyImage_image";
|
||||
materialTag0 = "TestMaterial";
|
||||
translucent = true;
|
||||
translucentBlendOp = "PreMul";
|
||||
|
|
@ -31,7 +31,7 @@ singleton Material( PortalProxyMaterial )
|
|||
singleton Material( OccluderProxyMaterial )
|
||||
{
|
||||
mapTo = "OccluderProxyMaterial";
|
||||
diffuseMap[0] = "./images/occluderProxyImage";
|
||||
diffuseMapAsset[0] = "ToolsModule:occluderProxyImage_image";
|
||||
materialTag0 = "TestMaterial";
|
||||
translucent = true;
|
||||
translucentBlendOp = "PreMul";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue