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:
Jeff Hutchinson 2021-08-13 20:14:39 -04:00
commit 717c7acca9
2266 changed files with 48780 additions and 26034 deletions

View file

@ -0,0 +1,6 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
scriptFile="@assetFile=shapeEdSelectWindow.ed.gui"
GUIFile="@assetFile=shapeEdSelectWindow.ed.gui"
VersionId="1" />

View file

@ -48,12 +48,12 @@ singleton GuiControlProfile(GuiShapeEdTextListProfile : ToolsGuiTextListProfile)
singleton GuiControlProfile(GuiShapeEdRolloutProfile : GuiInspectorRolloutProfile0)
{
bitmap = "tools/editorClasses/gui/images/rollout";
bitmapAsset = "ToolsModule:rollout_image";
category = "Editor";
};
singleton GuiControlProfile( GuiShapeEdTransitionSliderProfile )
{
bitmap = "tools/shapeEditor/images/transition_slider";
bitmapAsset = "ToolsModule:transition_slider_image";
category = "Core";
};

View file

@ -0,0 +1,7 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ShapeEdAdvancedWindow, EditorGuiGroup"
scriptFile="@assetFile=shapeEdAdvancedWindow.ed.gui"
GUIFile="@assetFile=shapeEdAdvancedWindow.ed.gui"
VersionId="1" />

View file

@ -0,0 +1,7 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ShapeEdAnimWindow"
scriptFile="@assetFile=shapeEdAnimWindow.ed.gui"
GUIFile="@assetFile=shapeEdAnimWindow.ed.gui"
VersionId="1" />

View file

@ -0,0 +1,7 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ShapeEdPropWindow"
scriptFile="@assetFile=shapeEdPropWindow.ed.gui"
GUIFile="@assetFile=shapeEdPropWindow.ed.gui"
VersionId="1" />

View file

@ -0,0 +1,7 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ShapeEditorSettingsTab,EditorGuiGroup"
scriptFile="@assetFile=ShapeEditorSettingsTab.gui"
GUIFile="@assetFile=ShapeEditorSettingsTab.gui"
VersionId="1" />

View file

@ -0,0 +1,7 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ShapeEditorToolbar, EditorGuiGroup"
scriptFile="@assetFile=ShapeEditorToolbar.ed.gui"
GUIFile="@assetFile=ShapeEditorToolbar.ed.gui"
VersionId="1" />

View file

@ -52,7 +52,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
position = "94 3";
Extent = "2 26";
MinExtent = "1 1";
bitmap = "tools/gui/images/separator-h.png";
bitmapAsset = "ToolsModule:separator_h_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@ -70,7 +70,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Show grid";
hovertime = "1000";
bitmap = "tools/gui/images/menubar/show-grid";
bitmapAsset = "ToolsModule:show_grid_n_image";
text = "";
groupNum = "-1";
buttonType = "ToggleButton";
@ -92,7 +92,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Fit Camera to Shape (F)";
hovertime = "1000";
bitmap = "tools/gui/images/menubar/fit-selection";
bitmapAsset = "ToolsModule:fit_selection_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
@ -114,7 +114,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Orbit the selected node";
hovertime = "1000";
bitmap = "tools/gui/images/menubar/orbit-cam";
bitmapAsset = "ToolsModule:orbit_cam_n_image";
text = "";
groupNum = "-1";
buttonType = "ToggleButton";
@ -125,7 +125,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
position = "202 3";
Extent = "2 26";
MinExtent = "1 1";
bitmap = "tools/gui/images/separator-h.png";
bitmapAsset = "ToolsModule:separator_h_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@ -143,7 +143,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Show Nodes (N)";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/shownodes_btn";
bitmapAsset = "ToolsModule:shownodes_btn_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@ -164,7 +164,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle shape transparency in the preview window (T)";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/ghost_btn";
bitmapAsset = "ToolsModule:ghost_btn_n_image";
buttonType = "ToggleButton";
groupNum = "0";
useMouseEvents = "0";
@ -185,7 +185,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle shape wireframe in the preview window (R)";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/show-wireframe";
bitmapAsset = "ToolsModule:show_wireframe_n_image";
buttonType = "ToggleButton";
groupNum = "0";
useMouseEvents = "0";
@ -195,7 +195,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
position = "309 3";
Extent = "2 26";
MinExtent = "1 1";
bitmap = "tools/gui/images/separator-h.png";
bitmapAsset = "ToolsModule:separator_h_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@ -214,7 +214,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle shape bounding box in the preview window";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/object-bounds";
bitmapAsset = "ToolsModule:object_bounds_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@ -236,7 +236,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle selected object bounding box in the preview window";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/object-fit-bounds";
bitmapAsset = "ToolsModule:object_fit_bounds_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@ -258,7 +258,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle rendering of collision meshes in the preview window";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/collision-shape";
bitmapAsset = "ToolsModule:collision_shape_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@ -268,7 +268,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
position = "415 3";
Extent = "2 26";
MinExtent = "1 1";
bitmap = "tools/gui/images/separator-h.png";
bitmapAsset = "ToolsModule:separator_h_image";
};
new GuiBitmapButtonCtrl() {
internalName = "showAdvanced";
@ -286,7 +286,7 @@ $guiContent = new GuiControl(ShapeEditorToolbar, EditorGuiGroup) {
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle Advanced Properties Window";
hovertime = "1000";
bitmap = "tools/shapeEditor/images/detail-levels_btn";
bitmapAsset = "ToolsModule:detail_levels_btn_n_image";
buttonType = "ToggleButton";
groupNum = "0";
useMouseEvents = "0";

View file

@ -157,7 +157,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) {
canSaveDynamicFields = "0";
};
new GuiBitmapCtrl(){
bitmap = "tools/gui/images/inactive-overlay";
bitmapAsset = "ToolsModule:inactive_overlay_image";
position = "57 19";
Extent = "122 20";
tooltip = "Levels needs to be selected to enable the detail level slider";
@ -690,7 +690,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) {
canSaveDynamicFields = "0";
};
new GuiBitmapCtrl(){
bitmap = "tools/gui/images/inactive-overlay";
bitmapAsset = "ToolsModule:inactive_overlay_image";
position = "4 18";
Extent = "193 64";
tooltip = "Imposters must be enabled, and an imposter detail level selected to edit these properties";
@ -846,7 +846,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) {
profile = "ToolsGuiTextProfile";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/delete";
bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@ -865,7 +865,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) {
isContainer = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/new";
bitmapAsset = "ToolsModule:new_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@ -989,7 +989,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) {
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/shapeEditor/images/playfwd_btn";
bitmapAsset = "ToolsModule:playfwd_btn_n_image";
groupNum = "0";
buttonType = "ToggleButton";
useMouseEvents = "0";
@ -1171,7 +1171,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) {
};
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/delete";
bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@ -1190,7 +1190,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) {
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/new";
bitmapAsset = "ToolsModule:new_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@ -1229,7 +1229,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) {
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/shapeEditor/images/playbkwd_btn";
bitmapAsset = "ToolsModule:playbkwd_btn_n_image";
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
@ -1250,7 +1250,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) {
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/shapeEditor/images/pause_btn";
bitmapAsset = "ToolsModule:pause_btn_n_image";
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
@ -1271,7 +1271,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) {
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/shapeEditor/images/playfwd_btn";
bitmapAsset = "ToolsModule:playfwd_btn_n_image";
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
@ -1747,7 +1747,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdAdvancedWindow, EditorGuiGroup) {
canSaveDynamicFields = "0";
};
new GuiBitmapCtrl() {
bitmap = "tools/gui/images/inactive-overlay";
bitmapAsset = "ToolsModule:inactive_overlay_image";
position = "0 47";
extent = "199 175";
horizSizing = "right";

View file

@ -207,7 +207,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/back_btn";
bitmapAsset = "ToolsModule:back_btn_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@ -227,7 +227,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/stepback_btn";
bitmapAsset = "ToolsModule:stepback_btn_n_image";
internalName = "stepBkwdBtn";
};
new GuiControl() {
@ -263,7 +263,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/playbkwd_btn";
bitmapAsset = "ToolsModule:playbkwd_btn_n_image";
};
new GuiBitmapButtonCtrl() {
internalName = "pauseBtn";
@ -284,7 +284,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/pause_btn";
bitmapAsset = "ToolsModule:pause_btn_n_image";
};
new GuiBitmapButtonCtrl() {
internalName = "playFwdBtn";
@ -305,7 +305,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/playfwd_btn";
bitmapAsset = "ToolsModule:playfwd_btn_n_image";
};
};
new GuiBitmapButtonCtrl() {
@ -326,7 +326,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/stepfwd_btn";
bitmapAsset = "ToolsModule:stepfwd_btn_n_image";
internalName = "stepFwdBtn";
};
new GuiBitmapButtonCtrl() {
@ -347,7 +347,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/fwd_btn";
bitmapAsset = "ToolsModule:fwd_btn_n_image";
};
new GuiButtonCtrl() {
canSaveDynamicFields = "0";
@ -388,7 +388,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
groupNum = "0";
buttonType = "ToggleButton";
useMouseEvents = "0";
bitmap = "tools/shapeEditor/images/pingpong_btn";
bitmapAsset = "ToolsModule:pingpong_btn_n_image";
};
new GuiTextEditCtrl() {
internalName = "timeScale";
@ -417,7 +417,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
position = "39 0";
Extent = "8 13";
MinExtent = "1 1";
bitmap = "tools/shapeEditor/images/seq_bar-in";
bitmapAsset = "ToolsModule:seq_bar_in_n_image";
ToolTip = "Set the In Point to the Current Frame";
Command = "ShapeEdSequences.onEditSeqInOut(\"in\", ShapeEdSeqSlider.getValue());";
};
@ -429,7 +429,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
position = "765 0";
Extent = "8 13";
MinExtent = "1 1";
bitmap = "tools/shapeEditor/images/seq_bar-out";
bitmapAsset = "ToolsModule:seq_bar_out_n_image";
ToolTip = "Set the Out Point to the Current Frame";
Command = "ShapeEdSequences.onEditSeqInOut(\"out\", ShapeEdSeqSlider.getValue());";
};

View file

@ -430,7 +430,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) {
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/gui/images/new";
bitmapAsset = "ToolsModule:new_n_image";
};
new GuiBitmapButtonCtrl() {
internalName = "deleteTriggerBtn";
@ -451,7 +451,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) {
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/gui/images/delete";
bitmapAsset = "ToolsModule:delete_n_image";
};
// Trigger list
new GuiControl() {
@ -617,7 +617,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) {
treeView = ShapeEdNodeTreeView;
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/clear-icon";
bitmapAsset = "ToolsModule:clear_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@ -838,7 +838,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) {
buttonType = "RadioButton";
useMouseEvents = "0";
buttonMargin = "0 4";
iconBitmap = "tools/gui/images/menubar/world-transform_n";
bitmapAsset = "ToolsModule:world_transform_n_image";
textMargin = "25";
};
new GuiIconButtonCtrl() {
@ -862,7 +862,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) {
buttonType = "RadioButton";
useMouseEvents = "0";
buttonMargin = "0 4";
iconBitmap = "tools/gui/images/menubar/object-transform_n";
bitmapAsset = "ToolsModule:object_transform_n_image";
textMargin = "26";
};
new GuiTextEditCtrl() {
@ -1137,7 +1137,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) {
internalName = "objectNode";
};
new GuiBitmapCtrl(){
bitmap = "tools/gui/images/inactive-overlay";
bitmapAsset = "ToolsModule:inactive_overlay_image";
position = "4 45";
extent = "193 42";
tooltip = "A mesh must be selected to edit these properties";
@ -1353,7 +1353,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) {
buttonType = "PushButton";
useMouseEvents = "0";
buttonMargin = "0 4";
iconBitmap = "tools/worldEditor/images/toolbar/material-editor_n";
bitmapAsset = "ToolsModule:material_editor_n_image";
textMargin = "25";
};
new GuiCheckBoxCtrl() {
@ -1393,7 +1393,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) {
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/gui/images/save-icon";
bitmapAsset = "ToolsModule:save_icon_n_image";
};
new GuiBitmapButtonCtrl() {
internalName = "newBtn";
@ -1414,7 +1414,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) {
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/gui/images/new";
bitmapAsset = "ToolsModule:new_n_image";
};
new GuiBitmapButtonCtrl() {
internalName = "deleteBtn";
@ -1435,7 +1435,7 @@ $guiContent = new GuiWindowCollapseCtrl(ShapeEdPropWindow) {
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/gui/images/delete";
bitmapAsset = "ToolsModule:delete_n_image";
};
};
//--- OBJECT WRITE END ---

View file

@ -213,7 +213,7 @@ $guiContent = new GuiControl() {
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
bitmap = "tools/gui/images/folderUp";
bitmapAsset = "ToolsModule:folderUp_image";
};
new GuiPopUpMenuCtrl(ShapeEdSelectMenu) {
canSaveDynamicFields = "0";

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="back_btn_d_image"
imageFile="@assetFile=back_btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="back_btn_h_image"
imageFile="@assetFile=back_btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="back_btn_n_image"
imageFile="@assetFile=back_btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="collision_shape_d_image"
imageFile="@assetFile=collision-shape_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="collision_shape_h_image"
imageFile="@assetFile=collision-shape_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="collision_shape_n_image"
imageFile="@assetFile=collision-shape_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="detail_levels_btn_d_image"
imageFile="@assetFile=detail-levels_btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="detail_levels_btn_h_image"
imageFile="@assetFile=detail-levels_btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="detail_levels_btn_n_image"
imageFile="@assetFile=detail-levels_btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="fwd_btn_d_image"
imageFile="@assetFile=fwd_btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="fwd_btn_h_image"
imageFile="@assetFile=fwd_btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="fwd_btn_n_image"
imageFile="@assetFile=fwd_btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ghost_btn_d_image"
imageFile="@assetFile=ghost_btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ghost_btn_h_image"
imageFile="@assetFile=ghost_btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ghost_btn_n_image"
imageFile="@assetFile=ghost_btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="highlight_material_image"
imageFile="@assetFile=highlight_material.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="object_bounds_d_image"
imageFile="@assetFile=object-bounds_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="object_bounds_h_image"
imageFile="@assetFile=object-bounds_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="object_bounds_n_image"
imageFile="@assetFile=object-bounds_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="object_fit_bounds_d_image"
imageFile="@assetFile=object-fit-bounds_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="object_fit_bounds_h_image"
imageFile="@assetFile=object-fit-bounds_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="object_fit_bounds_n_image"
imageFile="@assetFile=object-fit-bounds_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="pause_btn_d_image"
imageFile="@assetFile=pause_btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="pause_btn_h_image"
imageFile="@assetFile=pause_btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="pause_btn_n_image"
imageFile="@assetFile=pause_btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="pingpong_btn_d_image"
imageFile="@assetFile=pingpong_btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="pingpong_btn_h_image"
imageFile="@assetFile=pingpong_btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="pingpong_btn_n_image"
imageFile="@assetFile=pingpong_btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="playbkwd_btn_d_image"
imageFile="@assetFile=playbkwd_btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="playbkwd_btn_h_image"
imageFile="@assetFile=playbkwd_btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="playbkwd_btn_n_image"
imageFile="@assetFile=playbkwd_btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="playfwd_btn_d_image"
imageFile="@assetFile=playfwd_btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="playfwd_btn_h_image"
imageFile="@assetFile=playfwd_btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="playfwd_btn_n_image"
imageFile="@assetFile=playfwd_btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="seq_bar_in_d_image"
imageFile="@assetFile=seq_bar-in_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="seq_bar_in_h_image"
imageFile="@assetFile=seq_bar-in_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="seq_bar_in_n_image"
imageFile="@assetFile=seq_bar-in_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="seq_bar_out_d_image"
imageFile="@assetFile=seq_bar-out_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="seq_bar_out_h_image"
imageFile="@assetFile=seq_bar-out_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="seq_bar_out_n_image"
imageFile="@assetFile=seq_bar-out_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="show_wireframe_d_image"
imageFile="@assetFile=show-wireframe_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="show_wireframe_h_image"
imageFile="@assetFile=show-wireframe_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="show_wireframe_n_image"
imageFile="@assetFile=show-wireframe_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="shownodes_btn_d_image"
imageFile="@assetFile=shownodes_btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="shownodes_btn_h_image"
imageFile="@assetFile=shownodes_btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="shownodes_btn_n_image"
imageFile="@assetFile=shownodes_btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="stepback_btn_d_image"
imageFile="@assetFile=stepback_btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="stepback_btn_h_image"
imageFile="@assetFile=stepback_btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="stepback_btn_n_image"
imageFile="@assetFile=stepback_btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="stepfwd_btn_d_image"
imageFile="@assetFile=stepfwd_btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="stepfwd_btn_h_image"
imageFile="@assetFile=stepfwd_btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="stepfwd_btn_n_image"
imageFile="@assetFile=stepfwd_btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="sun_btn_d_image"
imageFile="@assetFile=sun-btn_d.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="sun_btn_h_image"
imageFile="@assetFile=sun-btn_h.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="sun_btn_n_image"
imageFile="@assetFile=sun-btn_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="transition_slider_image"
imageFile="@assetFile=transition_slider.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="trigger_marker_image"
imageFile="@assetFile=trigger_marker.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -117,7 +117,7 @@ function ShapeEditorPlugin::onWorldEditorStartup(%this)
// Add ourselves to the ToolsToolbar
%tooltip = "Shape Editor (" @ %accel @ ")";
EditorGui.addToToolsToolbar( "ShapeEditorPlugin", "ShapeEditorPalette", expandFilename("tools/worldEditor/images/toolbar/shape-editor"), %tooltip );
EditorGui.addToToolsToolbar( "ShapeEditorPlugin", "ShapeEditorPalette", "ToolsModule:shape_editor_n_image", %tooltip );
// Add ourselves to the Editor Settings window
exec( "./gui/ShapeEditorSettingsTab.gui" );
@ -148,17 +148,17 @@ function ShapeEditorPlugin::onWorldEditorStartup(%this)
function ShapeEditorPlugin::openShapeAsset(%this, %assetDef)
{
%this.selectedAssetDef = %assetDef;
%this.open(makeRelativePath(%this.selectedAssetDef.getShapeFile()));
%this.open(%this.selectedAssetDef);
}
function ShapeEditorPlugin::openShapeAssetId(%this, %assetId)
{
%this.selectedAssetDef = AssetDatabase.acquireAsset(%assetId);
//%this.selectedAssetDef = %assetDef;
%this.open(makeRelativePath(%this.selectedAssetDef.getShapeFile()));
%this.open(%this.selectedAssetDef);
}
function ShapeEditorPlugin::open(%this, %filename)
function ShapeEditorPlugin::open(%this, %shapeAsset)
{
if ( !%this.isActivated )
{
@ -210,14 +210,14 @@ function ShapeEditorPlugin::open(%this, %filename)
}
// Select the new shape
if (isObject(ShapeEditor.shape) && (ShapeEditor.shape.baseShape $= %filename))
if (isObject(ShapeEditor.shape) && (ShapeEditor.shape.baseShapeAsset $= %shapeAsset))
{
// Shape is already selected => re-highlight the selected material if necessary
ShapeEdMaterials.updateSelectedMaterial(ShapeEdMaterials-->highlightMaterial.getValue());
}
else if (%filename !$= "")
else if (%shapeAsset !$= "")
{
ShapeEditor.selectShape(%filename, ShapeEditor.isDirty());
ShapeEditor.selectShape(%shapeAsset, ShapeEditor.isDirty());
// 'fitToShape' only works after the GUI has been rendered, so force a repaint first
Canvas.repaint();

View file

@ -242,18 +242,22 @@ function ShapeEditor::findConstructor( %this, %path )
return -1;
}
function ShapeEditor::createConstructor( %this, %path )
function ShapeEditor::createConstructor( %this, %assetId )
{
%name = strcapitalise( fileBase( %path ) ) @ strcapitalise( getSubStr( fileExt( %path ), 1, 3 ) );
%name = strreplace( %name, "-", "_" );
%name = strreplace( %name, ".", "_" );
%name = AssetDatabase.getAssetName(%assetId);
//%name = strcapitalise( fileBase( %path ) ) @ strcapitalise( getSubStr( fileExt( %path ), 1, 3 ) );
//%name = strreplace( %name, "-", "_" );
//%name = strreplace( %name, ".", "_" );
%name = getUniqueName( %name );
return new TSShapeConstructor( %name ) { baseShape = %path; };
return new TSShapeConstructor( %name ) { baseShapeAsset = %assetId; };
}
function ShapeEditor::saveConstructor( %this, %constructor )
{
%savepath = filePath( %constructor.baseShape ) @ "/" @ fileBase( %constructor.baseShape ) @ "." @ $TorqueScriptFileExtension;
%assetDef = AssetDatabase.acquireAsset(%constructor.baseShapeAsset);
%savepath = %assetDef.getShapeConstructorFilePath();
AssetDatabase.releaseAsset(%constructor.baseShapeAsset);
new PersistenceManager( shapeEd_perMan );
shapeEd_perMan.setDirty( %constructor, %savepath );
shapeEd_perMan.saveDirtyObject( %constructor );
@ -266,8 +270,9 @@ function ShapeEdSelectWindow::onSelect( %this, %path )
// Prompt user to save the old shape if it is dirty
if ( ShapeEditor.isDirty() )
{
%cmd = "showImportDialog( \"" @ %path @ "\", \"ShapeEditor.selectShape( \\\"" @ %path @ "\\\", ";
toolsMessageBoxYesNoCancel( "Shape Modified", "Would you like to save your changes?", %cmd @ "true );\" );", %cmd @ "false );\" );" );
%cmdY = "showImportDialog( \"" @ %path @ "\", \"ShapeEditor.selectShape( \"" @ %path @ "\", true)\" );";
%cmdN = "showImportDialog( \"" @ %path @ "\", \"ShapeEditor.selectShape( \"" @ %path @ "\", false)\" );";
toolsMessageBoxYesNoCancel( "Shape Modified", "Would you like to save your changes?", %cmdY, %cmdN,"" );
}
else
{
@ -276,7 +281,7 @@ function ShapeEdSelectWindow::onSelect( %this, %path )
}
}
function ShapeEditor::selectShape( %this, %path, %saveOld )
function ShapeEditor::selectShape( %this, %shapeAsset, %saveOld )
{
ShapeEdShapeView.setModel( "" );
@ -288,7 +293,7 @@ function ShapeEditor::selectShape( %this, %path, %saveOld )
else if ( ShapeEditor.isDirty() )
{
// Purge all unsaved changes
%oldPath = ShapeEditor.shape.baseShape;
%oldPath = ShapeEditor.shape.baseShapeAsset;
ShapeEditor.shape.delete();
ShapeEditor.shape = 0;
@ -296,9 +301,9 @@ function ShapeEditor::selectShape( %this, %path, %saveOld )
}
// Initialise the shape preview window
if ( !ShapeEdShapeView.setModel( %path ) )
if ( !ShapeEdShapeView.setShapeAsset( %shapeAsset.getAssetId() ) )
{
toolsMessageBoxOK( "Error", "Failed to load '" @ %path @ "'. Check the console for error messages." );
toolsMessageBoxOK( "Error", "Failed to load '" @ %shapeAsset.getAssetId() @ "'. Check the console for error messages." );
return;
}
ShapeEdShapeView.fitToShape();
@ -307,13 +312,13 @@ function ShapeEditor::selectShape( %this, %path, %saveOld )
ShapeEditor.setDirty( false );
// Get ( or create ) the TSShapeConstructor object for this shape
ShapeEditor.shape = ShapeEditor.findConstructor( %path );
ShapeEditor.shape = findShapeConstructorByAssetId( %shapeAsset.getAssetId() );
if ( ShapeEditor.shape <= 0 )
{
ShapeEditor.shape = %this.createConstructor( %path );
ShapeEditor.shape = %this.createConstructor( %shapeAsset );
if ( ShapeEditor.shape <= 0 )
{
error( "ShapeEditor: Error - could not select " @ %path );
error( "ShapeEditor: Error - could not select " @ %shapeAsset.getAssetId() );
return;
}
}
@ -330,7 +335,7 @@ function ShapeEditor::selectShape( %this, %path, %saveOld )
ShapeEdSelectWindow.updateHints();
// Update editor status bar
EditorGuiStatusBar.setSelection( %path );
EditorGuiStatusBar.setSelection( %shapeAsset.getAssetId() );
}
// Handle a selection in the MissionGroup shape selector
@ -1763,7 +1768,8 @@ function ShapeEdSeqFromMenu::onSelect( %this, %id, %text )
%this.setText( %seqFrom );
// Allow the user to browse for an external source of animation data
getLoadFormatFilename( %this @ ".onBrowseSelect", %this.lastPath );
//getLoadFormatFilename( %this @ ".onBrowseSelect", %this.lastPath );
AssetBrowser.showDialog("ShapeAsset", %this @ ".onBrowseSelect");
}
else
{
@ -1771,12 +1777,17 @@ function ShapeEdSeqFromMenu::onSelect( %this, %id, %text )
}
}
function ShapeEdSeqFromMenu::onBrowseSelect( %this, %path )
function ShapeEdSeqFromMenu::onBrowseSelect( %this, %assetId )
{
%path = makeRelativePath( %path, getMainDotCSDir() );
%this.lastPath = %path;
%this.setText( %path );
ShapeEdSequences.onEditSequenceSource( %path );
//%path = makeRelativePath( %path, getMainDotCSDir() );
//%this.lastPath = %path;
%this.setText( %assetId );
%assetDef = AssetDatabase.acquireAsset(%assetId);
%shapePath = %assetDef.getShapeFile();
AssetDatabase.releaseAsset(%assetId);
ShapeEdSequences.onEditSequenceSource( %shapePath );
}
//------------------------------------------------------------------------------
@ -2170,7 +2181,7 @@ function ShapeEdTriggerList::addItem( %this, %frame, %state )
VertSizing = "bottom";
position = %pos SPC "0";
Extent = "2 12";
bitmap = "tools/shapeEditor/images/trigger_marker";
bitmapAsset = "ToolsModule:trigger_marker_image";
};
ShapeEdAnimWindow.getObject(0).addGuiControl( %ctrl );
%this.triggerId++;
@ -2344,7 +2355,7 @@ function ShapeEdMaterials::editSelectedMaterial( %this )
// materials.
pushInstantGroup();
%this.tempShape = new TSStatic() {
shapeName = ShapeEditor.shape.baseShape;
shapeAsset = ShapeEditor.shape.baseShapeAsset;
collisionType = "None";
};
popInstantGroup();
@ -2888,16 +2899,16 @@ function ShapeEdDetails::onSetObjectNode( %this )
}
}
function ShapeEdDetails::onAddMeshFromFile( %this, %path )
function ShapeEdDetails::onAddMeshFromFile( %this, %assetId )
{
if ( %path $= "" )
if ( %assetId $= "" )
{
getLoadFormatFilename( %this @ ".onAddMeshFromFile", %this.lastPath );
AssetBrowser.showDialog("ShapeAsset", %this @ ".onAddMeshFromFile", "", "", "");
return;
}
%path = makeRelativePath( %path, getMainDotCSDir() );
%this.lastPath = %path;
//%path = makeRelativePath( %path, getMainDotCSDir() );
//%this.lastPath = %path;
// Determine the detail level to use for the new geometry
if ( %this-->addGeomTo.getText() $= "current detail" )
@ -2906,8 +2917,8 @@ function ShapeEdDetails::onAddMeshFromFile( %this, %path )
}
else
{
%base = AssetDatabase.getAssetName(%assetId);
// Check if the file has an LODXXX hint at the end of it
%base = fileBase( %path );
%pos = strstr( %base, "_LOD" );
if ( %pos > 0 )
%size = getSubStr( %base, %pos + 4, strlen( %base ) ) + 0;
@ -2919,7 +2930,7 @@ function ShapeEdDetails::onAddMeshFromFile( %this, %path )
%size++;
}
ShapeEditor.doAddMeshFromFile( %path, %size );
ShapeEditor.doAddMeshFromFile( %assetId, %size );
}
function ShapeEdDetails::onDeleteMesh( %this )
@ -2998,7 +3009,11 @@ function ShapeEditor::autoAddDetails( %this, %dest )
//
// Determine the base name of the input file (MyShape_LOD in the example above)
// and use that to find any other shapes in the set.
%base = fileBase( %dest.baseShape );
%assetDef = AssetDatabase.acquireAsset(%dest.baseShapeAsset);
%shapeFile = %assetDef.getShapeFile();
AssetDatabase.releaseAsset(%dest.baseShapeAsset);
%base = fileBase( %shapeFile );
%pos = strstr( %base, "_LOD" );
if ( %pos < 0 )
{
@ -3010,7 +3025,7 @@ function ShapeEditor::autoAddDetails( %this, %dest )
echo( "Base is: " @ %base );
%filePatterns = filePath( %dest.baseShape ) @ "/" @ %base @ "*" @ fileExt( %dest.baseShape );
%filePatterns = filePath( %shapeFile ) @ "/" @ %base @ "*" @ fileExt( %shapeFile );
echo( "Pattern is: " @ %filePatterns );
@ -3019,7 +3034,7 @@ function ShapeEditor::autoAddDetails( %this, %dest )
{
%fullPath = makeRelativePath( %fullPath, getMainDotCSDir() );
if ( %fullPath !$= %dest.baseShape )
if ( %fullPath !$= %shapeFile )
{
echo( "Found LOD shape file: " @ %fullPath );
@ -3039,15 +3054,19 @@ function ShapeEditor::autoAddDetails( %this, %dest )
}
}
function ShapeEditor::addLODFromFile( %this, %dest, %filename, %size, %allowUnmatched )
function ShapeEditor::addLODFromFile( %this, %dest, %assetId, %size, %allowUnmatched )
{
%assetDef = AssetDatabase.acquireAsset(%assetId);
%csPath = %assetDef.getShapeConstructorFilePath();
%filename = %assetDef.getShapeFile();
AssetDatabase.releaseAsset(%assetId);
// Get (or create) a TSShapeConstructor object for the source shape. Need to
// exec the script manually as the resource may not have been loaded yet
%csPath = filePath( %filename ) @ "/" @ fileBase( %filename ) @ "." @ $TorqueScriptFileExtension;
if ( isFile( %csPath ) )
exec( %csPath );
%source = ShapeEditor.findConstructor( %filename );
%source = findShapeConstructorByAssetId( %assetId );
if ( %source == -1 )
%source = ShapeEditor.createConstructor( %filename );
%source.lodType = "SingleSize";
@ -3055,7 +3074,7 @@ function ShapeEditor::addLODFromFile( %this, %dest, %filename, %size, %allowUnma
// Create a temporary TSStatic to ensure the resource is loaded
%temp = new TSStatic() {
shapeName = %filename;
shapeAsset = %assetId;
collisionType = "None";
};
@ -3256,7 +3275,7 @@ function ShapeEdMountWindow::update_onMountSelectionChanged( %this )
%this-->mountSeq.clear();
%this-->mountSeq.add( "<rootpose>", 0 );
%tss = ShapeEditor.findConstructor( %shapePath );
%tss = findShapeConstructorByFilename( %shapePath );
if ( !isObject( %tss ) )
%tss = ShapeEditor.createConstructor( %shapePath );
if ( isObject( %tss ) )

View file

@ -361,7 +361,7 @@ function ActionAddSequence::doit( %this )
//We adjust due to the list "header" row as well
%idx -= 1;
%animSet = "ShapeEditorPlugin.selectedAssetDef.animationSequence"@%idx@"=\"@Asset="@%moduleName@":"@%assetDef.assetName@"\";";
%animSet = "ShapeEditorPlugin.selectedAssetDef.animationSequence"@%idx@"=\"@asset="@%moduleName@":"@%assetDef.assetName@"\";";
eval(%animSet);
%assetPath = AssetDatabase.getAssetFilePath(ShapeEditorPlugin.selectedAssetId);
@ -1007,10 +1007,10 @@ function ActionRemoveMesh::undo( %this )
//------------------------------------------------------------------------------
// Add meshes from file
function ShapeEditor::doAddMeshFromFile( %this, %filename, %size )
function ShapeEditor::doAddMeshFromFile( %this, %assetId, %size )
{
%action = %this.createAction( ActionAddMeshFromFile, "Add mesh from file" );
%action.filename = %filename;
%action.assetId = %assetId;
%action.size = %size;
%this.doAction( %action );
@ -1018,7 +1018,7 @@ function ShapeEditor::doAddMeshFromFile( %this, %filename, %size )
function ActionAddMeshFromFile::doit( %this )
{
%this.meshList = ShapeEditor.addLODFromFile( ShapeEditor.shape, %this.filename, %this.size, 1 );
%this.meshList = ShapeEditor.addLODFromFile( ShapeEditor.shape, %this.assetId, %this.size, 1 );
if ( %this.meshList !$= "" )
{
%count = getFieldCount( %this.meshList );