Merge branch 'development' into SnapToMenu

This commit is contained in:
Areloch 2019-03-31 14:32:17 -05:00 committed by GitHub
commit 03f6c8c57f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3172 changed files with 419357 additions and 229857 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View file

@ -0,0 +1,18 @@
<AssetImportConfigs>
<Config Name="TestConfig">
<Mesh ImportMesh="1" DoUpAxisOverride="0" UpAxisOverride="Z_AXIS" DoScaleOverride="0" ScaleOverride="1" IgnoreNodeScale="0" AdjustCenter="0" AdjustFloor="1" CollapseSubmeshes="0" LODType="TrailingNumber" ImportedNodes="" IgnoreNodes="" ImportMeshes="" IgnoreMeshes="" />
<Materials ImportMaterials="1" CreateComposites="1" UseDiffuseSuffixOnOriginImg="1" UseExistingMaterials="1" />
<Animations ImportAnimations="1" SeparateAnimations="1" SeparateAnimationPrefix="" />
<Collisions GenerateCollisions="1" GenCollisionType="CollisionMesh" CollisionMeshPrefix="Col" GenerateLOSCollisions="1" GenLOSCollisionType="CollisionMesh" LOSCollisionMeshPrefix="LOS" />
<Images ImageType="N/A" DiffuseTypeSuffixes="_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL" NormalTypeSuffixes="_NORMAL,_NORM" SpecularTypeSuffixes="_SPECULAR,_SPEC" MetalnessTypeSuffixes="_METAL,_MET,_METALNESS,_METALLIC" RoughnessTypeSuffixes="_ROUGH,_ROUGHNESS" SmoothnessTypeSuffixes="_SMOOTH,_SMOOTHNESS" AOTypeSuffixes="_AO,_AMBIENT,_AMBIENTOCCLUSION" CompositeTypeSuffixes="_COMP,_COMPOSITE" TextureFilteringMode="Bilinear" UseMips="1" IsHDR="0" Scaling="1" Compressed="0" GenerateMaterialOnImport="1" PopulateMaterialMaps="1" />
<Sounds VolumeAdjust="1" PitchAdjust="1" Compressed="0" />
</Config>
<Config Name="SecondTest">
<Mesh ImportMesh="1" DoUpAxisOverride="0" UpAxisOverride="Z_AXIS" DoScaleOverride="0" ScaleOverride="1" IgnoreNodeScale="0" AdjustCenter="0" AdjustFloor="0" CollapseSubmeshes="0" LODType="TrailingNumber" ImportedNodes="" IgnoreNodes="" ImportMeshes="" IgnoreMeshes="" />
<Materials ImportMaterials="1" CreateComposites="1" UseDiffuseSuffixOnOriginImg="" UseExistingMaterials="" />
<Animations ImportAnimations="1" SeparateAnimations="1" SeparateAnimationPrefix="" />
<Collisions GenerateCollisions="1" GenCollisionType="CollisionMesh" CollisionMeshPrefix="Col" GenerateLOSCollisions="1" GenLOSCollisionType="CollisionMesh" LOSCollisionMeshPrefix="LOS" />
<Images ImageType="N/A" DiffuseTypeSuffixes="_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL" NormalTypeSuffixes="_NORMAL,_NORM" SpecularTypeSuffixes="_SPECULAR,_SPEC" MetalnessTypeSuffixes="_METAL,_MET,_METALNESS,_METALLIC" RoughnessTypeSuffixes="_ROUGH,_ROUGHNESS" SmoothnessTypeSuffixes="_SMOOTH,_SMOOTHNESS" AOTypeSuffixes="_AO,_AMBIENT,_AMBIENTOCCLUSION" CompositeTypeSuffixes="_COMP,_COMPOSITE" TextureFilteringMode="Bilinear" UseMips="1" IsHDR="0" Scaling="1" Compressed="0" GenerateMaterialOnImport="" PopulateMaterialMaps="" />
<Sounds VolumeAdjust="1" PitchAdjust="1" Compressed="0" />
</Config>
</AssetImportConfigs>

View file

@ -0,0 +1,217 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(GameObjectCreator) {
position = "0 0";
extent = "1024 768";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultNonModalProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
selectedEntity = "20054";
new GuiWindowCtrl(CreateGameObjectWindow) {
text = "Create GameObject";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
closeCommand = "Canvas.popDialog(GameObjectCreator);";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "328 322";
extent = "368 123";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiButtonCtrl(GameObjectCreateBtn) {
text = "Done";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "224 92";
extent = "64 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser_importAssetWindow.ImportAssets();";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "292 92";
extent = "64 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "Canvas.popDialog(GameObjectCreator);";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl(GameObjectCreatorObjectName) {
text = "Game Object Name:";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 60";
extent = "116 17";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Target Module:";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 30";
extent = "116 17";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(GameObjectCreatorPkgBtn) {
bitmap = "tools/gui/images/iconAdd.png";
bitmapMode = "Centered";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "342 27";
extent = "22 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "Canvas.pushDialog(AssetBrowser_addModule);\nAssetBrowser_addModuleWindow.selectWindow();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiPopUpMenuCtrlEx(GameObjectModuleList) {
maxPopupHeight = "200";
sbUsesNAColor = "0";
reverseTextList = "0";
bitmapBounds = "16 16";
hotTrackCallback = "0";
text = "Characters";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "134 27";
extent = "204 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl(GameObjectCreatorName) {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "116 60";
extent = "234 18";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextEditProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,142 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(AssetBrowser_AddModule) {
position = "0 0";
extent = "1024 768";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultNonModalProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
Enabled = "1";
new GuiWindowCtrl(AssetBrowser_addModuleWindow) {
text = "Create New Module";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "362 334";
extent = "299 99";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
hidden = "0";
canSave = "1";
canSaveDynamicFields = "0";
new GuiTextEditCtrl() {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "88 35";
extent = "196 18";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiTextEditProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
internalName = "ModuleName";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Module Name";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 35";
extent = "72 16";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Create";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "88 68";
extent = "126 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser_addModuleWindow.CreateNewModule();";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "220 68";
extent = "64 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser_addModuleWindow.Close();";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,142 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(AssetBrowser_AddPackage) {
position = "0 0";
extent = "1024 768";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultNonModalProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
Enabled = "1";
new GuiWindowCtrl(AssetBrowser_addPackageWindow) {
text = "Create New Package";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "362 334";
extent = "299 99";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
hidden = "0";
canSave = "1";
canSaveDynamicFields = "0";
new GuiTextEditCtrl() {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "88 35";
extent = "196 18";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiTextEditProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
internalName = "PackageName";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Package Name";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 35";
extent = "72 16";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Create";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "88 68";
extent = "126 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser_addPackageWindow.CreateNewPackage();";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "220 68";
extent = "64 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser_addPackageWindow.Close();";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,934 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(AssetBrowser) {
position = "0 0";
extent = "1024 768";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultNonModalProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
AddNewArtAssetPopup = "18801";
AddNewAssetPopup = "18802";
AddNewScriptAssetPopup = "18800";
currentPreviewPage = "0";
enabled = "1";
importAssetFinalListArray = "20465";
importAssetNewListArray = "20463";
importAssetUnprocessedListArray = "20464";
totalPages = "1";
new GuiWindowCtrl(AssetBrowser_addFilterWindow) {
text = "Create New Tag";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "321 334";
extent = "381 99";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "0";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
hidden = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiTextEditCtrl() {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "64 35";
extent = "196 18";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiTextEditProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
internalName = "tagName";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Tag Name";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 35";
extent = "52 16";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Create";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "64 68";
extent = "126 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser.createFilter( AssetBrowser_addFilterWindow-->tagName.getText() );AssetBrowser_addFilterWindow.setVisible(0);";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "196 68";
extent = "64 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser_addFilterWindow.setVisible(0);";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
new GuiWindowCtrl(AssetBrowserWindow) {
text = "Asset Browser";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
closeCommand = "AssetBrowser::hideDialog();";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "256 107";
extent = "512 554";
minExtent = "383 274";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiButtonCtrl(CreateAssetButton) {
text = "New";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "3 22";
extent = "45 19";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl(ImportAssetButton) {
text = "Import";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "50 22";
extent = "45 19";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiWindowCtrl(TagFilterWindow) {
text = "New Window";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
edgeSnap = "1";
docking = "None";
margin = "4 4 4 4";
padding = "0 0 0 0";
anchorTop = "0";
anchorBottom = "0";
anchorLeft = "0";
anchorRight = "0";
position = "129 62";
extent = "161 250";
minExtent = "161 86";
horizSizing = "windowRelative";
vertSizing = "windowRelative";
profile = "ToolsGuiToolbarWindowProfile";
visible = "0";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "VisibilityLayerWindow";
hidden = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiScrollCtrl() {
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
lockHorizScroll = "1";
lockVertScroll = "0";
constantThumbHeight = "0";
childMargin = "2 0";
mouseWheelScrollSpeed = "-1";
docking = "Client";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "1 9";
extent = "159 238";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "ToolsGuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiStackControl(TagFilterList) {
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "-2";
dynamicSize = "1";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "1";
changeChildPosition = "1";
position = "3 1";
extent = "153 16";
minExtent = "16 16";
horizSizing = "width";
vertSizing = "bottom";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "theVisOptionsList";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
new GuiSplitContainer() {
orientation = "Vertical";
splitterSize = "2";
splitPoint = "149 100";
fixedPanel = "None";
fixedSize = "356";
docking = "None";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "3 42";
extent = "505 509";
minExtent = "64 64";
horizSizing = "relative";
vertSizing = "height";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiPanel() {
docking = "Client";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 0";
extent = "147 509";
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "Panel1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiContainer() {
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 0";
extent = "147 31";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "bottom";
profile = "inspectorStyleRolloutDarkProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiTextCtrl() {
text = "Filters";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "5 0";
extent = "30 16";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/iconNew.png";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "113 1";
extent = "15 15";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "AssetBrowser.viewTagsFilter();";
tooltipProfile = "GuiToolTipProfile";
tooltip = "Show assets grouped and filtered via tags.";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/iconList.png";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "130 1";
extent = "15 15";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "AssetBrowser.viewListFilter();";
tooltipProfile = "GuiToolTipProfile";
tooltip = "Views assets via module-oriented list tree.";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
new GuiContainer() {
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 17";
extent = "147 493";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiScrollCtrl() {
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
lockHorizScroll = "1";
lockVertScroll = "0";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
docking = "Client";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 0";
extent = "147 493";
minExtent = "8 8";
horizSizing = "width";
vertSizing = "height";
profile = "GuiEditorScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiDefaultProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiTreeViewCtrl(AssetBrowserFilterTree) {
tabSize = "16";
textOffset = "2";
fullRowSelect = "0";
itemHeight = "21";
destroyTreeOnSleep = "1";
mouseDragging = "1";
multipleSelections = "1";
deleteObjectAllowed = "1";
dragToItemAllowed = "1";
clearAllOnSingleSelection = "1";
showRoot = "1";
useInspectorTooltips = "0";
tooltipOnWidthOnly = "0";
showObjectIds = "1";
showClassNames = "1";
showObjectNames = "1";
showInternalNames = "1";
showClassNameForUnnamedObjects = "0";
compareToObjectID = "1";
canRenameObjects = "1";
renameInternal = "0";
position = "1 1";
extent = "145 294";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiTreeViewProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "filterTree";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
};
new GuiPanel() {
docking = "Client";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "151 0";
extent = "354 509";
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "panel2";
canSave = "1";
canSaveDynamicFields = "0";
new GuiContainer() {
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "1 0";
extent = "354 41";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "bottom";
profile = "inspectorStyleRolloutDarkProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/new";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "42 22";
extent = "15 15";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
command = "AssetBrowser.createNewAsset();";
tooltipProfile = "GuiToolTipProfile";
tooltip = "Create New Asset";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/delete";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "23 22";
extent = "15 15";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
command = "AssetBrowser.showDeleteDialog();";
tooltipProfile = "GuiToolTipProfile";
tooltip = "Delete Asset";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl(AssetBrowserSearchFilter) {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
text = "\c2Filter...";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "62 19";
extent = "273 18";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "bottom";
profile = "ToolsGuiTextEditProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
class = "AssetBrowserSearchFilterText";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(TagFilterButton) {
bitmap = "tools/gui/images/visible";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "4 19";
extent = "20 20";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "AssetBrowser.toggleTagFilterPopup();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Assets";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "5 0";
extent = "53 16";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/delete";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "337 22";
extent = "15 15";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
command = "AssetBrowser.showDeleteDialog();";
tooltipProfile = "GuiToolTipProfile";
tooltip = "Delete Asset";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
new GuiContainer() {
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "1";
position = "1 40";
extent = "354 468";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiScrollCtrl(AssetListPanel) {
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
lockHorizScroll = "1";
lockVertScroll = "0";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
docking = "Client";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 0";
extent = "354 448";
minExtent = "8 8";
horizSizing = "width";
vertSizing = "height";
profile = "GuiEditorScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiDefaultProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiStackControl() {
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "0";
dynamicSize = "1";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "1";
changeChildPosition = "0";
position = "1 1";
extent = "352 254";
minExtent = "16 16";
horizSizing = "width";
vertSizing = "bottom";
profile = "ToolsGuiModelessDialogProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiControl() {
position = "0 0";
extent = "352 4";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiDynamicCtrlArrayControl() {
colCount = "3";
colSize = "100";
rowCount = "2";
rowSize = "124";
rowSpacing = "2";
colSpacing = "2";
frozen = "0";
autoCellSize = "1";
fillRowFirst = "1";
dynamicSize = "1";
padding = "0 0 0 0";
position = "3 4";
extent = "352 250";
minExtent = "8 8";
horizSizing = "width";
vertSizing = "bottom";
profile = "ToolsGuiDefaultNonModalProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "materialSelection";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
new GuiContainer() {
docking = "Bottom";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 448";
extent = "354 20";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "materialPreviewControlContainer";
canSave = "1";
canSaveDynamicFields = "0";
};
};
new GuiButtonCtrl() {
text = "Select";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "242 491";
extent = "53 19";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "top";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser.selectAsset( AssetBrowser.selectedAsset );";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
internalName = "SelectButton";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "300 491";
extent = "52 19";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "top";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser.hideDialog();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,613 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(AssetImportCtrl) {
position = "0 0";
extent = "1440 900";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
new GuiWindowCtrl(ImportAssetOptionsWindow) {
text = "Import Options";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "633 358";
extent = "346 409";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "0";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
hidden = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiButtonCtrl() {
text = "Done";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "271 377";
extent = "64 22";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "top";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "ImportAssetOptionsWindow.saveAssetOptions();";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiScrollCtrl() {
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "dynamic";
lockHorizScroll = "0";
lockVertScroll = "0";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "9 26";
extent = "326 344";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "GuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiVariableInspector(ImportOptionsList) {
dividerMargin = "5";
showCustomFields = "1";
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "1";
dynamicSize = "1";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "1";
changeChildPosition = "1";
position = "1 1";
extent = "309 64";
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
new GuiWindowCtrl(ImportAssetConfigEditorWindow) {
text = "Import Options Config";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "562 251";
extent = "376 503";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "0";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
hidden = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiTextCtrl() {
text = "Configuration Name:";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "10 26";
extent = "100 17";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl(AssetImportConfigName) {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "113 25";
extent = "250 18";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "bottom";
profile = "GuiTextEditProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Done";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "301 471";
extent = "64 22";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "top";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "ImportAssetConfigEditorWindow.saveAssetOptionsConfig();";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiScrollCtrl() {
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "dynamic";
lockHorizScroll = "0";
lockVertScroll = "0";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "9 50";
extent = "356 414";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "GuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiVariableInspector(ImportOptionsConfigList) {
dividerMargin = "5";
showCustomFields = "1";
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "1";
dynamicSize = "1";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "1";
changeChildPosition = "1";
position = "1 1";
extent = "339 64";
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
new GuiWindowCtrl(ImportAssetWindow) {
text = "Import Assets";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "536 205";
extent = "368 502";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiButtonCtrl() {
text = "Done";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "224 470";
extent = "64 22";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "top";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "ImportAssetWindow.ImportAssets();";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "292 470";
extent = "64 22";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "top";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "Canvas.popDialog();";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Target Module:";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 30";
extent = "116 17";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiPopUpMenuCtrlEx(ImportAssetModuleList) {
maxPopupHeight = "200";
sbUsesNAColor = "0";
reverseTextList = "0";
bitmapBounds = "16 16";
hotTrackCallback = "0";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "134 27";
extent = "204 22";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/iconAdd.png";
bitmapMode = "Centered";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "342 27";
extent = "22 22";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "Canvas.pushDialog(AssetBrowser_addModule);\nAssetBrowser_addModuleWindow.selectWindow();";
tooltipProfile = "GuiToolTipProfile";
tooltip = "New Module";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Import Options Config:";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 56";
extent = "116 17";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiPopUpMenuCtrlEx(ImportAssetConfigList) {
maxPopupHeight = "200";
sbUsesNAColor = "0";
reverseTextList = "0";
bitmapBounds = "16 16";
hotTrackCallback = "0";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "126 53";
extent = "175 22";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/iconAdd.png";
bitmapMode = "Centered";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "305 53";
extent = "15 22";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "ImportAssetConfigEditorWindow.addNewConfig();";
tooltipProfile = "GuiToolTipProfile";
tooltip = "New Config";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/iconInformation.png";
bitmapMode = "Centered";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "325 53";
extent = "15 22";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "ImportAssetConfigEditorWindow.editConfig();";
tooltipProfile = "GuiToolTipProfile";
tooltip = "Edit Config";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/iconDelete.png";
bitmapMode = "Centered";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "346 53";
extent = "15 22";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "ImportAssetConfigEditorWindow.deleteConfig();";
tooltipProfile = "GuiToolTipProfile";
tooltip = "Delete Config";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiScrollCtrl() {
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "dynamic";
lockHorizScroll = "0";
lockVertScroll = "0";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "9 82";
extent = "348 381";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "GuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiStackControl(ImportingAssetList) {
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "0";
dynamicSize = "1";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "0";
changeChildPosition = "1";
position = "1 1";
extent = "345 20";
minExtent = "16 16";
horizSizing = "width";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,147 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(AssetBrowser_editAsset) {
position = "0 0";
extent = "1920 1080";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultNonModalProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
enabled = "1";
new GuiWindowCtrl(AssetBrowser_editAssetWindow) {
text = "Asset Properties";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "1";
canMaximize = "0";
canCollapse = "0";
closeCommand = "Canvas.popDialog(AssetBrowser_editAsset);";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "710 375";
extent = "500 329";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiScrollCtrl() {
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
lockHorizScroll = "0";
lockVertScroll = "0";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "1 21";
extent = "498 283";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiInspector(AssetEditInspector) {
dividerMargin = "5";
showCustomFields = "1";
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "1";
dynamicSize = "1";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "1";
changeChildPosition = "1";
position = "1 1";
extent = "481 101";
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiInspectorProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
};
new GuiButtonCtrl() {
text = "Save";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "402 305";
extent = "45 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser_editAsset.saveAsset();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "450 305";
extent = "45 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiButtonProfile";
visible = "1";
active = "1";
command = "Canvas.popDialog(AssetBrowser_editAsset);";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,147 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(AssetBrowser_editModule) {
position = "0 0";
extent = "1920 1080";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultNonModalProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
enabled = "1";
new GuiWindowCtrl(AssetBrowser_editModuleWindow) {
text = "Module Properties";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "1";
canMaximize = "0";
canCollapse = "0";
closeCommand = "Canvas.popDialog(AssetBrowser_editModule);";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "710 375";
extent = "500 329";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiScrollCtrl() {
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
lockHorizScroll = "0";
lockVertScroll = "0";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "1 21";
extent = "498 283";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiInspector(ModuleEditInspector) {
dividerMargin = "5";
showCustomFields = "1";
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "1";
dynamicSize = "1";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "1";
changeChildPosition = "1";
position = "1 1";
extent = "481 101";
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiInspectorProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
};
new GuiButtonCtrl() {
text = "Save";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "402 305";
extent = "45 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser_editModule.saveModule();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "450 305";
extent = "45 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiButtonProfile";
visible = "1";
active = "1";
command = "Canvas.popDialog(AssetBrowser_editModule);";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,237 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(AssetBrowser_newAsset) {
position = "0 0";
extent = "1024 768";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultNonModalProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
new GuiWindowCtrl(AssetBrowser_newAssetWindow) {
text = "Create Asset";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
closeCommand = "Canvas.popDialog(AssetBrowser_newAsset);";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "328 140";
extent = "368 450";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiButtonCtrl(NewAssetCreateBtn) {
text = "Done";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "227 419";
extent = "64 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "CreateNewAsset();";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "295 419";
extent = "64 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "AssetBrowser_newAssetWindow.onClose();";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Target Module:";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 30";
extent = "116 17";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiPopUpMenuCtrlEx(NewAssetModuleList) {
maxPopupHeight = "200";
sbUsesNAColor = "0";
reverseTextList = "0";
bitmapBounds = "16 16";
hotTrackCallback = "0";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "134 27";
extent = "204 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
class = "AssetBrowserModuleList";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(NewAssetModuleBtn) {
bitmap = "tools/gui/images/iconAdd.png";
bitmapMode = "Centered";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "342 27";
extent = "22 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "Canvas.pushDialog(AssetBrowser_AddModule);\nAssetBrowser_addModuleWindow.selectWindow();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiControl(NewComponentAssetSettings) {
position = "12 120";
extent = "344 107";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiScrollCtrl() {
willFirstRespond = "1";
hScrollBar = "alwaysOn";
vScrollBar = "alwaysOn";
lockHorizScroll = "0";
lockVertScroll = "0";
constantThumbHeight = "0";
childMargin = "0 0";
mouseWheelScrollSpeed = "-1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "7 56";
extent = "354 357";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiVariableInspector(NewAssetPropertiesInspector) {
dividerMargin = "5";
showCustomFields = "1";
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "1";
dynamicSize = "1";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "1";
changeChildPosition = "1";
position = "1 1";
extent = "337 338";
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,434 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(AssetBrowser_newComponentAsset) {
position = "0 0";
extent = "1024 768";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultNonModalProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
new GuiWindowCtrl(AssetBrowser_newComponentAssetWindow) {
text = "Create Component";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
closeCommand = "Canvas.popDialog(AssetBrowser_newComponentAsset);";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "328 250";
extent = "368 268";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiTextCtrl() {
text = "Target Module:";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 30";
extent = "116 17";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiPopUpMenuCtrlEx() {
maxPopupHeight = "200";
sbUsesNAColor = "0";
reverseTextList = "0";
bitmapBounds = "16 16";
hotTrackCallback = "0";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "134 27";
extent = "204 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "NewComponentModuleList";
class = "AssetBrowserModuleList";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/iconAdd.png";
bitmapMode = "Centered";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "342 27";
extent = "22 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "Canvas.pushDialog(AssetBrowser_AddModule);\nAssetBrowser_addModuleWindow.selectWindow();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
internalName = "NewComponentModuleBtn";
class = "NewAssetModuleBtn";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Component Name:";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 83";
extent = "116 17";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl(NewComponentName) {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "134 83";
extent = "203 18";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextEditProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Parent Component:";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 57";
extent = "116 17";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiPopUpMenuCtrlEx(ParentComponentList) {
maxPopupHeight = "200";
sbUsesNAColor = "0";
reverseTextList = "0";
bitmapBounds = "16 16";
hotTrackCallback = "0";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "134 54";
extent = "204 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
command = "NewAssetTypeList.onSelected();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl(NewComponentFriendlyName) {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "134 109";
extent = "203 18";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextEditProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Friendly Name:";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 109";
extent = "116 17";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextEditCtrl(NewComponentGroup) {
historySize = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "134 134";
extent = "203 18";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextEditProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
text = "Component Group:";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 134";
extent = "116 17";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiContainer() {
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "134 159";
extent = "203 64";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiMLTextEditCtrl(NewComponentDescription) {
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
useURLMouseCursor = "0";
position = "1 0";
extent = "201 64";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiTextEditProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
new GuiTextCtrl() {
text = "Description:";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "12 159";
extent = "116 17";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Done";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "224 240";
extent = "64 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "createNewComponentAsset();";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "292 240";
extent = "64 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "Canvas.popDialog(AssetBrowser_newComponentAsset);";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,144 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(AssetBrowser_SelectModule) {
position = "0 0";
extent = "1024 768";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultNonModalProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
enabled = "1";
new GuiWindowCtrl(AssetBrowser_SelectModuleWindow) {
text = "Select Module";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "362 334";
extent = "299 99";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiPopUpMenuCtrlEx() {
maxPopupHeight = "200";
sbUsesNAColor = "0";
reverseTextList = "0";
bitmapBounds = "16 16";
hotTrackCallback = "0";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "39 34";
extent = "217 19";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
class = "AssetBrowserModuleList";
internalName = "ModuleList";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/iconAdd.png";
bitmapMode = "Centered";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "260 32";
extent = "22 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
class = "SelectPackage_NewAssetModuleBtn";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Select";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "88 68";
extent = "126 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "Canvas.popDialog(AssetBrowser_SelectModule);";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "220 68";
extent = "64 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "Canvas.popDialog(AssetBrowser_addModule);";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,144 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(AssetBrowser_SelectPackage) {
position = "0 0";
extent = "1024 768";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultNonModalProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
enabled = "1";
new GuiWindowCtrl(AssetBrowser_SelectPackageWindow) {
text = "Select Package";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "0";
canMaximize = "0";
canCollapse = "0";
edgeSnap = "1";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "362 334";
extent = "299 99";
minExtent = "48 92";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
visible = "1";
active = "1";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiPopUpMenuCtrlEx() {
maxPopupHeight = "200";
sbUsesNAColor = "0";
reverseTextList = "0";
bitmapBounds = "16 16";
hotTrackCallback = "0";
maxLength = "1024";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "39 34";
extent = "217 19";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
class = "AssetBrowserPackageList";
internalName = "PackageList";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/iconAdd.png";
bitmapMode = "Centered";
autoFitExtents = "0";
useModifiers = "0";
useStates = "1";
masked = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "260 32";
extent = "22 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
class = "SelectPackage_NewAssetPackageBtn";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Select";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "88 68";
extent = "126 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "Canvas.popDialog(AssetBrowser_SelectPackage);";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl() {
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "220 68";
extent = "64 22";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiButtonProfile";
visible = "1";
active = "1";
command = "Canvas.popDialog(AssetBrowser_addPackage);";
tooltipProfile = "ToolsGuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -0,0 +1,70 @@
//-----------------------------------------------------------------------------
// 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.
//-----------------------------------------------------------------------------
if( !isObject( ToolsGuiDefaultNonModalProfile ) )
new GuiControlProfile (ToolsGuiDefaultNonModalProfile : ToolsGuiDefaultProfile)
{
modal = false;
};
function initializeAssetBrowser()
{
echo(" % - Initializing Asset Browser");
exec("./guis/assetBrowser.gui");
exec("./guis/addModuleWindow.gui");
exec("./guis/gameObjectCreator.gui");
exec("./guis/newAsset.gui");
exec("./guis/newComponentAsset.gui");
exec("./guis/editAsset.gui");
exec("./guis/assetImport.gui");
exec("./guis/selectModule.gui");
exec("./guis/editModule.gui");
exec("./scripts/assetBrowser.cs");
exec("./scripts/popupMenus.cs");
exec("./scripts/addModuleWindow.cs");
exec("./scripts/assetImport.cs");
exec("./scripts/assetImportConfig.cs");
exec("./scripts/gameObjectCreator.cs");
exec("./scripts/newAsset.cs");
exec("./scripts/editAsset.cs");
exec("./scripts/editModule.cs");
exec("./scripts/fieldTypes.cs");
new ScriptObject( AssetBrowserPlugin )
{
superClass = "EditorPlugin";
};
Input::GetEventManager().subscribe( AssetBrowser, "BeginDropFiles" );
Input::GetEventManager().subscribe( AssetBrowser, "DropFile" );
Input::GetEventManager().subscribe( AssetBrowser, "EndDropFiles" );
AssetBrowser.buildPopupMenus();
}
function AssetBrowserPlugin::onWorldEditorStartup( %this )
{
// Add ourselves to the toolbar.
AssetBrowser.addToolbarButton();
}

View file

@ -0,0 +1,112 @@
//-----------------------------------------------------------------------------
// 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 AssetBrowser_addModuleWindow::onGainFirstResponder(%this)
{
%this-->moduleName.setFirstResponder();
}
function AssetBrowser_addModuleWindow::close()
{
Canvas.popDialog(AssetBrowser_addModule);
eval(AssetBrowser_addModuleWindow.callbackFunction);
}
function AssetBrowser_addModuleWindow::CreateNewModule(%this)
{
%newModuleName = %this-->moduleName.getText();
if(%newModuleName $= "")
return;
echo("Creating a new Module named: " @ %newModuleName);
%moduleFilePath = "data/" @ %newModuleName;
%moduleDefinitionFilePath = %moduleFilePath @ "/" @ %newModuleName @ ".module";
%moduleScriptFilePath = %moduleFilePath @ "/" @ %newModuleName @ ".cs";
%newModule = new ModuleDefinition()
{
ModuleId = %newModuleName;
versionId = 1;
ScriptFile = %newModuleName @ ".cs";
CreateFunction="onCreate";
DestroyFunction="onDestroy";
Group = "Game";
new DeclaredAssets()
{
Extension = "asset.taml";
Recurse = true;
};
};
TAMLWrite(%newModule, %moduleDefinitionFilePath);
//Now generate the script file for it
%file = new FileObject();
if(%file.openForWrite(%moduleScriptFilePath))
{
%file.writeline("function " @ %newModuleName @ "::onCreate(%this)\n{\n\n}\n");
%file.writeline("function " @ %newModuleName @ "::onDestroy(%this)\n{\n\n}\n");
//todo, pre-write any event functions of interest
%file.close();
}
//force a refresh of our modules list
ModuleDatabase.ignoreLoadedGroups(true);
ModuleDatabase.scanModules();
%success = ModuleDatabase.loadExplicit(%newModuleName, 1);
ModuleDatabase.ignoreLoadedGroups(false);
//force a reload of the Module lists
NewAssetModuleList.refresh();
GameObjectModuleList.refresh();
ImportAssetModuleList.refresh();
AssetBrowser.newModuleId = %newModuleName;
Canvas.popDialog(AssetBrowser_addModule);
eval(AssetBrowser_addModuleWindow.callbackFunction);
}
function AssetBrowserModuleList::onWake(%this)
{
%this.refresh();
}
function AssetBrowserModuleList::refresh(%this)
{
%this.clear();
//First, get our list of modules
%moduleList = ModuleDatabase.findModules();
%count = getWordCount(%moduleList);
for(%i=0; %i < %count; %i++)
{
%moduleName = getWord(%moduleList, %i);
%this.add(%moduleName.ModuleId, %i);
}
}

View file

@ -0,0 +1,110 @@
//-----------------------------------------------------------------------------
// 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 AssetBrowser_addPackageWindow::onGainFirstResponder(%this)
{
%this-->packageName.setFirstResponder();
}
function AssetBrowser_addPackageWindow::close()
{
Canvas.popDialog(AssetBrowser_addPackage);
eval(AssetBrowser_addPackageWindow.callbackFunction);
}
function AssetBrowser_addPackageWindow::CreateNewPackage(%this)
{
%newPackageName = %this-->packageName.getText();
if(%newPackageName $= "")
return;
echo("Creating a new package named: " @ %newPackageName);
%moduleFilePath = "data/" @ %newPackageName;
%moduleDefinitionFilePath = %moduleFilePath @ "/" @ %newPackageName @ ".module";
%moduleScriptFilePath = %moduleFilePath @ "/" @ %newPackageName @ ".cs";
%newPackage = new ModuleDefinition()
{
ModuleId = %newPackageName;
versionId = 1;
ScriptFile = %newPackageName @ ".cs";
CreateFunction="onCreate";
DestroyFunction="onDestroy";
Group = "Game";
new DeclaredAssets()
{
Extension = "asset.taml";
Recurse = true;
};
};
TAMLWrite(%newPackage, %moduleDefinitionFilePath);
//Now generate the script file for it
%file = new FileObject();
if(%file.openForWrite(%moduleScriptFilePath))
{
%file.writeline("function " @ %newPackageName @ "::onCreate(%this)\n{\n\n}\n");
%file.writeline("function " @ %newPackageName @ "::onDestroy(%this)\n{\n\n}\n");
//todo, pre-write any event functions of interest
%file.close();
}
//force a refresh of our modules list
ModuleDatabase.ignoreLoadedGroups(true);
ModuleDatabase.scanModules();
%success = ModuleDatabase.loadExplicit(%newPackageName, 1);
ModuleDatabase.ignoreLoadedGroups(false);
//force a reload of the package lists
NewAssetPackageList.refresh();
GameObjectPackageList.refresh();
ImportAssetPackageList.refresh();
Canvas.popDialog(AssetBrowser_addPackage);
eval(AssetBrowser_addPackageWindow.callbackFunction);
}
function AssetBrowserPackageList::onWake(%this)
{
%this.refresh();
}
function AssetBrowserPackageList::refresh(%this)
{
%this.clear();
//First, get our list of modules
%moduleList = ModuleDatabase.findModules();
%count = getWordCount(%moduleList);
for(%i=0; %i < %count; %i++)
{
%moduleName = getWord(%moduleList, %i);
%this.add(%moduleName.ModuleId, %i);
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,472 @@
function ImportAssetConfigList::onSelect( %this, %id, %text )
{
//Apply our settings to the assets
echo("Changed our import config!");
AssetBrowser.importAssetUnprocessedListArray.empty();
AssetBrowser.importAssetUnprocessedListArray.duplicate(AssetBrowser.importAssetNewListArray);
AssetBrowser.importAssetFinalListArray.empty();
ImportAssetWindow.activeImportConfigIndex = %id;
ImportAssetWindow.activeImportConfig = ImportAssetWindow.importConfigsList.getKey(%id);
ImportAssetWindow.refresh();
}
function ImportAssetOptionsWindow::findMissingFile(%this, %assetItem)
{
if(%assetItem.assetType $= "Model")
%filters = "Shape Files(*.dae, *.cached.dts)|*.dae;*.cached.dts";
else if(%assetItem.assetType $= "Image")
%filters = "Images Files(*.jpg,*.png,*.tga,*.bmp,*.dds)|*.jpg;*.png;*.tga;*.bmp;*.dds";
%dlg = new OpenFileDialog()
{
Filters = %filters;
DefaultPath = $Pref::WorldEditor::LastPath;
DefaultFile = "";
ChangePath = true;
OverwritePrompt = true;
forceRelativePath = false;
//MultipleFiles = true;
};
%ret = %dlg.Execute();
if ( %ret )
{
$Pref::WorldEditor::LastPath = filePath( %dlg.FileName );
%fullPath = %dlg.FileName;//makeRelativePath( %dlg.FileName, getMainDotCSDir() );
}
%dlg.delete();
if ( !%ret )
return;
%assetItem.filePath = %fullPath;
ImportAssetWindow.refresh();
}
//
function ImportAssetOptionsWindow::editImportSettings(%this, %assetItem)
{
ImportAssetOptionsWindow.setVisible(1);
ImportAssetOptionsWindow.selectWindow();
ImportOptionsList.clearFields();
%assetType = %assetItem.assetType;
%filePath = %assetItem.filePath;
%assetName = %assetItem.assetName;
%assetConfigObj = %assetItem.importConfig;
ImportOptionsList.startGroup("Asset");
ImportOptionsList.addField("AssetName", "Asset Name", "string", "", "NewAsset", "", %assetItem);
ImportOptionsList.endGroup();
if(%assetType $= "Model")
{
//Get the shape info, so we know what we're doing with the mesh
%shapeInfo = GetShapeInfo(%filePath);
%meshItem = %shapeInfo.findItemByName("Meshes");
%matItem = %shapeInfo.findItemByName("Materials");
%meshCount = %shapeInfo.getItemValue(%meshItem);
%matCount = %shapeInfo.getItemValue(%matItem);
%firstMat = %shapeInfo.getChild(%matItem);
echo("Mesh's first material texture path is: " @ %shapeInfo.getItemValue(%firstMat));
if(%meshCount > 0)
{
ImportOptionsList.startGroup("Mesh");
ImportOptionsList.addField("AutogenCollisions", "Auto-gen Collisions", "bool", "", "0", "", %assetConfigObj);
ImportOptionsList.addField("CollapseSubmeshes", "Collapse Submeshes", "bool", "", "0", "", %assetConfigObj);
ImportOptionsList.addField("UpAxisOverride", "Up-Axis Override", "list", "", "Z_AXIS", "Z_AXIS,Y_AXIS,X_AXIS", %assetConfigObj);
ImportOptionsList.addField("OverrideScale", "Override Scale", "float", "", "1.0", "", %assetConfigObj);
ImportOptionsList.addField("IgnoreNodeScale", "IgnoreNodeScaling", "bool", "", "0", "", %assetConfigObj);
ImportOptionsList.addField("AdjustCenter", "Adjust Center", "bool", "", "0", "", %assetConfigObj);
ImportOptionsList.addField("CollapseSubmeshes", "Collapse Submeshes", "bool", "", "0", "", %assetConfigObj);
ImportOptionsList.addField("AdjustFloor", "Adjust Floor", "bool", "", "0", "", %assetConfigObj);
ImportOptionsList.addField("LODType", "LOD Type", "list", "", "TrailingNumber", "TrailingNumber,DetectDTS", %assetConfigObj);
ImportOptionsList.endGroup();
}
if(%matItem > 0)
{
ImportOptionsList.startGroup("Material");
ImportOptionsList.addCallbackField("ImportMaterials", "Import Materials", "bool", "", "1", "", "ImportMaterialsChanged", %assetConfigObj);
ImportOptionsList.addField("UseExistingMaterials", "Use Existing Materials", "bool", "", "1", "", %assetConfigObj);
ImportOptionsList.endGroup();
}
}
else if(%assetType $= "Material")
{
ImportOptionsList.startGroup("Material");
ImportOptionsList.addField("CreateComposites", "Create Composite Textures", "bool", "", "1", "", %assetConfigObj);
ImportOptionsList.endGroup();
}
else if(%assetType $= "Image")
{
ImportOptionsList.startGroup("Formatting");
ImportOptionsList.addField("ImageType", "Image Type", "string", "", "Diffuse", "", %assetConfigObj);
ImportOptionsList.addField("TextureFiltering", "Texture Filtering", "list", "", "Bilinear", "None,Bilinear,Trilinear", %assetConfigObj);
ImportOptionsList.addField("UseMips", "Use Mips", "bool", "", "1", "", %assetConfigObj);
ImportOptionsList.addField("IsHDR", "Is HDR", "bool", "", "0", "", %assetConfigObj);
ImportOptionsList.endGroup();
ImportOptionsList.startGroup("Scaling");
ImportOptionsList.addField("Scaling", "Scaling", "float", "", "1.0", "", %assetConfigObj);
ImportOptionsList.endGroup();
ImportOptionsList.startGroup("Compression");
ImportOptionsList.addField("IsCompressed", "Is Compressed", "bool", "", "1", "", %assetConfigObj);
ImportOptionsList.endGroup();
ImportOptionsList.startGroup("Material");
ImportOptionsList.addField("GenerateMaterialOnImport", "Generate Material On Import", "bool", "", "1", "", %optionsObj);
ImportOptionsList.addField("PopulateMaterialMaps", "Populate Material Maps", "bool", "", "1", "", %optionsObj);
ImportOptionsList.addField("UseDiffuseSuffixOnOriginImg", "Use Diffuse Suffix for Origin Image", "bool", "", "1", "", %optionsObj);
ImportOptionsList.addField("UseExistingMaterials", "Use Existing Materials", "bool", "", "1", "", %optionsObj);
ImportOptionsList.endGroup();
}
else if(%assetType $= "Sound")
{
ImportOptionsList.startGroup("Adjustment");
ImportOptionsList.addField("VolumeAdjust", "VolumeAdjustment", "float", "", "1.0", "", %assetConfigObj);
ImportOptionsList.addField("PitchAdjust", "PitchAdjustment", "float", "", "1.0", "", %assetConfigObj);
ImportOptionsList.endGroup();
ImportOptionsList.startGroup("Compression");
ImportOptionsList.addField("IsCompressed", "Is Compressed", "bool", "", "1", "", %assetConfigObj);
ImportOptionsList.endGroup();
}
}
function ImportAssetOptionsWindow::deleteImportingAsset(%this, %assetItem)
{
%assetIndex = AssetBrowser.importAssetNewListArray.getIndexFromKey(%assetItem);
AssetBrowser.importAssetNewListArray.erase(%assetIndex);
//check if we have any child assets and remove them as well
for(%i=0; %i < AssetBrowser.importAssetNewListArray.count(); %i++)
{
%asset = AssetBrowser.importAssetNewListArray.getKey(%i);
if(%asset.ParentAssetItem == %assetItem)
{
AssetBrowser.importAssetNewListArray.erase(%i);
%i--;
}
}
%assetIndex = AssetBrowser.importAssetFinalListArray.getIndexFromKey(%assetItem);
AssetBrowser.importAssetFinalListArray.erase(%assetIndex);
//check if we have any child assets and remove them as well
for(%i=0; %i < AssetBrowser.importAssetFinalListArray.count(); %i++)
{
%asset = AssetBrowser.importAssetFinalListArray.getKey(%i);
if(%asset.ParentAssetItem == %assetItem)
{
AssetBrowser.importAssetFinalListArray.erase(%i);
%i--;
}
}
ImportAssetWindow.refresh();
ImportAssetOptionsWindow.setVisible(0);
}
function ImportAssetOptionsWindow::saveAssetOptions(%this)
{
ImportAssetWindow.refresh();
ImportAssetOptionsWindow.setVisible(0);
}
function ImportOptionsList::ImportMaterialsChanged(%this, %fieldName, %newValue, %ownerObject)
{
echo("CHANGED IF OUR IMPORTED MATERIALS WERE HAPPENING!");
}
function ImportAssetConfigEditorWindow::populateConfigList(%this, %optionsObj)
{
AssetImportConfigName.setText(%optionsObj.Name);
ImportOptionsConfigList.clear();
ImportOptionsConfigList.startGroup("Mesh");
ImportOptionsConfigList.addCallbackField("ImportMesh", "Import Mesh", "bool", "", "1", "", "ToggleImportMesh", %optionsObj);
ImportOptionsConfigList.addField("DoUpAxisOverride", "Do Up-axis Override", "bool", "", "0", "", %optionsObj);
ImportOptionsConfigList.addField("UpAxisOverride", "Up-axis Override", "list", "", "Z_AXIS", "X_AXIS,Y_AXIS,Z_AXIS", %optionsObj);
ImportOptionsConfigList.addField("DoScaleOverride", "Do Scale Override", "bool", "", "0", "", %optionsObj);
ImportOptionsConfigList.addField("ScaleOverride", "Scale Override", "float", "", "1", "", %optionsObj);
ImportOptionsConfigList.addField("IgnoreNodeScale", "Ignore Node Scale", "bool", "", "0", "", %optionsObj);
ImportOptionsConfigList.addField("AdjustCenter", "Adjust Center", "bool", "", "0", "", %optionsObj);
ImportOptionsConfigList.addField("AdjustFloor", "Adjust Floor", "bool", "", "0", "", %optionsObj);
ImportOptionsConfigList.addField("CollapseSubmeshes", "Collapse Submeshes", "bool", "", "0", "", %optionsObj);
ImportOptionsConfigList.addField("LODType", "LOD Type", "list", "", "TrailingNumber", "TrailingNumber,DetectDTS", %optionsObj);
//ImportOptionsConfigList.addField("TrailingNumber", "Trailing Number", "float", "", "2", "", %optionsObj, "Mesh");
ImportOptionsConfigList.addField("ImportedNodes", "Imported Nodes", "command", "", "", "", %optionsObj);
ImportOptionsConfigList.addField("IgnoreNodes", "Ignore Nodes", "command", "", "", "", %optionsObj);
ImportOptionsConfigList.addField("ImportMeshes", "Import Meshes", "command", "", "", "", %optionsObj);
ImportOptionsConfigList.addField("IgnoreMeshes", "Imported Meshes", "command", "", "", "", %optionsObj);
ImportOptionsConfigList.endGroup();
//Materials
ImportOptionsConfigList.startGroup("Material");
ImportOptionsConfigList.addField("ImportMaterials", "Import Materials", "bool", "", "1", "", %optionsObj);
ImportOptionsConfigList.addField("CreateComposites", "Create Composites", "bool", "", "1", "", %optionsObj);
ImportOptionsConfigList.addField("UseDiffuseSuffixOnOriginImg", "Use Diffuse Suffix for Origin Image", "bool", "", "1", "", %optionsObj);
ImportOptionsConfigList.addField("UseExistingMaterials", "Use Existing Materials", "bool", "", "1", "", %optionsObj);
ImportOptionsConfigList.addField("IgnoreMaterials", "Ignore Materials", "command", "", "", "", %optionsObj);
ImportOptionsConfigList.endGroup();
//Animations
ImportOptionsConfigList.startGroup("Animations");
ImportOptionsConfigList.addField("ImportAnimations", "Import Animations", "bool", "", "1", "", %optionsObj);
ImportOptionsConfigList.addField("SeparateAnimations", "Separate Animations", "bool", "", "1", "", %optionsObj);
ImportOptionsConfigList.addField("SeparateAnimationPrefix", "Separate Animation Prefix", "string", "", "", "", %optionsObj);
ImportOptionsConfigList.endGroup();
//Collision
ImportOptionsConfigList.startGroup("Collision");
ImportOptionsConfigList.addField("GenerateCollisions", "Generate Collisions", "bool", "", "1", "", %optionsObj);
ImportOptionsConfigList.addField("GenCollisionType", "Generate Collision Type", "list", "", "CollisionMesh", "CollisionMesh,ConvexHull", %optionsObj);
ImportOptionsConfigList.addField("CollisionMeshPrefix", "CollisionMesh Prefix", "string", "", "Col", "", %optionsObj);
ImportOptionsConfigList.addField("GenerateLOSCollisions", "Generate LOS Collisions", "bool", "", "1", "", %optionsObj);
ImportOptionsConfigList.addField("GenLOSCollisionType", "Generate LOS Collision Type", "list", "", "CollisionMesh", "CollisionMesh,ConvexHull", %optionsObj);
ImportOptionsConfigList.addField("LOSCollisionMeshPrefix", "LOS CollisionMesh Prefix", "string", "", "LOS", "", %optionsObj);
ImportOptionsConfigList.endGroup();
//Images
ImportOptionsConfigList.startGroup("Image");
ImportOptionsConfigList.addField("ImageType", "Image Type", "list", "", "N/A", "N/A,Diffuse,Normal,Specular,Metalness,Roughness,AO,Composite,GUI", %optionsObj);
ImportOptionsConfigList.addField("DiffuseTypeSuffixes", "Diffuse Type Suffixes", "command", "", "_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL", "", %optionsObj);
ImportOptionsConfigList.addField("NormalTypeSuffixes", "Normal Type Suffixes", "command", "", "_NORMAL,_NORM", "", %optionsObj);
if(EditorSettings.lightingModel $= "Legacy")
{
ImportOptionsConfigList.addField("SpecularTypeSuffixes", "Specular Type Suffixes", "command", "", "_SPECULAR,_SPEC", "", %optionsObj);
}
else
{
ImportOptionsConfigList.addField("MetalnessTypeSuffixes", "Metalness Type Suffixes", "command", "", "_METAL,_MET,_METALNESS,_METALLIC", "", %optionsObj);
ImportOptionsConfigList.addField("RoughnessTypeSuffixes", "Roughness Type Suffixes", "command", "", "_ROUGH,_ROUGHNESS", "", %optionsObj);
ImportOptionsConfigList.addField("SmoothnessTypeSuffixes", "Smoothness Type Suffixes", "command", "", "_SMOOTH,_SMOOTHNESS", "", %optionsObj);
ImportOptionsConfigList.addField("AOTypeSuffixes", "AO Type Suffixes", "command", "", "_AO,_AMBIENT,_AMBIENTOCCLUSION", "", %optionsObj);
ImportOptionsConfigList.addField("CompositeTypeSuffixes", "Composite Type Suffixes", "command", "", "_COMP,_COMPOSITE", "", %optionsObj);
}
ImportOptionsConfigList.addField("TextureFilteringMode", "Texture Filtering Mode", "list", "", "Bilinear", "None,Bilinear,Trilinear", %optionsObj);
ImportOptionsConfigList.addField("UseMips", "Use Mipmaps", "bool", "", "1", "", %optionsObj);
ImportOptionsConfigList.addField("IsHDR", "Is HDR", "bool", "", "0", "", %optionsObj);
ImportOptionsConfigList.addField("Scaling", "Scaling", "float", "", "1.0", "", %optionsObj);
ImportOptionsConfigList.addField("Compressed", "Is Compressed", "bool", "", "1", "", %optionsObj);
ImportOptionsConfigList.addField("GenerateMaterialOnImport", "Generate Material On Import", "bool", "", "1", "", %optionsObj);
ImportOptionsConfigList.addField("PopulateMaterialMaps", "Populate Material Maps", "bool", "", "1", "", %optionsObj);
ImportOptionsConfigList.endGroup();
//Sounds
ImportOptionsConfigList.startGroup("Sound");
ImportOptionsConfigList.addField("VolumeAdjust", "Volume Adjustment", "float", "", "1.0", "", %optionsObj);
ImportOptionsConfigList.addField("PitchAdjust", "Pitch Adjustment", "float", "", "1.0", "", %optionsObj);
ImportOptionsConfigList.addField("Compressed", "Is Compressed", "bool", "", "0", "", %optionsObj);
ImportOptionsConfigList.endGroup();
}
function ImportAssetConfigEditorWindow::addNewConfig(%this)
{
ImportAssetConfigEditorWindow.setVisible(1);
ImportAssetConfigEditorWindow.selectWindow();
%optionsObj = new ScriptObject(){};
ImportAssetWindow.importConfigsList.add(%optionsObj);
//Initial, blank configuration
%optionsObj.ImportMesh = true;
%optionsObj.DoUpAxisOverride = false;
%optionsObj.UpAxisOverride = "Z_AXIS";
%optionsObj.DoScaleOverride = false;
%optionsObj.ScaleOverride = 1.0;
%optionsObj.IgnoreNodeScale = false;
%optionsObj.AdjustCenter = false;
%optionsObj.AdjustFloor = false;
%optionsObj.CollapseSubmeshes = false;
%optionsObj.LODType = "TrailingNumber";
//%optionsObj.TrailingNumber = 2;
%optionsObj.ImportedNodes = "";
%optionsObj.IgnoreNodes = "";
%optionsObj.ImportMeshes = "";
%optionsObj.IgnoreMeshes = "";
//Materials
%optionsObj.ImportMaterials = true;
%optionsObj.CreateComposites = true;
%optionsObj.UseDiffuseSuffixOnOriginImg = true;
%optionsObj.UseExistingMaterials = true;
//Animations
%optionsObj.ImportAnimations = true;
%optionsObj.SeparateAnimations = true;
%optionsObj.SeparateAnimationPrefix = "";
//Collision
%optionsObj.GenerateCollisions = true;
%optionsObj.GenCollisionType = "CollisionMesh";
%optionsObj.CollisionMeshPrefix = "Col";
%optionsObj.GenerateLOSCollisions = true;
%optionsObj.GenLOSCollisionType = "CollisionMesh";
%optionsObj.LOSCollisionMeshPrefix = "LOS";
//Images
%optionsObj.ImageType = "N/A";
%optionsObj.DiffuseTypeSuffixes = "_ALBEDO;_DIFFUSE;_ALB;_DIF;_COLOR;_COL;_BASECOLOR;_BASE_COLOR";
%optionsObj.NormalTypeSuffixes = "_NORMAL;_NORM";
%optionsObj.SpecularTypeSuffixes = "_SPECULAR;_SPEC";
%optionsObj.MetalnessTypeSuffixes = "_METAL;_MET;_METALNESS;_METALLIC";
%optionsObj.RoughnessTypeSuffixes = "_ROUGH;_ROUGHNESS";
%optionsObj.SmoothnessTypeSuffixes = "_SMOOTH;_SMOOTHNESS";
%optionsObj.AOTypeSuffixes = "_AO;_AMBIENT;_AMBIENTOCCLUSION";
%optionsObj.CompositeTypeSuffixes = "_COMP;_COMPOSITE";
%optionsObj.TextureFilteringMode = "Bilinear";
%optionsObj.UseMips = true;
%optionsObj.IsHDR = false;
%optionsObj.Scaling = 1.0;
%optionsObj.Compressed = true;
%optionsObj.GenerateMaterialOnImport = true;
%optionsObj.PopulateMaterialMaps = true;
//Sounds
%optionsObj.VolumeAdjust = 1.0;
%optionsObj.PitchAdjust = 1.0;
%optionsObj.Compressed = false;
//Hook in the UI
%this.populateConfigList(%optionsObj);
}
function ImportAssetConfigEditorWindow::editConfig(%this)
{
ImportAssetConfigEditorWindow.setVisible(1);
ImportAssetConfigEditorWindow.selectWindow();
%this.populateConfigList(ImportAssetWindow.activeImportConfig);
}
function ImportAssetConfigEditorWindow::deleteConfig(%this)
{
ImportAssetWindow.importConfigsList.erase(ImportAssetWindow.activeImportConfigIndex);
ImportAssetConfigList.setSelected(0); //update it
ImportAssetConfigEditorWindow.saveAssetOptionsConfig();
}
function ImportAssetConfigEditorWindow::saveAssetOptionsConfig(%this)
{
%xmlDoc = new SimXMLDocument();
%xmlDoc.pushNewElement("AssetImportConfigs");
for(%i = 0; %i < ImportAssetWindow.importConfigsList.count(); %i++)
{
%configObj = ImportAssetWindow.importConfigsList.getKey(%i);
%xmlDoc.pushNewElement("Config");
if(%configObj.Name $= "")
%configObj.Name = AssetImportConfigName.getText();
%xmlDoc.setAttribute("Name", %configObj.Name);
%xmlDoc.pushNewElement("Mesh");
%xmlDoc.setAttribute("ImportMesh", %configObj.ImportMesh);
%xmlDoc.setAttribute("DoUpAxisOverride", %configObj.DoUpAxisOverride);
%xmlDoc.setAttribute("UpAxisOverride", %configObj.UpAxisOverride);
%xmlDoc.setAttribute("DoScaleOverride", %configObj.DoScaleOverride);
%xmlDoc.setAttribute("ScaleOverride", %configObj.ScaleOverride);
%xmlDoc.setAttribute("IgnoreNodeScale", %configObj.IgnoreNodeScale);
%xmlDoc.setAttribute("AdjustCenter", %configObj.AdjustCenter);
%xmlDoc.setAttribute("AdjustFloor", %configObj.AdjustFloor);
%xmlDoc.setAttribute("CollapseSubmeshes", %configObj.CollapseSubmeshes);
%xmlDoc.setAttribute("LODType", %configObj.LODType);
%xmlDoc.setAttribute("ImportedNodes", %configObj.ImportedNodes);
%xmlDoc.setAttribute("IgnoreNodes", %configObj.IgnoreNodes);
%xmlDoc.setAttribute("ImportMeshes", %configObj.ImportMeshes);
%xmlDoc.setAttribute("IgnoreMeshes", %configObj.IgnoreMeshes);
%xmlDoc.popElement();
%xmlDoc.pushNewElement("Materials");
%xmlDoc.setAttribute("ImportMaterials", %configObj.ImportMaterials);
%xmlDoc.setAttribute("CreateComposites", %configObj.CreateComposites);
%xmlDoc.setAttribute("UseDiffuseSuffixOnOriginImg", %configObj.UseDiffuseSuffixOnOriginImg);
%xmlDoc.setAttribute("UseExistingMaterials", %configObj.UseExistingMaterials);
%xmlDoc.popElement();
%xmlDoc.pushNewElement("Animations");
%xmlDoc.setAttribute("ImportAnimations", %configObj.ImportAnimations);
%xmlDoc.setAttribute("SeparateAnimations", %configObj.SeparateAnimations);
%xmlDoc.setAttribute("SeparateAnimationPrefix", %configObj.SeparateAnimationPrefix);
%xmlDoc.popElement();
%xmlDoc.pushNewElement("Collisions");
%xmlDoc.setAttribute("GenerateCollisions", %configObj.GenerateCollisions);
%xmlDoc.setAttribute("GenCollisionType", %configObj.GenCollisionType);
%xmlDoc.setAttribute("CollisionMeshPrefix", %configObj.CollisionMeshPrefix);
%xmlDoc.setAttribute("GenerateLOSCollisions", %configObj.GenerateLOSCollisions);
%xmlDoc.setAttribute("GenLOSCollisionType", %configObj.GenLOSCollisionType);
%xmlDoc.setAttribute("LOSCollisionMeshPrefix", %configObj.LOSCollisionMeshPrefix);
%xmlDoc.popElement();
%xmlDoc.pushNewElement("Images");
%xmlDoc.setAttribute("ImageType", %configObj.ImageType);
%xmlDoc.setAttribute("DiffuseTypeSuffixes", %configObj.DiffuseTypeSuffixes);
%xmlDoc.setAttribute("NormalTypeSuffixes", %configObj.NormalTypeSuffixes);
%xmlDoc.setAttribute("SpecularTypeSuffixes", %configObj.SpecularTypeSuffixes);
%xmlDoc.setAttribute("MetalnessTypeSuffixes", %configObj.MetalnessTypeSuffixes);
%xmlDoc.setAttribute("RoughnessTypeSuffixes", %configObj.RoughnessTypeSuffixes);
%xmlDoc.setAttribute("SmoothnessTypeSuffixes", %configObj.SmoothnessTypeSuffixes);
%xmlDoc.setAttribute("AOTypeSuffixes", %configObj.AOTypeSuffixes);
%xmlDoc.setAttribute("CompositeTypeSuffixes", %configObj.CompositeTypeSuffixes);
%xmlDoc.setAttribute("TextureFilteringMode", %configObj.TextureFilteringMode);
%xmlDoc.setAttribute("UseMips", %configObj.UseMips);
%xmlDoc.setAttribute("IsHDR", %configObj.IsHDR);
%xmlDoc.setAttribute("Scaling", %configObj.Scaling);
%xmlDoc.setAttribute("Compressed", %configObj.Compressed);
%xmlDoc.setAttribute("GenerateMaterialOnImport", %configObj.GenerateMaterialOnImport);
%xmlDoc.setAttribute("PopulateMaterialMaps", %configObj.PopulateMaterialMaps);
%xmlDoc.popElement();
%xmlDoc.pushNewElement("Sounds");
%xmlDoc.setAttribute("VolumeAdjust", %configObj.VolumeAdjust);
%xmlDoc.setAttribute("PitchAdjust", %configObj.PitchAdjust);
%xmlDoc.setAttribute("Compressed", %configObj.Compressed);
%xmlDoc.popElement();
%xmlDoc.popElement();
}
%xmlDoc.popElement();
%xmlDoc.saveFile($AssetBrowser::importConfigsFile);
ImportAssetConfigEditorWindow.setVisible(0);
ImportAssetWindow.reloadImportOptionConfigs();
}
function ImportOptionsConfigList::ToggleImportMesh(%this, %fieldName, %newValue, %ownerObject)
{
%this.setFieldEnabled("DoUpAxisOverride", %newValue);
%this.setFieldEnabled("UpAxisOverride", %newValue);
%this.setFieldEnabled("DoScaleOverride", %newValue);
%this.setFieldEnabled("ScaleOverride", %newValue);
%this.setFieldEnabled("IgnoreNodeScale", %newValue);
%this.setFieldEnabled("AdjustCenter", %newValue);
%this.setFieldEnabled("AdjustFloor", %newValue);
%this.setFieldEnabled("CollapseSubmeshes", %newValue);
%this.setFieldEnabled("LODType", %newValue);
%this.setFieldEnabled("ImportedNodes", %newValue);
%this.setFieldEnabled("IgnoreNodes", %newValue);
%this.setFieldEnabled("ImportMeshes", %newValue);
%this.setFieldEnabled("IgnoreMeshes", %newValue);
}

View file

@ -0,0 +1,371 @@
function AssetBrowser_editAsset::saveAsset(%this)
{
%file = AssetDatabase.getAssetFilePath(%this.editedAssetId);
%success = TamlWrite(AssetBrowser_editAsset.editedAsset, %file);
AssetBrowser.loadFilters();
Canvas.popDialog(AssetBrowser_editAsset);
}
function AssetBrowser::editAsset(%this)
{
//Find out what type it is
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
%assetType = %assetDef.getClassName();
if(%assetType $= "MaterialAsset")
{
//if(EditorSettings.materialEditMode $= "MaterialEditor")
//{
%assetDef.materialDefinitionName.reload();
EditorGui.setEditor(MaterialEditorPlugin);
MaterialEditorGui.currentMaterial = %assetDef.materialDefinitionName;
MaterialEditorGui.setActiveMaterial( %assetDef.materialDefinitionName );
AssetBrowser.hideDialog();
/*}
else
{
Canvas.pushDialog(ShaderEditor);
ShaderEditorGraph.loadGraph(%assetDef.shaderGraph);
$ShaderGen::targetShaderFile = filePath(%assetDef.shaderGraph) @"/"@fileBase(%assetDef.shaderGraph);
}*/
}
else if(%assetType $= "StateMachineAsset")
{
eval("AssetBrowser.tempAsset = new " @ %assetDef.getClassName() @ "();");
AssetBrowser.tempAsset.assignFieldsFrom(%assetDef);
SMAssetEditInspector.inspect(AssetBrowser.tempAsset);
AssetBrowser_editAsset.editedAssetId = EditAssetPopup.assetId;
AssetBrowser_editAsset.editedAsset = AssetBrowser.tempAsset;
//remove some of the groups we don't need:
for(%i=0; %i < SMAssetEditInspector.getCount(); %i++)
{
%caption = SMAssetEditInspector.getObject(%i).caption;
if(%caption $= "Ungrouped" || %caption $= "Object" || %caption $= "Editing"
|| %caption $= "Persistence" || %caption $= "Dynamic Fields")
{
SMAssetEditInspector.remove(SMAssetEditInspector.getObject(%i));
%i--;
}
}
Canvas.pushDialog(StateMachineEditor);
StateMachineEditor.loadStateMachineAsset(EditAssetPopup.assetId);
StateMachineEditor-->Window.text = "State Machine Editor ("@EditAssetPopup.assetId@")";
}
else if(%assetType $= "ComponentAsset")
{
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
%scriptFile = %assetDef.scriptFile;
EditorOpenFileInTorsion(makeFullPath(%scriptFile), 0);
}
else if(%assetType $= "GameObjectAsset")
{
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
%scriptFile = %assetDef.scriptFilePath;
EditorOpenFileInTorsion(makeFullPath(%scriptFile), 0);
}
else if(%assetType $= "ScriptAsset")
{
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
%scriptFile = %assetDef.scriptFilePath;
EditorOpenFileInTorsion(makeFullPath(%scriptFile), 0);
}
else if(%assetType $= "ShapeAsset")
{
%this.hideDialog();
ShapeEditorPlugin.openShapeAsset(EditAssetPopup.assetId);
}
else if(%assetType $= "ShapeAnimationAsset")
{
%this.hideDialog();
ShapeEditorPlugin.openShapeAsset(EditAssetPopup.assetId);
}
else if(%assetType $= "LevelAsset")
{
schedule( 1, 0, "EditorOpenMission", %assetDef.LevelFile);
}
else if(%assetType $= "GUIAsset")
{
if(!isObject(%assetDef.assetName))
{
exec(%assetDef.GUIFilePath);
exec(%assetDef.mScriptFilePath);
}
GuiEditContent(%assetDef.assetName);
}
}
function AssetBrowser::editAssetInfo(%this)
{
Canvas.pushDialog(AssetBrowser_editAsset);
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
eval("AssetBrowser.tempAsset = new " @ %assetDef.getClassName() @ "();");
AssetBrowser.tempAsset.assignFieldsFrom(%assetDef);
AssetEditInspector.inspect(AssetBrowser.tempAsset);
AssetBrowser_editAsset.editedAssetId = EditAssetPopup.assetId;
AssetBrowser_editAsset.editedAsset = AssetBrowser.tempAsset;
//remove some of the groups we don't need:
for(%i=0; %i < AssetEditInspector.getCount(); %i++)
{
%caption = AssetEditInspector.getObject(%i).caption;
if(%caption $= "Ungrouped" || %caption $= "Object" || %caption $= "Editing"
|| %caption $= "Persistence" || %caption $= "Dynamic Fields")
{
AssetEditInspector.remove(AssetEditInspector.getObject(%i));
%i--;
}
}
}
//------------------------------------------------------------
function AssetBrowser::refreshAsset(%this, %assetId)
{
if(%assetId $= "")
{
//if we have no passed-in asset ID, we're probably going through the popup menu, so get our edit popup id
%assetId = EditAssetPopup.assetId;
}
AssetDatabase.refreshAsset(%assetId);
AssetBrowser.refreshPreviews();
}
//------------------------------------------------------------
function AssetBrowser::renameAsset(%this)
{
//Find out what type it is
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
%curFirstResponder = AssetBrowser.getFirstResponder();
if(%curFirstResponder != 0)
%curFirstResponder.clearFirstResponder();
AssetBrowser.selectedAssetPreview-->AssetNameLabel.setActive(true);
AssetBrowser.selectedAssetPreview-->AssetNameLabel.setFirstResponder();
}
function AssetNameField::onReturn(%this)
{
//if the name is different to the asset's original name, rename it!
%newName = %this.getText();
if(%this.originalAssetName !$= %this.getText())
{
%moduleName = AssetBrowser.selectedModule;
//do a rename!
%success = AssetDatabase.renameDeclaredAsset(%moduleName @ ":" @ %this.originalAssetName, %moduleName @ ":" @ %this.getText());
if(%success)
{
%newAssetId = %moduleName @ ":" @ %this.getText();
%assetPath = AssetDatabase.getAssetFilePath(%newAssetId);
//Rename any associated files as well
%assetDef = AssetDatabase.acquireAsset(%newAssetId);
%assetType = %assetDef.getClassName();
//rename the file to match
%path = filePath(%assetPath);
if(%assetType $= "ComponentAsset")
{
%oldScriptFilePath = %assetDef.scriptFile;
%scriptFilePath = filePath(%assetDef.scriptFile);
%scriptExt = fileExt(%assetDef.scriptFile);
%newScriptFileName = %scriptFilePath @ "/" @ %newName @ %scriptExt;
%newAssetFile = %path @ "/" @ %this.getText() @ ".asset.taml";
%assetDef.componentName = %newName;
%assetDef.scriptFile = %newScriptFileName;
TamlWrite(%assetDef, %newAssetFile);
fileDelete(%assetPath);
pathCopy(%oldScriptFilePath, %newScriptFileName);
fileDelete(%oldScriptFilePath);
//Go through our scriptfile and replace the old namespace with the new
%editedFileContents = "";
%file = new FileObject();
if ( %file.openForRead( %newScriptFileName ) )
{
while ( !%file.isEOF() )
{
%line = %file.readLine();
%line = trim( %line );
%editedFileContents = %editedFileContents @ strreplace(%line, %this.originalAssetName, %newName) @ "\n";
}
%file.close();
}
if(%editedFileContents !$= "")
{
%file.openForWrite(%newScriptFileName);
%file.writeline(%editedFileContents);
%file.close();
}
exec(%newScriptFileName);
}
else if(%assetType $= "StateMachineAsset")
{
%oldScriptFilePath = %assetDef.stateMachineFile;
%scriptFilePath = filePath(%assetDef.stateMachineFile);
%scriptExt = fileExt(%assetDef.stateMachineFile);
%newScriptFileName = %scriptFilePath @ "/" @ %newName @ %scriptExt;
%newAssetFile = %path @ "/" @ %this.getText() @ ".asset.taml";
%assetDef.stateMachineFile = %newScriptFileName;
TamlWrite(%assetDef, %newAssetFile);
fileDelete(%assetPath);
pathCopy(%oldScriptFilePath, %newScriptFileName);
fileDelete(%oldScriptFilePath);
}
else if(%assetType $= "GameObjectAsset")
{
%oldScriptFilePath = %assetDef.scriptFilePath;
%scriptFilePath = filePath(%assetDef.scriptFilePath);
%scriptExt = fileExt(%assetDef.scriptFilePath);
%oldGOFilePath = %assetDef.TAMLFilePath;
%newScriptFileName = %scriptFilePath @ "/" @ %newName @ %scriptExt;
%newAssetFile = %path @ "/" @ %this.getText() @ ".asset.taml";
%newGOFile = %path @ "/" @ %this.getText() @ ".taml";
%assetDef.gameObjectName = %newName;
%assetDef.scriptFilePath = %newScriptFileName;
%assetDef.TAMLFilePath = %newGOFile;
TamlWrite(%assetDef, %newAssetFile);
fileDelete(%assetPath);
pathCopy(%oldScriptFilePath, %newScriptFileName);
fileDelete(%oldScriptFilePath);
pathCopy(%oldGOFilePath, %newGOFile);
fileDelete(%oldGOFilePath);
//Go through our scriptfile and replace the old namespace with the new
%editedFileContents = "";
%file = new FileObject();
if ( %file.openForRead( %newScriptFileName ) )
{
while ( !%file.isEOF() )
{
%line = %file.readLine();
%line = trim( %line );
%editedFileContents = %editedFileContents @ strreplace(%line, %this.originalAssetName, %newName) @ "\n";
}
%file.close();
}
if(%editedFileContents !$= "")
{
%file.openForWrite(%newScriptFileName);
%file.writeline(%editedFileContents);
%file.close();
}
exec(%newScriptFileName);
//Rename in the TAML file as well
%file = new FileObject();
if ( %file.openForRead( %newGOFile ) )
{
while ( !%file.isEOF() )
{
%line = %file.readLine();
%line = trim( %line );
%editedFileContents = %editedFileContents @ strreplace(%line, %this.originalAssetName, %newName) @ "\n";
}
%file.close();
}
if(%editedFileContents !$= "")
{
%file.openForWrite(%newGOFile);
%file.writeline(%editedFileContents);
%file.close();
}
}
}
}
%this.clearFirstResponder();
%this.setActive(false);
}
//------------------------------------------------------------
function AssetBrowser::duplicateAsset(%this)
{
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
%this.setupCreateNewAsset(%assetDef.getClassName(), AssetBrowser.selectedModule);
}
function AssetBrowser::deleteAsset(%this)
{
//Find out what type it is
%assetDef = AssetDatabase.acquireAsset(EditAssetPopup.assetId);
%assetType = %assetDef.getClassName();
MessageBoxOKCancel("Warning!", "This will delete the selected asset and the files associated to it, do you wish to continue?",
"AssetBrowser.confirmDeleteAsset();", "");
}
function AssetBrowser::confirmDeleteAsset(%this)
{
%currentSelectedItem = AssetBrowserFilterTree.getSelectedItem();
%currentItemParent = AssetBrowserFilterTree.getParentItem(%currentSelectedItem);
AssetDatabase.deleteAsset(EditAssetPopup.assetId, false);
%this.loadFilters();
if(!AssetBrowserFilterTree.selectItem(%currentSelectedItem))
{
//if it failed, that means we deleted the last item in that category, and we need to do the parent
AssetBrowserFilterTree.selectItem(%currentItemParent);
AssetBrowserFilterTree.expandItem(%currentItemParent);
}
}

View file

@ -0,0 +1,127 @@
//
function AssetBrowser::CreateNewModule(%this)
{
Canvas.pushDialog(AssetBrowser_AddModule);
AssetBrowser_addModuleWindow.selectWindow();
AssetBrowser_addModuleWindow.callbackFunction = "AssetBrowser.loadFilters();";
}
function AssetBrowser_editModule::saveModule(%this)
{
//Check what special actions we may need to do, such as renames
%moduleDef = ModuleDatabase.findModule(AssetBrowser.selectedModule, 1);
%oldModuleName = %moduleDef.ModuleID;
if(%oldModuleName !$= AssetBrowser.tempModule.ModuleID)
{
//rename the script file and script namespaces
%oldScriptFilePath = "data/" @ %oldModuleName @ "/" @ %moduleDef.scriptFile;
%newscriptFilePath = "data/" @ AssetBrowser.tempModule.ModuleID @ "/";
%scriptExt = fileExt(%moduleDef.scriptFile);
%newScriptFileName = %newscriptFilePath @ "/" @ AssetBrowser.tempModule.ModuleID @ %scriptExt;
%newScriptFileOldName = %newscriptFilePath @ "/" @ %oldModuleName @ %scriptExt;
%moduleDef.ModuleId = AssetBrowser.tempModule.ModuleID;
%moduleDef.scriptFile = AssetBrowser.tempModule.ModuleID @ %scriptExt;
ModuleDatabase.copyModule(%moduleDef, AssetBrowser.tempModule.ModuleID, "data/" @ AssetBrowser.tempModule.ModuleID);
//Go through our scriptfile and replace the old namespace with the new
%editedFileContents = "";
%file = new FileObject();
if ( %file.openForRead( %newScriptFileOldName ) )
{
while ( !%file.isEOF() )
{
%line = %file.readLine();
%line = trim( %line );
%editedFileContents = %editedFileContents @ strreplace(%line, %oldModuleName, AssetBrowser.tempModule.ModuleID) @ "\n";
}
%file.close();
}
if(%editedFileContents !$= "")
{
%file.openForWrite(%newScriptFileName);
%file.writeline(%editedFileContents);
%file.close();
}
%success = fileDelete(%newScriptFileOldName);
ModuleDatabase.unloadExplicit(%oldModuleName);
%success = fileDelete("data/" @ %oldModuleName);
ModuleDatabase.loadExplicit(AssetBrowser.tempModule.ModuleID);
}
//Now, update the module file itself
//%file = ModuleDatabase.getAssetFilePath(%moduleDef.ModuleID);
//%success = TamlWrite(AssetBrowser_editAsset.editedAsset, %file);
AssetBrowser.loadFilters();
Canvas.popDialog(AssetBrowser_editModule);
}
function AssetBrowser::editModuleInfo(%this)
{
Canvas.pushDialog(AssetBrowser_editModule);
%moduleDef = ModuleDatabase.findModule(AssetBrowser.selectedModule, 1);
AssetBrowser.tempModule = new ModuleDefinition();
AssetBrowser.tempModule.assignFieldsFrom(%moduleDef);
ModuleEditInspector.inspect(AssetBrowser.tempModule);
AssetBrowser_editModule.editedModuleId = AssetBrowser.selectedModule;
AssetBrowser_editModule.editedModule = AssetBrowser.tempModule;
//remove some of the groups we don't need:
for(%i=0; %i < ModuleEditInspector.getCount(); %i++)
{
%caption = ModuleEditInspector.getObject(%i).caption;
if(%caption $= "BuildId" || %caption $= "type" || %caption $= "Dependencies" || %caption $= "scriptFile"
|| %caption $= "AssetTagsManifest" || %caption $= "ScopeSet" || %caption $= "ModulePath"
|| %caption $= "ModuleFile" || %caption $= "ModuleFilePath" || %caption $= "ModuleScriptFilePath" )
{
ModuleEditInspector.remove(ModuleEditInspector.getObject(%i));
%i--;
}
}
}
function AssetBrowser::renameModule(%this)
{
}
function AssetBrowser::reloadModule(%this)
{
ModuleDatabase.unregisterModule(AssetBrowser.SelectedModule, 1);
ModuleDatabase.loadExplicit(AssetBrowser.SelectedModule);
}
function AssetBrowser::deleteModule(%this)
{
}
function AssetBrowser::RefreshModuleDependencies(%this)
{
//Iterate through all our modules
//then, iterate through the module's assets
//if an asset has a module that isn't us, queue that into the dependencies list
}

View file

@ -0,0 +1,127 @@
function GuiVariableInspector::onInspectorFieldModified(%this, %targetObj, %fieldName, %index, %oldValue, %newValue)
{
echo("FIELD CHANGED: " @ %fieldName @ " from " @ %oldValue @ " to " @ %newValue);
}
function GuiInspectorVariableGroup::onConstructField(%this, %fieldName, %fieldLabel, %fieldTypeName, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %ownerObj)
{
%makeCommand = %this @ ".build" @ %fieldTypeName @ "Field(\""@ %fieldName @ "\",\"" @ %fieldLabel @ "\",\"" @ %fieldDesc @ "\",\"" @
%fieldDefaultVal @ "\",\"" @ %fieldDataVals @ "\",\"" @ %ownerObj @"\");";
eval(%makeCommand);
}
function GuiInspectorVariableGroup::buildListField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %ownerObj)
{
%extent = 200;
%fieldCtrl = %this.createInspectorField();
%extent = %this.stack.getExtent();
%width = mRound(%extent/2);
%height = 20;
%inset = 10;
/*%container = new GuiControl() {
canSaveDynamicFields = "0";
Profile = "EditorContainerProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = %extent.x SPC %height;
MinExtent = "8 2";
canSave = "0";
Visible = "1";
hovertime = "100";
tooltip = %tooltip;
tooltipProfile = "EditorToolTipProfile";
};
%labelControl = new GuiTextCtrl() {
canSaveDynamicFields = "0";
Profile = "EditorFontHLBold";
HorizSizing = "right";
VertSizing = "bottom";
Position = %inset SPC "0";
Extent = %width + %inset SPC %height;
MinExtent = "8 2";
canSave = "0";
Visible = "1";
hovertime = "100";
tooltip = %tooltip;
tooltipProfile = "EditorToolTipProfile";
text = %fieldLabel;
maxLength = "1024";
};*/
%editControl = new GuiPopUpMenuCtrl() {
class = "guiInspectorListField";
maxPopupHeight = "200";
sbUsesNAColor = "0";
reverseTextList = "0";
bitmapBounds = "16 16";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "0";
Profile = "ToolsGuiPopUpMenuProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = %fieldCtrl.edit.position;
Extent = %fieldCtrl.edit.extent;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "ToolsGuiToolTipProfile";
tooltip = %tooltip;
text = %fieldDefaultVal;
hovertime = "1000";
ownerObject = %ownerObj;
fieldName = %fieldName;
};
//set the field value
if(getSubStr(%this.fieldName, 0, 1) $= "$")
{
if(%fieldName $= "")
%editControl.setText(%fieldName);
}
else
{
//regular variable
%setCommand = %editControl @ ".setText(" @ %ownerObj @ "." @ %fieldName @ ");";
eval(%setCommand);
}
%listCount = getTokenCount(%fieldDataVals, ",");
for(%i=0; %i < %listCount; %i++)
{
%entryText = getToken(%fieldDataVals, ",", %i);
%editControl.add(%entryText);
}
%fieldCtrl.setCaption(%fieldLabel);
%fieldCtrl.setEditControl(%editControl);
%this.addInspectorField(%fieldCtrl);
}
function guiInspectorListField::onSelect( %this, %id, %text )
{
if(getSubStr(%this.fieldName, 0, 1) $= "$")
{
//ah, a global var, just do it straight, then
%setCommand = %this.fieldName @ " = \"" @ %text @ "\";";
}
else
{
//regular variable
%setCommand = %this.ownerObject @ "." @ %this.fieldName @ " = \"" @ %text @ "\";";
}
eval(%setCommand);
}

View file

@ -0,0 +1,130 @@
function GameObjectModuleList::onWake(%this)
{
%this.refresh();
}
function GameObjectModuleList::refresh(%this)
{
%this.clear();
//First, get our list of modules
%moduleList = ModuleDatabase.findModules();
%count = getWordCount(%moduleList);
for(%i=0; %i < %count; %i++)
{
%moduleName = getWord(%moduleList, %i);
%this.add(%moduleName.ModuleId, %i);
}
}
function GameObjectCreatorPkgBtn::onClick(%this)
{
Canvas.pushDialog(AssetBrowser_AddModule);
AssetBrowser_addModuleWindow.selectWindow();
}
function GameObjectCreateBtn::onClick(%this)
{
%className = GameObjectCreatorName.getText();
if(%className $= "")
{
error("Attempted to make a new Game Object with no name!");
Canvas.popDialog(GameObjectCreator);
return;
}
//First, find out if this one already exists. If so, we're obviously merely updating it
//also, exec any components that may exist
//find all GameObjectAssets
%assetQuery = new AssetQuery();
if(!AssetDatabase.findAssetType(%assetQuery, "GameObjectAsset"))
return; //if we didn't find ANY, just exit
%count = %assetQuery.getCount();
%createNew = true;
for(%i=0; %i < %count; %i++)
{
%assetId = %assetQuery.getAsset(%i);
%gameObjectAsset = AssetDatabase.acquireAsset(%assetId);
if(%gameObjectAsset.gameObjectName $= %className)
{
%createNew = false;
break;
}
}
%selectedEntity = GameObjectCreator.selectedEntity;
%selectedEntity.class = %className;
Inspector.inspect(%selectedEntity);
if(%createNew)
{
//get the selected module data
%moduleName = GameObjectModuleList.getText();
%selectedEntity.gameObjectAsset = %moduleName @ ":" @ %className;
%path = "data/" @ %moduleName @ "/gameObjects/";
%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);
%asset = new GameObjectAsset()
{
AssetName = %className;
VersionId = 1;
gameObjectName=%className;
TAMLFilePath = %tamlPath;
scriptFilePath = %scriptPath;
};
%assetPath = %path @ %className @ ".asset.taml";
//now, add the script file and a ref to the taml into our SGO manifest so we can readily spawn it later.
TamlWrite(%selectedEntity, %tamlpath);
TamlWrite(%asset, %assetPath);
GameObjectCreator.selectedEntity = "";
Canvas.popDialog(GameObjectCreator);
//Load it
%moduleDef = ModuleDatabase.findModule(%moduleName,1);
AssetDatabase.addDeclaredAsset(%moduleDef, %assetPath);
}
else
{
%moduleDef = AssetDatabase.getAssetModule(%assetId);
%moduleName = %moduleDef.ModuleId;
%path = "data/" @ %moduleName @ "/gameObjects/";
%selectedEntity.gameObjectAsset = %moduleName @ ":" @ %className;
%tamlPath = %path @ %className @ ".taml";
TamlWrite(%selectedEntity, %tamlpath);
GameObjectCreator.selectedEntity = "";
Canvas.popDialog(GameObjectCreator);
}
}

View file

@ -0,0 +1,663 @@
//-----------------------------------------------------------------------------
// 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 CreateAssetButton::onClick(%this)
{
AddNewAssetPopup.showPopup(Canvas);
}
function AssetBrowser_newAsset::onWake(%this)
{
NewAssetModuleList.refresh();
//NewComponentParentClass.setText("Component");
}
function AssetBrowser_newAssetWindow::onClose(%this)
{
NewAssetPropertiesInspector.clearFields();
Canvas.popDialog(AssetBrowser_newAsset);
}
function NewAssetTypeList::onWake(%this)
{
%this.refresh();
}
function NewAssetTypeList::refresh(%this)
{
%this.clear();
//TODO: make this more automated
//%this.add("GameObject", 0);
%this.add("Component", 0);
%this.add("Image", 1);
%this.add("Material", 2);
%this.add("Shape", 3);
%this.add("Sound", 4);
%this.add("State Machine", 5);
}
function NewAssetTypeList::onSelected(%this)
{
%assetType = %this.getText();
if(%assetType $= "Component")
{
NewComponentAssetSettings.hidden = false;
}
}
function NewAssetModuleBtn::onClick(%this)
{
Canvas.pushDialog(AssetBrowser_AddModule);
AssetBrowser_addModuleWindow.selectWindow();
}
function AssetBrowser::setupCreateNewAsset(%this, %assetType, %moduleName)
{
Canvas.pushDialog(AssetBrowser_newAsset);
AssetBrowser_newAssetWindow.text = "New" SPC %assetType SPC "Asset";
NewAssetPropertiesInspector.clear();
NewAssetModuleList.setText(%moduleName);
//get rid of the old one if we had one.
if(isObject(%this.newAssetSettings))
%this.newAssetSettings.delete();
%this.newAssetSettings = new ScriptObject();
%this.newAssetSettings.assetType = %assetType;
%this.newAssetSettings.moduleName = %moduleName;
%shortAssetTypeName = strreplace(%assetType, "Asset", "");
NewAssetPropertiesInspector.startGroup("General");
NewAssetPropertiesInspector.addField("assetName", "New Asset Name", "String", "Name of the new asset", "New" @ %shortAssetTypeName, "", %this.newAssetSettings);
//NewAssetPropertiesInspector.addField("AssetType", "New Asset Type", "List", "Type of the new asset", %assetType, "Component,Image,Material,Shape,Sound,State Machine", %newAssetSettings);
NewAssetPropertiesInspector.addField("friendlyName", "Friendly Name", "String", "Human-readable name of new asset", "", "", %this.newAssetSettings);
NewAssetPropertiesInspector.addField("description", "Description", "Command", "Description of the new asset", "", "", %this.newAssetSettings);
NewAssetPropertiesInspector.endGroup();
if(%assetType $= "ComponentAsset")
{
NewAssetPropertiesInspector.startGroup("Components");
NewAssetPropertiesInspector.addField("parentClass", "New Asset Parent Class", "String", "Name of the new asset's parent class", "Component", "", %this.newAssetSettings);
NewAssetPropertiesInspector.addField("componentGroup", "Component Group", "String", "Name of the group of components this component asset belongs to", "", "", %this.newAssetSettings);
//NewAssetPropertiesInspector.addField("componentName", "Component Name", "String", "Name of the new component", "", "", %this.newAssetSettings);
NewAssetPropertiesInspector.endGroup();
}
else if(%assetType $= "LevelAsset")
{
NewAssetPropertiesInspector.startGroup("Level");
NewAssetPropertiesInspector.addField("levelPreviewImage", "LevePreviewImage", "Image", "Preview Image for the level", "", "", %this.newAssetSettings);
NewAssetPropertiesInspector.endGroup();
}
else if(%assetType $= "ScriptAsset")
{
NewAssetPropertiesInspector.startGroup("Script");
NewAssetPropertiesInspector.addField("isServerScript", "Is Server Script", "bool", "Is this script used on the server?", "1", "", %this.newAssetSettings);
NewAssetPropertiesInspector.endGroup();
}
/*else if(%assetType $= "ShapeAnimationAsset")
{
NewAssetPropertiesInspector.startGroup("Animation");
NewAssetPropertiesInspector.addField("sourceFile", "Source File", "filename", "Source file this animation will pull from", "", "", %this.newAssetSettings);
NewAssetPropertiesInspector.addField("animationName", "Animation Name", "string", "Name of the animation clip when used in a shape", "", "", %this.newAssetSettings);
NewAssetPropertiesInspector.addField("startFrame", "Starting Frame", "int", "Source file this animation will pull from", "", "", %this.newAssetSettings);
NewAssetPropertiesInspector.addField("endFrame", "Ending Frame", "int", "Source file this animation will pull from", "", "", %this.newAssetSettings);
NewAssetPropertiesInspector.addField("padRotation", "Pad Rotations", "bool", "Source file this animation will pull from", "0", "", %this.newAssetSettings);
NewAssetPropertiesInspector.addField("padTransforms", "Pad Transforms", "bool", "Source file this animation will pull from", "0", "", %this.newAssetSettings);
NewAssetPropertiesInspector.endGroup();
}*/
return;
if(%moduleName $= "")
{
Canvas.pushDialog(AssetBrowser_selectModule);
}
else
{
AssetBrowser.SelectedModule = %moduleName;
if(%assetType $= "MaterialAsset")
{
createNewMaterialAsset("NewMaterial", %moduleName);
}
else if(%assetType $= "StateMachineAsset")
{
createNewStateMachineAsset("NewStateMachine", %moduleName);
}
else if(%assetType $= "ScriptAsset")
{
createNewScriptAsset("NewScriptAsset", %moduleName);
}
}
}
//We do a quick validation that mandatory fields are filled in before passing along to the asset-type specific function
function CreateNewAsset()
{
%assetName = AssetBrowser.newAssetSettings.assetName;
if(%assetName $= "")
{
MessageBoxOK( "Error", "Attempted to make a new asset with no name!");
return;
}
//get the selected module data
%moduleName = NewAssetModuleList.getText();
if(%moduleName $= "")
{
MessageBoxOK( "Error", "Attempted to make a new asset with no module!");
return;
}
AssetBrowser.newAssetSettings.moduleName = %moduleName;
%assetType = AssetBrowser.newAssetSettings.assetType;
if(%assetType $= "")
{
MessageBoxOK( "Error", "Attempted to make a new asset with no type!");
return;
}
if(%assetType $= "ComponentAsset")
{
//Canvas.popDialog(AssetBrowser_newComponentAsset);
//AssetBrowser_newComponentAsset-->AssetBrowserModuleList.setText(AssetBrowser.selectedModule);
%assetFilePath = createNewComponentAsset(%assetName, %path);
}
else if(%assetType $= "MaterialAsset")
{
%assetFilePath = createNewMaterialAsset();
}
else if(%assetType $= "StateMachineAsset")
{
%assetFilePath = createNewStateMachineAsset();
}
else if(%assetType $= "GUIAsset")
{
%assetFilePath = createNewGUIAsset();
}
else if(%assetType $= "LevelAsset")
{
%assetFilePath = createNewLevelAsset();
}
else if(%assetType $= "ScriptAsset")
{
%assetFilePath = createNewScriptAsset();
}
else if(%assetType $= "ShapeAnimationAsset")
{
%assetFilePath = createShapeAnimationAsset();
}
Canvas.popDialog(AssetBrowser_newAsset);
//Load it
%moduleDef = ModuleDatabase.findModule(%moduleName,1);
AssetDatabase.addDeclaredAsset(%moduleDef, %assetFilePath);
AssetBrowser.loadFilters();
}
function createNewComponentAsset()
{
%moduleName = AssetBrowser.newAssetSettings.moduleName;
%modulePath = "data/" @ %moduleName;
%assetName = AssetBrowser.newAssetSettings.assetName;
%tamlpath = %modulePath @ "/components/" @ %assetName @ ".asset.taml";
%scriptPath = %modulePath @ "/components/" @ %assetName @ ".cs";
%asset = new ComponentAsset()
{
AssetName = %assetName;
versionId = 1;
componentName = %assetName;
componentClass = AssetBrowser.newAssetSettings.parentClass;
friendlyName = AssetBrowser.newAssetSettings.friendlyName;
componentType = AssetBrowser.newAssetSettings.componentGroup;
description = AssetBrowser.newAssetSettings.description;
scriptFile = %scriptPath;
};
TamlWrite(%asset, %tamlpath);
%file = new FileObject();
if(%file.openForWrite(%scriptPath))
{
//TODO: enable ability to auto-embed a header for copyright or whatnot
%file.writeline("//onAdd is called when the component is created and then added to it's owner entity.\n");
%file.writeline("//You would also add any script-defined component fields via addComponentField().\n");
%file.writeline("function " @ %assetName @ "::onAdd(%this)\n{\n\n}\n");
%file.writeline("//onAdd is called when the component is removed and deleted from it's owner entity.");
%file.writeline("function " @ %assetName @ "::onRemove(%this)\n{\n\n}\n");
%file.writeline("//onClientConnect is called any time a new client connects to the server.");
%file.writeline("function " @ %assetName @ "::onClientConnect(%this, %client)\n{\n\n}\n");
%file.writeline("//onClientDisconnect is called any time a client disconnects from the server.");
%file.writeline("function " @ %assetName @ "::onClientDisonnect(%this, %client)\n{\n\n}\n");
%file.writeline("//update is called when the component does an update tick.\n");
%file.writeline("function " @ %assetName @ "::Update(%this)\n{\n\n}\n");
%file.close();
}
Canvas.popDialog(AssetBrowser_newComponentAsset);
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
AssetBrowser.loadFilters();
%treeItemId = AssetBrowserFilterTree.findItemByName(%moduleName);
%smItem = AssetBrowserFilterTree.findChildItemByName(%treeItemId, "Components");
AssetBrowserFilterTree.onSelect(%smItem);
return %tamlpath;
}
function createNewMaterialAsset()
{
%assetName = AssetBrowser.newAssetSettings.assetName;
%moduleName = AssetBrowser.newAssetSettings.moduleName;
%modulePath = "data/" @ %moduleName;
%tamlpath = %modulePath @ "/materials/" @ %assetName @ ".asset.taml";
%sgfPath = %modulePath @ "/materials/" @ %assetName @ ".sgf";
%asset = new MaterialAsset()
{
AssetName = %assetName;
versionId = 1;
shaderData = "";
shaderGraph = %sgfPath;
};
TamlWrite(%asset, %tamlpath);
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
AssetBrowser.loadFilters();
%treeItemId = AssetBrowserFilterTree.findItemByName(%moduleName);
%smItem = AssetBrowserFilterTree.findChildItemByName(%treeItemId, "Materials");
AssetBrowserFilterTree.onSelect(%smItem);
return %tamlpath;
}
function createNewScriptAsset()
{
%moduleName = AssetBrowser.newAssetSettings.moduleName;
%modulePath = "data/" @ %moduleName;
%assetName = AssetBrowser.newAssetSettings.assetName;
%tamlpath = %modulePath @ "/scripts/" @ %assetName @ ".asset.taml";
%scriptPath = %modulePath @ "/scripts/" @ %assetName @ ".cs";
%asset = new ScriptAsset()
{
AssetName = %assetName;
versionId = 1;
scriptFilePath = %scriptPath;
};
TamlWrite(%asset, %tamlpath);
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
AssetBrowser.loadFilters();
%treeItemId = AssetBrowserFilterTree.findItemByName(%moduleName);
%smItem = AssetBrowserFilterTree.findChildItemByName(%treeItemId, "Scripts");
AssetBrowserFilterTree.onSelect(%smItem);
%file = new FileObject();
if(%file.openForWrite(%scriptPath))
{
%file.close();
}
return %tamlpath;
}
function createNewStateMachineAsset()
{
%assetName = AssetBrowser.newAssetSettings.assetName;
%assetQuery = new AssetQuery();
%matchingAssetCount = AssetDatabase.findAssetName(%assetQuery, %assetName);
%i=1;
while(%matchingAssetCount > 0)
{
%newAssetName = %assetName @ %i;
%i++;
%matchingAssetCount = AssetDatabase.findAssetName(%assetQuery, %newAssetName);
}
%assetName = %newAssetName;
%assetQuery.delete();
%tamlpath = "data/" @ %moduleName @ "/stateMachines/" @ %assetName @ ".asset.taml";
%smFilePath = "data/" @ %moduleName @ "/stateMachines/" @ %assetName @ ".xml";
%asset = new StateMachineAsset()
{
AssetName = %assetName;
versionId = 1;
stateMachineFile = %smFilePath;
};
%xmlDoc = new SimXMLDocument();
%xmlDoc.saveFile(%smFilePath);
%xmlDoc.delete();
TamlWrite(%asset, %tamlpath);
//Now write our XML file
%xmlFile = new FileObject();
%xmlFile.openForWrite(%smFilePath);
%xmlFile.writeLine("<StateMachine>");
%xmlFile.writeLine("</StateMachine>");
%xmlFile.close();
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
AssetBrowser.loadFilters();
%treeItemId = AssetBrowserFilterTree.findItemByName(%moduleName);
%smItem = AssetBrowserFilterTree.findChildItemByName(%treeItemId, "StateMachines");
AssetBrowserFilterTree.onSelect(%smItem);
return %tamlpath;
}
function createNewGUIAsset()
{
%moduleName = AssetBrowser.newAssetSettings.moduleName;
%modulePath = "data/" @ %moduleName;
%assetName = AssetBrowser.newAssetSettings.assetName;
%tamlpath = %modulePath @ "/GUIs/" @ %assetName @ ".asset.taml";
%guipath = %modulePath @ "/GUIs/" @ %assetName @ ".gui";
%scriptPath = %modulePath @ "/GUIs/" @ %assetName @ ".cs";
%asset = new GUIAsset()
{
AssetName = %assetName;
versionId = 1;
scriptFilePath = %scriptPath;
guiFilePath = %guipath;
};
TamlWrite(%asset, %tamlpath);
%file = new FileObject();
if(%file.openForWrite(%guipath))
{
%file.writeline("//--- OBJECT WRITE BEGIN ---");
%file.writeline("%guiContent = new GuiControl(" @ %assetName @ ") {");
%file.writeline(" position = \"0 0\";");
%file.writeline(" extent = \"100 100\";");
%file.writeline("};");
%file.writeline("//--- OBJECT WRITE END ---");
%file.close();
}
if(%file.openForWrite(%scriptPath))
{
%file.writeline("function " @ %assetName @ "::onWake(%this)\n{\n\n}\n");
%file.writeline("function " @ %assetName @ "::onSleep(%this)\n{\n\n}\n");
%file.close();
}
//load the gui
exec(%guipath);
exec(%scriptPath);
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
AssetBrowser.loadFilters();
%treeItemId = AssetBrowserFilterTree.findItemByName(%moduleName);
%smItem = AssetBrowserFilterTree.findChildItemByName(%treeItemId, "GUIs");
AssetBrowserFilterTree.onSelect(%smItem);
return %tamlpath;
}
function createNewLevelAsset()
{
%moduleName = AssetBrowser.newAssetSettings.moduleName;
%modulePath = "data/" @ %moduleName;
%assetName = AssetBrowser.newAssetSettings.assetName;
%tamlpath = %modulePath @ "/levels/" @ %assetName @ ".asset.taml";
%levelPath = %modulePath @ "/levels/" @ %assetName @ ".mis";
%asset = new LevelAsset()
{
AssetName = %assetName;
versionId = 1;
LevelFile = %levelPath;
LevelDescription = AssetBrowser.newAssetSettings.levelDescription;
PreviewImage = AssetBrowser.newAssetSettings.levelPreviewImage;
};
TamlWrite(%asset, %tamlpath);
if(!pathCopy("tools/levels/BlankRoom.mis", %levelPath, false))
{
echo("Unable to copy template level file!");
}
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
AssetBrowser.loadFilters();
%treeItemId = AssetBrowserFilterTree.findItemByName(%moduleName);
%smItem = AssetBrowserFilterTree.findChildItemByName(%treeItemId, "Levels");
AssetBrowserFilterTree.onSelect(%smItem);
return %tamlpath;
}
function createNewShapeAnimationAsset()
{
%dlg = new OpenFileDialog()
{
Filters = "Animation Files(*.dae, *.cached.dts)|*.dae;*.cached.dts";
DefaultPath = $Pref::WorldEditor::LastPath;
DefaultFile = "";
ChangePath = false;
OverwritePrompt = true;
forceRelativePath = false;
//MultipleFiles = true;
};
%ret = %dlg.Execute();
if ( %ret )
{
$Pref::WorldEditor::LastPath = filePath( %dlg.FileName );
%fullPath = %dlg.FileName;
}
%dlg.delete();
if ( !%ret )
return;
/*%moduleName = AssetBrowser.newAssetSettings.moduleName;
%modulePath = "data/" @ %moduleName;
%assetName = AssetBrowser.newAssetSettings.assetName;
%tamlpath = %modulePath @ "/levels/" @ %assetName @ ".asset.taml";
%levelPath = %modulePath @ "/levels/" @ %assetName @ ".mis";
%asset = new ShapeAnimationAsset()
{
AssetName = %assetName;
versionId = 1;
LevelFile = %levelPath;
LevelDescription = AssetBrowser.newAssetSettings.levelDescription;
PreviewImage = AssetBrowser.newAssetSettings.levelPreviewImage;
};
TamlWrite(%asset, %tamlpath);
if(!pathCopy("tools/levels/BlankRoom.mis", %levelPath, false))
{
echo("Unable to copy template level file!");
}
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
AssetBrowser.loadFilters();
%treeItemId = AssetBrowserFilterTree.findItemByName(%moduleName);
%smItem = AssetBrowserFilterTree.findChildItemByName(%treeItemId, "Levels");
AssetBrowserFilterTree.onSelect(%smItem);
return %tamlpath;*/
}
function ParentComponentList::onWake(%this)
{
%this.refresh();
}
function ParentComponentList::refresh(%this)
{
%this.clear();
%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);
%componentName = %componentAsset.componentName;
if(%componentName $= "")
%componentName = %componentAsset.componentClass;
%this.add(%componentName, %i);
}*/
%categories = "";
for (%i = 0; %i < %count; %i++)
{
%assetId = %assetQuery.getAsset(%i);
%componentAsset = AssetDatabase.acquireAsset(%assetId);
%componentClass = %componentAsset.componentClass;
if (!isInList(%componentClass, %categories))
%categories = %categories TAB %componentClass;
}
%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);
%componentName = %componentAsset.componentName;
%componentClass = %componentAsset.componentClass;
if (%componentClass $= %category)
{
if(%componentName !$= "")
%this.add(" "@%componentName, %i);
}
}
}
}
//----------------------------------------------------------
// Game Object creation
//----------------------------------------------------------
function EWorldEditor::createGameObject( %this )
{
GameObjectCreatorObjectName.text = "";
%activeSelection = %this.getActiveSelection();
if( %activeSelection.getCount() == 0 )
return;
GameObjectCreator.selectedEntity = %activeSelection.getObject( 0 );
Canvas.pushDialog(GameObjectCreator);
}

View file

@ -0,0 +1,154 @@
function AssetBrowser::buildPopupMenus(%this)
{
if( !isObject( AddNewModulePopup ) )
{
new PopupMenu( AddNewModulePopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
isPopup = true;
item[ 0 ] = "Create New Module" TAB "" TAB "AssetBrowser.CreateNewModule();";
item[ 1 ] = "Refresh Module Dependencies" TAB "" TAB "AssetBrowser.RefreshModuleDependencies();";
};
}
if( !isObject( EditAssetPopup ) )
{
new PopupMenu( EditAssetPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
item[ 0 ] = "Edit Asset" TAB "" TAB "AssetBrowser.editAsset();";
item[ 1 ] = "Rename Asset" TAB "" TAB "AssetBrowser.renameAsset();";
item[ 2 ] = "Refresh Asset" TAB "" TAB "AssetBrowser.refreshAsset();";
item[ 3 ] = "Asset Properties" TAB "" TAB "AssetBrowser.editAssetInfo();";
item[ 4 ] = "-";
Item[ 5 ] = "Duplicate Asset" TAB "" TAB "AssetBrowser.duplicateAsset();";
item[ 6 ] = "-";
item[ 7 ] = "Re-Import Asset" TAB "" TAB "AssetBrowser.reImportAsset();";
item[ 8 ] = "-";
item[ 9 ] = "Delete Asset" TAB "" TAB "AssetBrowser.deleteAsset();";
jumpFileName = "";
jumpLineNumber = "";
};
}
if( !isObject( AddNewComponentAssetPopup ) )
{
new PopupMenu( AddNewComponentAssetPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
//item[ 0 ] = "Create Component" TAB "" TAB "Canvas.pushDialog(AssetBrowser_newComponentAsset); AssetBrowser_newComponentAsset-->NewComponentPackageList.setText(AssetBrowser.selectedModule);";
item[ 0 ] = "Component" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ComponentAsset\", AssetBrowser.selectedModule);";
//list other common component types here to shortcut the creation process
};
}
if( !isObject( AddNewScriptAssetPopup ) )
{
%this.AddNewScriptAssetPopup = new PopupMenu( AddNewScriptAssetPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
item[ 0 ] = "Create Component" TAB AddNewComponentAssetPopup;
item[ 1 ] = "Create Script" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ScriptAsset\", AssetBrowser.selectedModule);";
item[ 2 ] = "Create State Machine" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"StateMachineAsset\", AssetBrowser.selectedModule);";
//item[ 3 ] = "-";
//item[ 3 ] = "Create Game Object" TAB "" TAB "AssetBrowser.createNewGameObjectAsset(\"NewGameObject\", AssetBrowser.selectedModule);";
};
//%this.AddNewScriptAssetPopup.insertSubMenu(0, "Create Component", AddNewComponentAssetPopup);
}
if( !isObject( AddNewArtAssetPopup ) )
{
%this.AddNewArtAssetPopup = new PopupMenu( AddNewArtAssetPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
item[ 0 ] = "Create Material" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"MaterialAsset\", AssetBrowser.selectedModule);";//"createNewMaterialAsset(\"NewMaterial\", AssetBrowser.selectedModule);";
item[ 1 ] = "Create Image" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ImageAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewImageAsset(\"NewImage\", AssetBrowser.selectedModule);";
item[ 2 ] = "-";
item[ 3 ] = "Create Shape" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"Shape\", AssetBrowser.selectedModule);";
item[ 4 ] = "Create Shape Animation" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ShapeAnimationAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewShapeAnimationAsset(\"NewShapeAnimation\", AssetBrowser.selectedModule);";
item[ 5 ] = "-";
item[ 6 ] = "Create GUI" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"GUIAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewGUIAsset(\"NewGUI\", AssetBrowser.selectedModule);";
item[ 7 ] = "-";
item[ 8 ] = "Create Post Effect" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"PostEffectAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewPostEffectAsset(\"NewPostEffect\", AssetBrowser.selectedModule);";
item[ 9 ] = "-";
item[ 10 ] = "Create Sound" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"SoundAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewSoundAsset(\"NewSound\", AssetBrowser.selectedModule);";
item[ 11 ] = "-";
item[ 12 ] = "Create Particle Effect" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ParticleEffectAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewParticleEffectAsset(\"NewParticleEffect\", AssetBrowser.selectedModule);";
};
}
if( !isObject( AddNewAssetPopup ) )
{
%this.AddNewAssetPopup = new PopupMenu( AddNewAssetPopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
item[0] = "Create Code Asset" TAB AddNewScriptAssetPopup;
item[1] = "-";
item[2] = "Create Art Asset" TAB AddNewArtAssetPopup;
item[3] = "-";
item[4] = "Create Level" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"LevelAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewLevelAsset(\"NewLevel\", AssetBrowser.selectedModule);";
};
}
if( !isObject( EditModulePopup ) )
{
new PopupMenu( EditModulePopup )
{
superClass = "MenuBuilder";
class = "EditorWorldMenu";
//isPopup = true;
item[ 0 ] = "Create New Asset" TAB AddNewAssetPopup;
item[ 1 ] = "Reload Module" TAB "" TAB "AssetBrowser.reloadModule();";
Item[ 2 ] = "-";
Item[ 3 ] = "Edit Module" TAB "" TAB "AssetBrowser.editModuleInfo();";
Item[ 4 ] = "-";
Item[ 5 ] = "Duplicate Module" TAB "" TAB "AssetBrowser.copyModule();";
Item[ 6 ] = "-";
Item[ 7 ] = "Delete Module" TAB "" TAB "AssetBrowser.deleteModule();";
};
}
//Some assets are not yet ready/implemented, so disable their creation here
AddNewArtAssetPopup.enableItem(3, false); //shape
AddNewArtAssetPopup.enableItem(4, false); //shape animation
AddNewArtAssetPopup.enableItem(8, false); //post effect
AddNewArtAssetPopup.enableItem(10, false); //sound asset
AddNewArtAssetPopup.enableItem(12, false); //particle effect
AddNewScriptAssetPopup.enableItem(2, false); //state machine
}
function AddNewScriptAssetPopupMenu::onSelectItem(%this, %id, %text)
{
return true;
}
function AddNewScriptAssetPopupMenu::setupDefaultState(%this)
{
// Setup camera speed gui's. Both menu and editorgui
%this.setupGuiControls();
Parent::setupDefaultState(%this);
}
function AddNewScriptAssetPopupMenu::setupGuiControls(%this)
{
}

View file

@ -0,0 +1,17 @@
function AssetBrowser_selectModule::onWake(%this)
{
AssetBrowser_SelectModuleWindow-->ModuleList.refresh();
}
function SelectModule_NewAssetModuleBtn::onClick(%this)
{
Canvas.pushDialog(AssetBrowser_AddModule);
AssetBrowser_addModuleWindow.selectWindow();
AssetBrowser_AddModule.callback = "AssetBrowser_selectModule.newModuleAdded();";
}
function AssetBrowser_selectModule::newModuleAdded(%this)
{
AssetBrowser_SelectModuleWindow-->ModuleList.refresh();
}

View file

@ -0,0 +1,17 @@
function AssetBrowser_selectPackage::onWake(%this)
{
AssetBrowser_SelectPackageWindow-->packageList.refresh();
}
function SelectPackage_NewAssetPackageBtn::onClick(%this)
{
Canvas.pushDialog(AssetBrowser_AddPackage);
AssetBrowser_addPackageWindow.selectWindow();
AssetBrowser_AddPackage.callback = "AssetBrowser_selectPackage.newPackageAdded();";
}
function AssetBrowser_selectPackage::newPackageAdded(%this)
{
AssetBrowser_SelectPackageWindow-->packageList.refresh();
}

View file

@ -16,7 +16,6 @@ singleton CubemapData( BlankSkyCubemap )
singleton Material( BlankSkyMat )
{
cubemap = BlankSkyCubemap;
isSky = true;
};
singleton Material(White)

View file

@ -1,7 +0,0 @@
skybox_1
skybox_2
skybox_3
skybox_4
skybox_5
skybox_6
skybox_6

View file

@ -152,9 +152,20 @@ function MenuBuilder::onAdd(%this)
}
}
function MenuBuilder::reloadItems(%this)
{
%this.clearItems();
for(%i = 0;%this.item[%i] !$= "";%i++)
{
%this.addItem(%i);
}
}
function MenuBuilder::onRemove(%this)
{
%this.removeFromMenuBar();
if(%this.isMethod("removeFromMenuBar"))
%this.removeFromMenuBar();
}
//////////////////////////////////////////////////////////////////////////

View file

@ -154,13 +154,13 @@ function QuickEditComponentList::onHotTrackItem( %this, %itemID )
SuperTooltipDlg.setTitle(%componentObj.friendlyName);
SuperTooltipDlg.addParam("", %componentObj.description @ "\n");
%fieldCount = %componentObj.getComponentFieldCount();
/*%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;
@ -219,7 +219,7 @@ function AddComponentQuickEditButton::onClick(%this)
%instance.owner = Inspector.getInspectObject(0);
%instance.owner.add(%instance);
Inspector.schedule( 50, "refresh" );
schedule( 50, 0, "refreshInspector", Inspector.getInspectObject(0) );
EWorldEditor.isDirty = true;
}
@ -227,7 +227,97 @@ function addComponent(%obj, %instance)
{
echo("Adding the component!");
%obj.addComponent(%instance);
Inspector.schedule( 50, "refresh" );
//Inspector.schedule( 50, "refresh" );
schedule( 50, 0, "refreshInspector", Inspector.getInspectObject(0) );
EWorldEditor.isDirty = true;
}
function refreshInspector(%entity)
{
inspector.removeInspect(%entity);
inspector.addInspect(%entity);
}
function GuiInspectorComponentGroup::onConstructComponentField(%this, %component, %fieldName)
{
//echo("Tried to make a component field for component:" @ %component @ " for the " @ %fieldName @ " field.");
%fieldType = %component.getComponentFieldType(%fieldName);
%makeCommand = %this @ ".build" @ %fieldType @ "Field("@ %component @ "," @ %fieldName @ ");";
eval(%makeCommand);
}
function GuiInspectorComponentGroup::onRightMouseUp(%this, %point)
{
if( !isObject( InspectComponentPopup ) )
new PopupMenu( InspectComponentPopup )
{
superClass = "MenuBuilder";
isPopup = true;
item[ 0 ] = "View in Asset Browser" TAB "" TAB "AssetBrowser.editAsset();";
item[ 1 ] = "Delete Component" TAB "" TAB "schedule(10, 0, ComponentEditorRemoveComponent, InspectComponentPopup.componentOwner, InspectComponentPopup.component);";
item[ 2 ] = "Edit Script" TAB "" TAB "AssetBrowser.editAsset();";
item[ 3 ] = "";
};
%comp = %this.getComponent();
InspectComponentPopup.componentOwner = %comp.owner;
InspectComponentPopup.component = %comp;
//Find out our asset!
%componentName = %this.caption;
%assetQuery = new AssetQuery();
if(!AssetDatabase.findAssetType(%assetQuery, "ComponentAsset"))
return; //if we didn't find ANY, just exit
EditAssetPopup.assetId = "";
// Find all the types.
%count = %assetQuery.getCount();
%categories = "";
for (%i = 0; %i < %count; %i++)
{
%assetId = %assetQuery.getAsset(%i);
%componentAsset = AssetDatabase.acquireAsset(%assetId);
%friendlyName = %componentAsset.friendlyName;
if(%friendlyName !$= "" && %friendlyName $= %componentName)
{
EditAssetPopup.assetId = %assetId;
break;
}
%compName = %componentAsset.componentName;
if(%compName !$= "" && %compName $= %componentName)
{
EditAssetPopup.assetId = %assetId;
break;
}
}
if(EditAssetPopup.assetId $= "")
{
//didn't find it
InspectComponentPopup.enableItem(0, false);
InspectComponentPopup.enableItem(2, false);
}
else
{
InspectComponentPopup.enableItem(0, true);
InspectComponentPopup.enableItem(2, true);
}
InspectComponentPopup.showPopup(Canvas);
}
function ComponentEditorRemoveComponent(%entity, %component)
{
%entity.removeComponent(%component, true);
inspector.removeInspect(%entity);
inspector.addInspect(%entity);
}

View file

@ -189,7 +189,7 @@ function ConvexEditorPlugin::onSaveMission( %this, %missionFile )
{
if( ConvexEditorGui.isDirty )
{
MissionGroup.save( %missionFile );
getScene(0).save( %missionFile );
ConvexEditorGui.isDirty = false;
}
}

View file

@ -50,7 +50,7 @@ function ForestEditorGui::onActiveForestUpdated( %this, %forest, %createNew )
/// Called from a message box when a forest is not found.
function ForestEditorGui::createForest( %this )
{
%forestObject = parseMissionGroupForIds("Forest", "");
%forestObject = trim(parseMissionGroupForIds("Forest", ""));
if ( isObject( %forestObject ) )
{

View file

@ -144,7 +144,7 @@ function ForestEditorPlugin::onActivated( %this )
//ForestEditToolbar.setVisible( true );
//Get our existing forest object in our current mission if we have one
%forestObject = parseMissionGroupForIds("Forest", "");
%forestObject = trim(parseMissionGroupForIds("Forest", ""));
if(isObject(%forestObject))
{
ForestEditorGui.setActiveForest(%forestObject.getName());
@ -242,7 +242,7 @@ function ForestEditorPlugin::onSaveMission( %this, %missionFile )
ForestDataManager.saveDirty();
//First, find out if we have an existing forest object
%forestObject = parseMissionGroupForIds("Forest", "");
%forestObject = trim(parseMissionGroupForIds("Forest", ""));
if ( isObject( %forestObject ) )
{

View file

@ -1584,7 +1584,7 @@ function ColladaImportDlg::onOK(%this)
function ColladaImportDlg::loadLights(%this)
{
// Get the ID of the last object added
%obj = MissionGroup.getObject(MissionGroup.getCount()-1);
%obj = getScene(0).getObject(getScene(0).getCount()-1);
// Create a new SimGroup to hold the model and lights
%group = new SimGroup();
@ -1596,7 +1596,7 @@ function ColladaImportDlg::loadLights(%this)
{
%group.add(%obj);
%group.bringToFront(%obj);
MissionGroup.add(%group);
getScene(0).add(%group);
if (EditorTree.isVisible())
{
EditorTree.removeItem(EditorTree.findItemByObjectId(%obj));

View file

@ -718,22 +718,6 @@
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiCheckBoxCtrl() {
text = "use sRGB";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
position = "360 105";
extent = "66 16";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiCheckBoxProfile";
visible = "1";
active = "1";
variable = "$displayAsSRGB";
command = "useSRGBctrl($displayAsSRGB);";
};
};
};
//--- OBJECT WRITE END ---
@ -743,15 +727,6 @@ $ColorPickerCancelCallback = "";
$ColorPickerUpdateCallback = "";
$ColorCallbackType = 1; // ColorI
function useSRGBctrl(%colorScale)
{
ColorPickerDlg.useSRGB = %colorScale;
ColorRangeSelect.useSRGB = %colorScale;
ColorBlendSelect.useSRGB = %colorScale;
myColor.useSRGB = %colorScale;
oldColor.useSRGB = %colorScale;
}
// This function pushes the color picker dialog and returns to a callback the selected value
function GetColorI( %currentColor, %callback, %root, %updateCallback, %cancelCallback )
{

View file

@ -35,5 +35,4 @@ exec("./GuiEaseEditDlg.ed.cs");
exec("./guiObjectInspector.ed.cs");
exec("./uvEditor.ed.gui");
exec("./objectSelection.ed.cs");
exec("./guiPlatformGenericMenubar.ed.cs");
exec("./postFxManager.gui");

View file

@ -1,19 +0,0 @@
if(isClass(GuiPlatformGenericMenuBar))
{
exec("./guiPlatformGenericMenubar.ed.gui");
}
else
{
%guiContent = new GuiControl(PlatformGenericMenubar) {
profile = "GuiModelessDialogProfile";
new GuiControl()
{
internalName = "menubar";
extent = "1024 20";
minExtent = "320 20";
horizSizing = "width";
profile = "GuiMenuBarProfile";
};
};
}

View file

@ -1,14 +0,0 @@
//--- OBJECT WRITE BEGIN ---
%guiContent = new GuiControl(PlatformGenericMenubar) {
profile = "GuiModelessDialogProfile";
new GuiPlatformGenericMenuBar()
{
internalName = "menubar";
extent = "1024 20";
minExtent = "320 20";
horizSizing = "width";
profile = "GuiMenuBarProfile";
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -1154,14 +1154,14 @@ function MaterialSelector::buildPreviewArray( %this, %material )
%matName = %material.getInternalName();
if( %material.diffuseMap $= "")
%previewImage = "core/art/warnmat";
%previewImage = "core/images/warnmat";
else
%previewImage = %material.diffuseMap;
}
else if( %material.toneMap[0] $= "" && %material.diffuseMap[0] $= "" && !isObject(%material.cubemap) )
{
%matName = %material.name;
%previewImage = "core/art/warnmat";
%previewImage = "core/images/warnmat";
}
else
{
@ -1611,7 +1611,7 @@ function MaterialSelector::createNewMaterial( %this )
new Material(%material)
{
diffuseMap[0] = "core/art/warnMat";
diffuseMap[0] = "core/images/warnmat";
mapTo = "unmapped_mat";
parentGroup = RootGroup;
};
@ -1649,7 +1649,7 @@ function MaterialSelector::createNewMaterial( %this )
position = "7 4";
extent = "64 64";
buttonType = "PushButton";
bitmap = "core/art/warnMat";
bitmap = "core/images/warnmat";
Command = "";
text = "Loading...";
useStates = false;
@ -1690,7 +1690,7 @@ function MaterialSelector::createNewMaterial( %this )
}
// select me
MaterialSelector.updateSelection( %material, "core/art/warnMat.png" );
MaterialSelector.updateSelection( %material, "core/images/warnmat.png" );
}
//needs to be deleted with the persistence manager and needs to be blanked out of the matmanager

View file

@ -287,6 +287,31 @@ new GuiControlProfile( ToolsGuiTextEditProfile )
category = "Tools";
};
if( !isObject( ToolsGuiTextEditCenterProfile ) )
new GuiControlProfile (ToolsGuiTextEditCenterProfile)
{
opaque = true;
//bitmap = "./images/textEditFrame";
//hasBitmapArray = true;
border = -2; // fix to display textEdit img
//borderWidth = "1"; // fix to display textEdit img
//borderColor = "100 100 100";
fillColor = "255 255 255 0";
fillColorHL = "72 72 72";
fillColorSEL = "255 255 255";
fontColor = "196 196 196 255";
fontColorHL = "255 255 255";
fontColorSEL = "0 0 0";
fontColorNA = "196 196 196 255";
textOffset = "4 2";
autoSizeWidth = false;
autoSizeHeight = true;
justify = "center";
tab = true;
canKeyFocus = true;
category = "Tools";
};
if( !isObject( ToolsGuiNumericTextEditProfile ) )
new GuiControlProfile( ToolsGuiNumericTextEditProfile : ToolsGuiTextEditProfile )
{
@ -1068,10 +1093,14 @@ singleton GuiControlProfile( GuiMenuBarProfile )
{
fillcolor = "255 255 255";
fillcolorHL = "213 231 248";
borderColor = "98 163 229";
borderColorHL = "122 177 232";
border = 0;
fontColorNA = "180 180 180";
border = 1;
borderThickness = 1;
borderColor = "128 128 128";
borderColorHL = "122 177 232";
opaque = true;
mouseOverSelected = true;
category = "Editor";

View file

@ -501,7 +501,7 @@ function UVEditor::showDialog( %this, %applyCallback, %obj, %uv)
%material = %obj.material;
if( %material.toneMap[0] $= "" && %material.diffuseMap[0] $= "" && !isObject(%material.cubemap) )
{
%previewImage = "core/art/warnmat";
%previewImage = "core/images/warnmat";
}
else
{

View file

@ -223,7 +223,7 @@ function GuiEditor::switchToWorldEditor( %this )
function GuiEditor::enableMenuItems(%this, %val)
{
%menu = GuiEditCanvas.menuBar->EditMenu.getID();
%menu = GuiEditCanvas.menuBar.findMenu("Edit").getID();
%menu.enableItem( 3, %val ); // cut
%menu.enableItem( 4, %val ); // copy
@ -239,8 +239,8 @@ function GuiEditor::enableMenuItems(%this, %val)
%menu.enableItem( 18, %val ); // group
%menu.enableItem( 19, %val ); // ungroup
GuiEditCanvas.menuBar->LayoutMenu.enableAllItems( %val );
GuiEditCanvas.menuBar->MoveMenu.enableAllItems( %val );
GuiEditCanvas.menuBar.findMenu("Layout").enableAllItems( %val );
GuiEditCanvas.menuBar.findMenu("Move").enableAllItems( %val );
}
//---------------------------------------------------------------------------------------------
@ -294,7 +294,7 @@ function GuiEditor::updateUndoMenu(%this)
%nextUndo = %uman.getNextUndoName();
%nextRedo = %uman.getNextRedoName();
%editMenu = GuiEditCanvas.menuBar->editMenu;
%editMenu = GuiEditCanvas.menuBar.findMenu("Edit");
%editMenu.setItemName( 0, "Undo " @ %nextUndo );
%editMenu.setItemName( 1, "Redo " @ %nextRedo );
@ -443,7 +443,7 @@ function GuiEditor::setPreviewResolution( %this, %width, %height )
function GuiEditor::toggleEdgeSnap( %this )
{
%this.snapToEdges = !%this.snapToEdges;
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_EDGESNAP_INDEX, %this.snapToEdges );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_EDGESNAP_INDEX, %this.snapToEdges );
GuiEditorEdgeSnapping_btn.setStateOn( %this.snapToEdges );
}
@ -452,7 +452,7 @@ function GuiEditor::toggleEdgeSnap( %this )
function GuiEditor::toggleCenterSnap( %this )
{
%this.snapToCenters = !%this.snapToCenters;
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_CENTERSNAP_INDEX, %this.snapToCenters );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_CENTERSNAP_INDEX, %this.snapToCenters );
GuiEditorCenterSnapping_btn.setStateOn( %this.snapToCenters );
}
@ -461,7 +461,7 @@ function GuiEditor::toggleCenterSnap( %this )
function GuiEditor::toggleFullBoxSelection( %this )
{
%this.fullBoxSelection = !%this.fullBoxSelection;
GuiEditCanvas.menuBar->EditMenu.checkItem( $GUI_EDITOR_MENU_FULLBOXSELECT_INDEX, %this.fullBoxSelection );
GuiEditCanvas.menuBar.findMenu("Edit").checkItem( $GUI_EDITOR_MENU_FULLBOXSELECT_INDEX, %this.fullBoxSelection );
}
//---------------------------------------------------------------------------------------------
@ -469,7 +469,7 @@ function GuiEditor::toggleFullBoxSelection( %this )
function GuiEditor::toggleDrawGuides( %this )
{
%this.drawGuides= !%this.drawGuides;
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_DRAWGUIDES_INDEX, %this.drawGuides );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_DRAWGUIDES_INDEX, %this.drawGuides );
}
//---------------------------------------------------------------------------------------------
@ -477,7 +477,7 @@ function GuiEditor::toggleDrawGuides( %this )
function GuiEditor::toggleGuideSnap( %this )
{
%this.snapToGuides = !%this.snapToGuides;
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_GUIDESNAP_INDEX, %this.snapToGuides );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_GUIDESNAP_INDEX, %this.snapToGuides );
}
//---------------------------------------------------------------------------------------------
@ -485,7 +485,7 @@ function GuiEditor::toggleGuideSnap( %this )
function GuiEditor::toggleControlSnap( %this )
{
%this.snapToControls = !%this.snapToControls;
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_CONTROLSNAP_INDEX, %this.snapToControls );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_CONTROLSNAP_INDEX, %this.snapToControls );
}
//---------------------------------------------------------------------------------------------
@ -493,7 +493,7 @@ function GuiEditor::toggleControlSnap( %this )
function GuiEditor::toggleCanvasSnap( %this )
{
%this.snapToCanvas = !%this.snapToCanvas;
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_CANVASSNAP_INDEX, %this.snapToCanvas );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_CANVASSNAP_INDEX, %this.snapToCanvas );
}
//---------------------------------------------------------------------------------------------
@ -506,7 +506,7 @@ function GuiEditor::toggleGridSnap( %this )
else
%this.setSnapToGrid( %this.snap2GridSize );
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_GRIDSNAP_INDEX, %this.snap2Grid );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_GRIDSNAP_INDEX, %this.snap2Grid );
GuiEditorSnapCheckBox.setStateOn( %this.snap2Grid );
}
@ -993,14 +993,14 @@ function GuiEditorGui::onWake( %this )
// Set up initial menu toggle states.
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_EDGESNAP_INDEX, GuiEditor.snapToEdges );
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_CENTERSNAP_INDEX, GuiEditor.snapToCenters );
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_GUIDESNAP_INDEX, GuiEditor.snapToGuides );
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_CONTROLSNAP_INDEX, GuiEditor.snapToControls );
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_CANVASSNAP_INDEX, GuiEditor.snapToCanvas );
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_GRIDSNAP_INDEX, GuiEditor.snap2Grid );
GuiEditCanvas.menuBar->SnapMenu.checkItem( $GUI_EDITOR_MENU_DRAWGUIDES_INDEX, GuiEditor.drawGuides );
GuiEditCanvas.menuBar->EditMenu.checkItem( $GUI_EDITOR_MENU_FULLBOXSELECT_INDEX, GuiEditor.fullBoxSelection );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_EDGESNAP_INDEX, GuiEditor.snapToEdges );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_CENTERSNAP_INDEX, GuiEditor.snapToCenters );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_GUIDESNAP_INDEX, GuiEditor.snapToGuides );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_CONTROLSNAP_INDEX, GuiEditor.snapToControls );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_CANVASSNAP_INDEX, GuiEditor.snapToCanvas );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_GRIDSNAP_INDEX, GuiEditor.snap2Grid );
GuiEditCanvas.menuBar.findMenu("Snap").checkItem( $GUI_EDITOR_MENU_DRAWGUIDES_INDEX, GuiEditor.drawGuides );
GuiEditCanvas.menuBar.findMenu("Edit").checkItem( $GUI_EDITOR_MENU_FULLBOXSELECT_INDEX, GuiEditor.fullBoxSelection );
// Sync toolbar buttons.

View file

@ -66,9 +66,13 @@ function GuiEditCanvas::onCreateMenu(%this)
}
// Menu bar
%this.menuBar = new MenuBar()
%this.menuBar = new GuiMenuBar(GuiEditorMenubar)
{
dynamicItemInsertPos = 3;
extent = "1024 20";
minExtent = "320 20";
horizSizing = "width";
profile = "GuiMenuBarProfile";
new PopupMenu()
{

View file

@ -28,33 +28,6 @@
function GuiEditorTreeView::init(%this)
{
if( !isObject( %this.contextMenu ) )
%this.contextMenu = new PopupMenu()
{
superClass = "MenuBuilder";
isPopup = true;
item[ 0 ] = "Rename" TAB "" TAB "GuiEditorTreeView.showItemRenameCtrl( GuiEditorTreeView.findItemByObjectId( %this.object ) );";
item[ 1 ] = "Delete" TAB "" TAB "GuiEditor.deleteControl( %this.object );";
item[ 2 ] = "-";
item[ 3 ] = "Locked" TAB "" TAB "%this.object.setLocked( !%this.object.locked ); GuiEditorTreeView.update();";
item[ 4 ] = "Hidden" TAB "" TAB "%this.object.setVisible( !%this.object.isVisible() ); GuiEditorTreeView.update();";
item[ 5 ] = "-";
item[ 6 ] = "Add New Controls Here" TAB "" TAB "GuiEditor.setCurrentAddSet( %this.object );";
item[ 7 ] = "Add Child Controls to Selection" TAB "" TAB "GuiEditor.selectAllControlsInSet( %this.object, false );";
item[ 8 ] = "Remove Child Controls from Selection" TAB "" TAB "GuiEditor.selectAllControlsInSet( %this.object, true );";
object = -1;
};
if( !isObject( %this.contextMenuMultiSel ) )
%this.contextMenuMultiSel = new PopupMenu()
{
superClass = "MenuBuilder";
isPopup = true;
item[ 0 ] = "Delete" TAB "" TAB "GuiEditor.deleteSelection();";
};
}
//---------------------------------------------------------------------------------------------
@ -113,12 +86,36 @@ function GuiEditorTreeView::onRightMouseDown( %this, %item, %pts, %obj )
{
if( %this.getSelectedItemsCount() > 1 )
{
%popup = %this.contextMenuMultiSel;
%popup = new PopupMenu()
{
superClass = "MenuBuilder";
isPopup = true;
object = -1;
};
%popup.item[ 0 ] = "Delete" TAB "" TAB "GuiEditor.deleteSelection();";
%popup.reloadItems();
%popup.showPopup( Canvas );
}
else if( %obj )
{
%popup = %this.contextMenu;
%popup = new PopupMenu()
{
superClass = "MenuBuilder";
isPopup = true;
object = %obj;
};
%popup.item[ 0 ] = "Rename" TAB "" TAB "GuiEditorTreeView.showItemRenameCtrl( GuiEditorTreeView.findItemByObjectId(" @ %popup.object @ ") );";
%popup.item[ 1 ] = "Delete" TAB "" TAB "GuiEditor.deleteControl(" @ %popup.object @ ");";
%popup.item[ 2 ] = "-";
%popup.item[ 3 ] = "Locked" TAB "" TAB "%this.object.setLocked( !" @ %popup.object @ ".locked); GuiEditorTreeView.update();";
%popup.item[ 4 ] = "Hidden" TAB "" TAB "%this.object.setVisible( !" @ %popup.object @ ".isVisible() ); GuiEditorTreeView.update();";
%popup.item[ 5 ] = "-";
%popup.item[ 6 ] = "Add New Controls Here" TAB "" TAB "GuiEditor.setCurrentAddSet( " @ %popup.object @ ");";
%popup.item[ 7 ] = "Add Child Controls to Selection" TAB "" TAB "GuiEditor.selectAllControlsInSet( " @ %popup.object @ ", false );";
%popup.item[ 8 ] = "Remove Child Controls from Selection" TAB "" TAB "GuiEditor.selectAllControlsInSet( " @ %popup.object @ ", true );";
%popup.checkItem( 3, %obj.locked );
%popup.checkItem( 4, !%obj.isVisible() );
@ -127,7 +124,8 @@ function GuiEditorTreeView::onRightMouseDown( %this, %item, %pts, %obj )
%popup.enableItem( 7, %obj.getCount() > 0 );
%popup.enableItem( 8, %obj.getCount() > 0 );
%popup.object = %obj;
%popup.reloadItems();
%popup.showPopup( Canvas );
}
}

View file

@ -1,5 +1,5 @@
//--- OBJECT WRITE BEGIN ---
new SimGroup(MissionGroup) {
new Scene(EditorTemplateLevel) {
canSave = "1";
canSaveDynamicFields = "1";
cdTrack = "2";
@ -24,9 +24,9 @@ new SimGroup(MissionGroup) {
soundDistanceModel = "Linear";
canSave = "1";
canSaveDynamicFields = "1";
desc0 = "A blank room ready to be populated with Torque objects. Guns, anyone?";
desc0 = "A blank room template that acts as a starting point.";
enabled = "1";
levelName = "Blank Room";
levelName = "Blank Room Template";
};
new SkyBox(theSky) {
Material = "BlankSkyMat";

View file

@ -1,4 +1,4 @@
$PostFXManager::Settings::ColorCorrectionRamp = "core/images/null_color_ramp.png";
$PostFXManager::Settings::ColorCorrectionRamp = "core/postFX/images/null_color_ramp.png";
$PostFXManager::Settings::DOF::BlurCurveFar = "";
$PostFXManager::Settings::DOF::BlurCurveNear = "";
$PostFXManager::Settings::DOF::BlurMax = "";

View file

@ -122,6 +122,17 @@ package Tools
if( isFunction( %initializeFunction ) )
call( %initializeFunction );
}
//Now, go through and load any tool-group modules
ModuleDatabase.setModuleExtension("module");
//Any common tool modules
ModuleDatabase.scanModules( "tools", false );
ModuleDatabase.LoadGroup( "Tool" );
//Do any tools that come in with a gameplay package. These are usually specialized tools
//ModuleDatabase.scanModules( "data", false );
//ModuleDatabase.LoadGroup( "Tool" );
// Popuplate the default SimObject icons that
// are used by the various editors.
@ -214,6 +225,29 @@ package Tools
}
};
function EditorCreateFakeGameSession(%fileName)
{
// Create a local game server and connect to it.
if(isObject(ServerGroup))
ServerGroup.delete();
new SimGroup(ServerGroup);
if(isObject(ServerConnection))
ServerConnection.delete();
new GameConnection(ServerConnection);
// This calls GameConnection::onConnect.
ServerConnection.connectLocal();
$instantGroup = ServerGroup;
$Game::MissionGroup = "MissionGroup";
exec(%file);
}
function fastLoadWorldEdit(%val)
{
if(%val)
@ -222,37 +256,64 @@ function fastLoadWorldEdit(%val)
{
onStart();
}
if(!$Game::running)
%timerId = startPrecisionTimer();
if( GuiEditorIsActive() )
toggleGuiEditor(1);
if( !$missionRunning )
{
//startGame();
activatePackage( "BootEditor" );
ChooseLevelDlg.launchInEditor = false;
StartGame("tools/levels/BlankRoom.mis", "SinglePlayer");
if(!isObject(Observer))
{
datablock CameraData(Observer) {};
}
%cam = new Camera()
{
datablock = Observer;
};
%cam.scopeToClient(LocalClientConnection);
LocalClientConnection.setCameraObject(%cam);
LocalClientConnection.setControlObject(%cam);
LocalClientConnection.camera = %cam;
%cam.setPosition("0 0 0");
// Flag saying, when level is chosen, launch it with the editor open.
ChooseLevelDlg.launchInEditor = true;
Canvas.pushDialog( ChooseLevelDlg );
}
else
{
toggleEditor(true);
{
pushInstantGroup();
if ( !isObject( Editor ) )
{
Editor::create();
MissionCleanup.add( Editor );
MissionCleanup.add( Editor.getUndoManager() );
}
if( EditorIsActive() )
{
if (theLevelInfo.type $= "DemoScene")
{
commandToServer('dropPlayerAtCamera');
Editor.close("SceneGui");
}
else
{
Editor.close("PlayGui");
}
}
else
{
canvas.pushDialog( EditorLoadingGui );
canvas.repaint();
Editor.open();
// Cancel the scheduled event to prevent
// the level from cycling after it's duration
// has elapsed.
cancel($Game::Schedule);
if (theLevelInfo.type $= "DemoScene")
commandToServer('dropCameraAtPlayer', true);
canvas.popDialog(EditorLoadingGui);
}
popInstantGroup();
}
%elapsed = stopPrecisionTimer( %timerId );
warn( "Time spent in toggleEditor() : " @ %elapsed / 1000.0 @ " s" );
}
}

View file

@ -1051,7 +1051,7 @@ function MaterialEditorGui::updateActiveMaterialName(%this, %name)
// Some objects (ConvexShape, DecalRoad etc) reference Materials by name => need
// to find and update all these references so they don't break when we rename the
// Material.
MaterialEditorGui.updateMaterialReferences( MissionGroup, %action.oldName, %action.newName );
MaterialEditorGui.updateMaterialReferences( getScene(0), %action.oldName, %action.newName );
}
function MaterialEditorGui::updateMaterialReferences( %this, %obj, %oldName, %newName )
@ -1944,7 +1944,7 @@ function MaterialEditorGui::createNewMaterial( %this )
%material = getUniqueName( "newMaterial" );
new Material(%material)
{
diffuseMap[0] = "core/art/warnmat";
diffuseMap[0] = "core/images/warnmat";
mapTo = "unmapped_mat";
parentGroup = RootGroup;
};
@ -1975,7 +1975,7 @@ function MaterialEditorGui::deleteMaterial( %this )
%toMaterial = getUniqueName( "newMaterial" );
new Material(%toMaterial)
{
diffuseMap[0] = "core/art/warnmat";
diffuseMap[0] = "core/images/warnmat";
mapTo = "unmapped_mat";
parentGroup = RootGroup;
};
@ -1993,7 +1993,7 @@ function MaterialEditorGui::deleteMaterial( %this )
%toMaterial = getUniqueName( "newMaterial" );
new Material(%toMaterial)
{
diffuseMap[0] = "core/art/warnmat";
diffuseMap[0] = "core/images/warnmat";
mapTo = "unmapped_mat";
parentGroup = RootGroup;
};
@ -2008,7 +2008,7 @@ function MaterialEditorGui::deleteMaterial( %this )
%newMaterial = getUniqueName( "newMaterial" );
new Material(%newMaterial)
{
diffuseMap[0] = "core/art/warnmat";
diffuseMap[0] = "core/images/warnmat";
mapTo = "unmapped_mat";
parentGroup = RootGroup;
};

View file

@ -187,7 +187,7 @@ function ActionUpdateActiveMaterialAnimationFlags::undo(%this)
function ActionUpdateActiveMaterialName::redo(%this)
{
%this.material.setName(%this.newName);
MaterialEditorGui.updateMaterialReferences( MissionGroup, %this.oldName, %this.newName );
MaterialEditorGui.updateMaterialReferences( getScene(0), %this.oldName, %this.newName );
if( MaterialEditorPreviewWindow.isVisible() && MaterialEditorGui.currentMaterial == %this.material )
{
@ -199,7 +199,7 @@ function ActionUpdateActiveMaterialName::redo(%this)
function ActionUpdateActiveMaterialName::undo(%this)
{
%this.material.setName(%this.oldName);
MaterialEditorGui.updateMaterialReferences( MissionGroup, %this.newName, %this.oldName );
MaterialEditorGui.updateMaterialReferences( getScene(0), %this.newName, %this.oldName );
if( MaterialEditorPreviewWindow.isVisible() && MaterialEditorGui.currentMaterial == %this.material )
{

View file

@ -164,7 +164,7 @@ function MeshRoadEditorPlugin::onSaveMission( %this, %missionFile )
{
if( MeshRoadEditorGui.isDirty )
{
MissionGroup.save( %missionFile );
getScene(0).save( %missionFile );
MeshRoadEditorGui.isDirty = false;
}
}

View file

@ -114,7 +114,7 @@ function MissionAreaEditorPlugin::createNewMissionArea(%this)
%newMissionArea = new MissionArea();
%newMissionArea.area = "-256 -256 512 512";
MissionGroup.add(%newMissionArea);
getScene(0).add(%newMissionArea);
EditorGui.setEditor(MissionAreaEditorPlugin);

View file

@ -354,13 +354,13 @@ function CreateNewNavMeshDlg::create(%this)
if(MeshMissionBounds.isStateOn())
{
if(!isObject(MissionGroup))
if(!isObject(getScene(0)))
{
MessageBoxOk("Error", "You must have a MissionGroup to use the mission bounds function.");
MessageBoxOk("Error", "You must have a Scene to use the mission bounds function.");
return;
}
// Get maximum extents of all objects.
%box = MissionBoundsExtents(MissionGroup);
%box = MissionBoundsExtents(getScene(0));
%pos = GetBoxCenter(%box);
%scale = (GetWord(%box, 3) - GetWord(%box, 0)) / 2 + 5
SPC (GetWord(%box, 4) - GetWord(%box, 1)) / 2 + 5
@ -380,7 +380,7 @@ function CreateNewNavMeshDlg::create(%this)
scale = %this-->MeshScale.getText();
};
}
MissionGroup.add(%mesh);
getScene(0).add(%mesh);
NavEditorGui.selectObject(%mesh);
Canvas.popDialog(CreateNewNavMeshDlg);

View file

@ -96,6 +96,7 @@ function NavEditorPlugin::onWorldEditorStartup(%this)
EWCreatorWindow.beginGroup("Navigation");
EWCreatorWindow.registerMissionObject("CoverPoint", "Cover point");
EWCreatorWindow.registerMissionObject("NavPath", "Nav Path");
EWCreatorWindow.endGroup();
}
@ -204,7 +205,7 @@ function NavEditorPlugin::onSaveMission(%this, %missionFile)
{
if(NavEditorGui.isDirty)
{
MissionGroup.save(%missionFile);
getScene(0).save(%missionFile);
NavEditorGui.isDirty = false;
}
}

View file

@ -64,28 +64,6 @@ function destroyPhysicsTools()
function PhysicsEditorPlugin::onWorldEditorStartup( %this )
{
new PopupMenu( PhysicsToolsMenu )
{
superClass = "MenuBuilder";
//class = "PhysXToolsMenu";
barTitle = "Physics";
item[0] = "Start Simulation" TAB "Ctrl-Alt P" TAB "physicsStartSimulation( \"client\" );physicsStartSimulation( \"server\" );";
//item[1] = "Stop Simulation" TAB "" TAB "physicsSetTimeScale( 0 );";
item[1] = "-";
item[2] = "Speed 25%" TAB "" TAB "physicsSetTimeScale( 0.25 );";
item[3] = "Speed 50%" TAB "" TAB "physicsSetTimeScale( 0.5 );";
item[4] = "Speed 100%" TAB "" TAB "physicsSetTimeScale( 1.0 );";
item[5] = "-";
item[6] = "Reload NXBs" TAB "" TAB "";
};
// Add our menu.
EditorGui.menuBar.insert( PhysicsToolsMenu, EditorGui.menuBar.dynamicItemInsertPos );
// Add ourselves to the window menu.
//EditorGui.addToWindowMenu( "Road and Path Editor", "", "RoadEditor" );
}
function PhysicsToolsMenu::onMenuSelect(%this)

View file

@ -178,7 +178,9 @@ function RiverEditorPlugin::onSaveMission( %this, %missionFile )
{
if( RiverEditorGui.isDirty )
{
MissionGroup.save( %missionFile );
//Get our root scene, which would be the level
getScene(0).save( %missionFile );
RiverEditorGui.isDirty = false;
}
}

View file

@ -156,7 +156,7 @@ function RoadEditorPlugin::onSaveMission( %this, %missionFile )
{
if( RoadEditorGui.isDirty )
{
MissionGroup.save( %missionFile );
getScene(0).save( %missionFile );
RoadEditorGui.isDirty = false;
}
}

View file

@ -1,80 +1,83 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<EditorSettings>
<Group name="AxisGizmo">
<Setting name="axisGizmoMaxScreenLen">100</Setting>
<Setting name="snapRotations">0</Setting>
<Setting name="mouseScaleScalar">0.8</Setting>
<Setting name="renderInfoText">1</Setting>
<Setting name="rotationSnap">15</Setting>
<Setting name="mouseRotateScalar">0.8</Setting>
<Setting name="renderWhenUsed">0</Setting>
<Group name="Grid">
<Setting name="planeDim">500</Setting>
<Setting name="gridColor">255 255 255 20</Setting>
<Setting name="snapToGrid">0</Setting>
<Setting name="renderPlaneHashes">0</Setting>
<Setting name="gridSize">10 10 10</Setting>
<Setting name="renderPlane">0</Setting>
</Group>
</Group>
<Group name="WorldEditor">
<Setting name="dropType">screenCenter</Setting>
<Setting name="forceLoadDAE">0</Setting>
<Setting name="orthoFOV">50</Setting>
<Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
<Setting name="undoLimit">40</Setting>
<Setting name="displayType">6</Setting>
<Setting name="orthoShowGrid">1</Setting>
<Group name="Tools">
<Setting name="snapSoft">0</Setting>
<Setting name="boundingBoxCollision">0</Setting>
<Setting name="snapGround">0</Setting>
<Setting name="dropAtScreenCenterMax">100</Setting>
<Setting name="snapSoftSize">2</Setting>
<Setting name="dropAtScreenCenterScalar">1</Setting>
<Setting name="objectsUseBoxCenter">1</Setting>
</Group>
<Group name="Docs">
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
</Group>
<Group name="Grid">
<Setting name="gridOriginColor">255 255 255 100</Setting>
<Setting name="gridSize">1</Setting>
<Setting name="gridColor">102 102 102 100</Setting>
<Setting name="gridMinorColor">51 51 51 100</Setting>
<Setting name="gridSnap">0</Setting>
</Group>
<Group name="Images">
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
</Group>
<Group name="Render">
<Setting name="showMousePopupInfo">1</Setting>
<Setting name="renderObjHandle">1</Setting>
<Setting name="renderSelectionBox">1</Setting>
<Setting name="renderPopupBackground">1</Setting>
<Setting name="renderObjText">1</Setting>
</Group>
<Setting name="forceLoadDAE">0</Setting>
<Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
<Setting name="displayType">6</Setting>
<Setting name="dropType">screenCenter</Setting>
<Setting name="orthoFOV">50</Setting>
<Setting name="undoLimit">40</Setting>
<Group name="Color">
<Setting name="objMouseOverColor">0 255 0 255</Setting>
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
<Setting name="objectTextColor">255 255 255 255</Setting>
<Setting name="objSelectColor">255 0 0 255</Setting>
<Setting name="selectionBoxColor">255 255 0 255</Setting>
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
<Setting name="objMouseOverColor">0 255 0 255</Setting>
<Setting name="objSelectColor">255 0 0 255</Setting>
<Setting name="dragRectColor">255 255 0 255</Setting>
<Setting name="objectTextColor">255 255 255 255</Setting>
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
</Group>
<Group name="ObjectIcons">
<Setting name="fadeIconsStartDist">8</Setting>
<Setting name="fadeIcons">1</Setting>
<Setting name="fadeIconsEndAlpha">0</Setting>
<Setting name="fadeIconsStartAlpha">255</Setting>
<Setting name="fadeIconsEndDist">20</Setting>
<Setting name="fadeIconsStartAlpha">255</Setting>
<Setting name="fadeIconsEndAlpha">0</Setting>
<Setting name="fadeIcons">1</Setting>
</Group>
<Group name="Render">
<Setting name="showMousePopupInfo">1</Setting>
<Setting name="renderObjText">1</Setting>
<Setting name="renderSelectionBox">1</Setting>
<Setting name="renderPopupBackground">1</Setting>
<Setting name="renderObjHandle">1</Setting>
</Group>
<Group name="Grid">
<Setting name="gridOriginColor">255 255 255 100</Setting>
<Setting name="gridColor">102 102 102 100</Setting>
<Setting name="gridSnap">0</Setting>
<Setting name="gridSize">1</Setting>
<Setting name="gridMinorColor">51 51 51 100</Setting>
</Group>
<Group name="Docs">
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
</Group>
<Group name="Images">
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
</Group>
<Group name="Tools">
<Setting name="boundingBoxCollision">0</Setting>
<Setting name="snapSoftSize">2</Setting>
<Setting name="dropAtScreenCenterMax">100</Setting>
<Setting name="snapSoft">0</Setting>
<Setting name="objectsUseBoxCenter">1</Setting>
<Setting name="dropAtScreenCenterScalar">1</Setting>
<Setting name="snapGround">0</Setting>
</Group>
</Group>
<Group name="AxisGizmo">
<Setting name="renderInfoText">1</Setting>
<Setting name="mouseRotateScalar">0.8</Setting>
<Setting name="axisGizmoMaxScreenLen">100</Setting>
<Setting name="mouseScaleScalar">0.8</Setting>
<Setting name="rotationSnap">15</Setting>
<Setting name="renderWhenUsed">0</Setting>
<Setting name="snapRotations">0</Setting>
<Group name="Grid">
<Setting name="renderPlane">0</Setting>
<Setting name="planeDim">500</Setting>
<Setting name="snapToGrid">0</Setting>
<Setting name="gridSize">10 10 10</Setting>
<Setting name="gridColor">255 255 255 20</Setting>
<Setting name="renderPlaneHashes">0</Setting>
</Group>
</Group>
<Group name="NavEditor">
<Setting name="SpawnClass">AIPlayer</Setting>
</Group>
<Group name="LevelInformation">
<Setting name="levelsDirectory">data/FPSGameplay/levels</Setting>
@ -84,7 +87,4 @@
</Group>
</Group>
</Group>
<Group name="NavEditor">
<Setting name="SpawnClass">AIPlayer</Setting>
</Group>
</EditorSettings>

View file

@ -603,14 +603,46 @@
MinExtent = "0 8";
};
// Node Filter
new GuiTextEditCtrl(NodeTreeFilter) {
position = "2 4";
extent = "175 18";
profile = "GuiTextEditProfile";
horizSizing = "width";
vertSizing = "bottom";
class = "GuiTreeViewFilterText";
treeView = ShapeEdNodeTreeView;
};
new GuiBitmapButtonCtrl() {
bitmap = "tools/gui/images/clear-icon";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
isContainer = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "180 5";
Extent = "17 17";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
class = "GuiTreeViewFilterClearButton";
textCtrl = NodeTreeFilter;
};
// End Node Filter
new GuiScrollCtrl() {
canSaveDynamicFields = "0";
isContainer = "1";
Profile = "GuiEditorScrollProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "0 0";
Extent = "202 288";
Position = "0 32";
Extent = "202 256";
MinExtent = "8 0";
canSave = "1";
Visible = "1";

View file

@ -145,6 +145,13 @@ function ShapeEditorPlugin::onWorldEditorStartup(%this)
}
}
function ShapeEditorPlugin::openShapeAsset(%this, %assetId)
{
%this.selectedAssetId = %assetId;
%this.selectedAssetDef = AssetDatabase.acquireAsset(%assetId);
%this.open(%this.selectedAssetDef.fileName);
}
function ShapeEditorPlugin::open(%this, %filename)
{
if ( !%this.isActivated )
@ -168,7 +175,7 @@ function ShapeEditorPlugin::open(%this, %filename)
ShapeEdNodes-->worldTransform.setStateOn(1);
// Initialise and show the shape editor
ShapeEdShapeTreeView.open(MissionGroup);
ShapeEdShapeTreeView.open(getScene(0));
ShapeEdShapeTreeView.buildVisibleTree(true);
ShapeEdPreviewGui.setVisible(true);

View file

@ -611,6 +611,19 @@ function ShapeEdPropWindow::update_onShapeSelectionChanged( %this )
ShapeEdSequenceList.addItem( %name );
}
ShapeEdThreadWindow.onAddThread(); // add thread 0
//Now, fetch any animation assets if we're utilizing a shape asset
if(ShapeEditorPlugin.selectedAssetId !$= "")
{
%animationAssetCount = ShapeEditorPlugin.selectedAssetDef.getAnimationCount();
for(%animIdx = 0; %animIdx < %animationAssetCount; %animIdx++)
{
%animAsset = ShapeEditorPlugin.selectedAssetDef.getAnimation(%animIdx);
//ShapeEdSequenceList.addItem( %animAsset.assetName );
}
}
// --- DETAILS TAB ---
// Add detail levels and meshes to tree
@ -789,7 +802,8 @@ function ShapeEdSeqNodeTabBook::onTabSelected( %this, %name, %index )
{
case "Seq":
ShapeEdPropWindow-->newBtn.ToolTip = "Add new sequence";
ShapeEdPropWindow-->newBtn.Command = "ShapeEdSequences.onAddSequence();";
//ShapeEdPropWindow-->newBtn.Command = "ShapeEdSequences.onAddSequence();";
ShapeEdPropWindow-->newBtn.Command = "AssetBrowser.showDialog(\"ShapeAnimationAsset\", \"onAddAnimationAssetShapeEditor\", \"\", \"\", \"\");";
ShapeEdPropWindow-->newBtn.setActive( true );
ShapeEdPropWindow-->deleteBtn.ToolTip = "Delete selected sequence (cannot be undone)";
ShapeEdPropWindow-->deleteBtn.Command = "ShapeEdSequences.onDeleteSequence();";
@ -2719,7 +2733,7 @@ function ShapeEdDetailTree::onRightMouseUp( %this, %itemId, %mouse )
superClass = "MenuBuilder";
isPopup = "1";
item[ 0 ] = "Hidden" TAB "" TAB "ShapeEdDetailTree.onHideMeshItem( %this._objName, !%this._itemHidden );";
item[ 0 ] = "Hidden" TAB "" TAB "ShapeEdDetailTree.onHideMeshItem(" @ ShapeEdMeshPopup._objName @ ", !" @ ShapeEdMeshPopup @ "._itemHidden );";
item[ 1 ] = "-";
item[ 2 ] = "Hide all" TAB "" TAB "ShapeEdDetailTree.onHideMeshItem( \"\", true );";
item[ 3 ] = "Show all" TAB "" TAB "ShapeEdDetailTree.onHideMeshItem( \"\", false );";

View file

@ -299,6 +299,12 @@ function ActionEditNodeTransform::undo( %this )
//------------------------------------------------------------------------------
// Add sequence
function onAddAnimationAssetShapeEditor(%selectedAnimation)
{
echo("SELECTED MUH ASSET");
ShapeEditor.doAddSequence(%selectedAnimation, 0, 0, 0);
}
function ShapeEditor::doAddSequence( %this, %seqName, %from, %start, %end )
{
%action = %this.createAction( ActionAddSequence, "Add sequence" );
@ -313,23 +319,48 @@ function ShapeEditor::doAddSequence( %this, %seqName, %from, %start, %end )
function ActionAddSequence::doit( %this )
{
// If adding this sequence from an existing sequence, make a backup copy of
// the existing sequence first, so we can edit the start/end frames later
// without having to worry if the original source sequence has changed.
if ( ShapeEditor.shape.getSequenceIndex( %this.from ) >= 0 )
if(ShapeEditorPlugin.selectedAssetId $= "")
{
%this.from = ShapeEditor.getUniqueName( "sequence", "__backup__" @ %this.origFrom @ "_" );
ShapeEditor.shape.addSequence( %this.origFrom, %this.from );
// If adding this sequence from an existing sequence, make a backup copy of
// the existing sequence first, so we can edit the start/end frames later
// without having to worry if the original source sequence has changed.
if ( ShapeEditor.shape.getSequenceIndex( %this.from ) >= 0 )
{
%this.from = ShapeEditor.getUniqueName( "sequence", "__backup__" @ %this.origFrom @ "_" );
ShapeEditor.shape.addSequence( %this.origFrom, %this.from );
}
// Add the sequence
$collada::forceLoadDAE = EditorSettings.value( "forceLoadDAE" );
%success = ShapeEditor.shape.addSequence( %this.from, %this.seqName, %this.start, %this.end );
$collada::forceLoadDAE = false;
if ( %success )
{
ShapeEdPropWindow.update_onSequenceAdded( %this.seqName, -1 );
return true;
}
}
// Add the sequence
$collada::forceLoadDAE = EditorSettings.value( "forceLoadDAE" );
%success = ShapeEditor.shape.addSequence( %this.from, %this.seqName, %this.start, %this.end );
$collada::forceLoadDAE = false;
if ( %success )
else
{
ShapeEdPropWindow.update_onSequenceAdded( %this.seqName, -1 );
%assetDef = AssetDatabase.acquireAsset(%this.seqName);
%moduleName = getWord(getToken(%this.seqName, ":", 0),0);
//TODO, properly ignore <rootpose> and ambient entries for our idx values, but only if they're there!
%idx = ShapeEdSequenceList.rowCount() - 2;
%animSet = "ShapeEditorPlugin.selectedAssetDef.animationSequence"@%idx@"=\"@Asset="@%moduleName@":"@%assetDef.assetName@"\";";
eval(%animSet);
%assetPath = AssetDatabase.getAssetFilePath(ShapeEditorPlugin.selectedAssetId);
%assetImportSuccessful = TAMLWrite(ShapeEditorPlugin.selectedAssetDef, %assetPath);
AssetDatabase.refreshAsset(ShapeEditorPlugin.selectedAssetId);
//force a refresh
ShapeEdPropWindow.update_onShapeSelectionChanged();
return true;
}
return false;

View file

@ -184,11 +184,11 @@ function TimeAdjustSliderCtrl::onAction(%this)
if ( !isObject( %this.tod ) )
{
if ( isObject( MissionGroup ) )
if ( isObject( getScene(0) ) )
{
for ( %i = 0; %i < MissionGroup.getCount(); %i++ )
for ( %i = 0; %i < getScene(0).getCount(); %i++ )
{
%obj = MissionGroup.getObject( %i );
%obj = getScene(0).getObject( %i );
if ( %obj.getClassName() $= "TimeOfDay" )
{

View file

@ -947,10 +947,10 @@ function ObjectBuilderGui::buildPlayerDropPoint(%this)
%this.addField("spawnClass", "TypeString", "Spawn Class", "Player");
%this.addField("spawnDatablock", "TypeDataBlock", "Spawn Data", "PlayerData DefaultPlayerData");
if( EWCreatorWindow.objectGroup.getID() == MissionGroup.getID() )
if( EWCreatorWindow.objectGroup.getID() == getScene(0).getID() )
{
if( !isObject("PlayerDropPoints") )
MissionGroup.add( new SimGroup("PlayerDropPoints") );
getScene(0).add( new SimGroup("PlayerDropPoints") );
%this.objectGroup = "PlayerDropPoints";
}
@ -967,10 +967,10 @@ function ObjectBuilderGui::buildObserverDropPoint(%this)
%this.addField("spawnClass", "TypeString", "Spawn Class", "Camera");
%this.addField("spawnDatablock", "TypeDataBlock", "Spawn Data", "CameraData Observer");
if( EWCreatorWindow.objectGroup.getID() == MissionGroup.getID() )
if( EWCreatorWindow.objectGroup.getID() == getScene(0).getID() )
{
if( !isObject("ObserverDropPoints") )
MissionGroup.add( new SimGroup("ObserverDropPoints") );
getScene(0).add( new SimGroup("ObserverDropPoints") );
%this.objectGroup = "ObserverDropPoints";
}

View file

@ -133,6 +133,15 @@ function initializeWorldEditor()
EVisibility.addOption( "Frustum Lock", "$Scene::lockCull", "" );
EVisibility.addOption( "Disable Zone Culling", "$Scene::disableZoneCulling", "" );
EVisibility.addOption( "Disable Terrain Occlusion", "$Scene::disableTerrainOcclusion", "" );
EVisibility.addOption( "Colorblindness: Protanopia", "$CBV_Protanopia", "toggleColorBlindnessViz" );
EVisibility.addOption( "Colorblindness: Protanomaly", "$CBV_Protanomaly", "toggleColorBlindnessViz" );
EVisibility.addOption( "Colorblindness: Deuteranopia", "$CBV_Deuteranopia", "toggleColorBlindnessViz" );
EVisibility.addOption( "Colorblindness: Deuteranomaly", "$CBV_Deuteranomaly", "toggleColorBlindnessViz" );
EVisibility.addOption( "Colorblindness: Tritanopia", "$CBV_Tritanopia", "toggleColorBlindnessViz" );
EVisibility.addOption( "Colorblindness: Tritanomaly", "$CBV_Tritanomaly", "toggleColorBlindnessViz" );
EVisibility.addOption( "Colorblindness: Achromatopsia", "$CBV_Achromatopsia", "toggleColorBlindnessViz" );
EVisibility.addOption( "Colorblindness: Achromatomaly", "$CBV_Achromatomaly", "toggleColorBlindnessViz" );
}
function destroyWorldEditor()

View file

@ -317,10 +317,15 @@ function EditorGui::shutdown( %this )
/// will take over the default world editor window.
function EditorGui::addToEditorsMenu( %this, %displayName, %accel, %newPlugin )
{
//We need to cache the editors list. So first see if we have our list we cache the entries into
if(!isObject(EditorsMenuList))
{
new ArrayObject(EditorsMenuList);
}
%windowMenu = %this.findMenu( "Editors" );
%count = %windowMenu.getItemCount();
%alreadyExists = false;
for ( %i = 0; %i < %count; %i++ )
{
@ -336,7 +341,10 @@ function EditorGui::addToEditorsMenu( %this, %displayName, %accel, %newPlugin )
%accel = "";
if(!%alreadyExists)
{
EditorsMenuList.add(%displayName TAB %accel TAB %newPlugin);
%windowMenu.addItem( %count, %displayName TAB %accel TAB %newPlugin );
}
return %accel;
}
@ -637,7 +645,7 @@ function EditorGui::addCameraBookmark( %this, %name )
if( !isObject(CameraBookmarks) )
{
%grp = new SimGroup(CameraBookmarks);
MissionGroup.add(%grp);
getScene(0).add(%grp);
}
CameraBookmarks.add( %obj );
@ -835,12 +843,17 @@ function EditorGui::syncCameraGui( %this )
function WorldEditorPlugin::onActivated( %this )
{
if(!isObject(Scenes))
$scenesRootGroup = new SimGroup(Scenes);
$scenesRootGroup.add(getScene(0));
EditorGui.bringToFront( EWorldEditor );
EWorldEditor.setVisible(true);
EditorGui.menuBar.insert( EditorGui.worldMenu, EditorGui.menuBar.dynamicItemInsertPos );
EWorldEditor.makeFirstResponder(true);
EditorTree.open(MissionGroup,true);
EWCreatorWindow.setNewObjectGroup(MissionGroup);
EditorTree.open($scenesRootGroup,true);
EWCreatorWindow.setNewObjectGroup(getScene(0));
EWorldEditor.syncGui();
@ -1302,6 +1315,7 @@ function VisibilityDropdownToggle()
{
EVisibility.setVisible(true);
visibilityToggleBtn.setStateOn(1);
EVisibility.setExtent("200 540");
}
}
@ -1463,7 +1477,7 @@ function EditorTree::onDeleteObject( %this, %object )
return true;
if( %object == EWCreatorWindow.objectGroup )
EWCreatorWindow.setNewObjectGroup( MissionGroup );
EWCreatorWindow.setNewObjectGroup( getScene(0) );
// Append it to our list.
%this.undoDeleteList = %this.undoDeleteList TAB %object;
@ -1569,169 +1583,119 @@ function EditorTree::onRightMouseUp( %this, %itemId, %mouse, %obj )
%haveObjectEntries = false;
%haveLockAndHideEntries = true;
// Handle multi-selection.
//Set up the generic pop-up pre-emptively if we haven't already
%popup = new PopupMenu()
{
superClass = "MenuBuilder";
isPopup = "1";
object = -1;
bookmark = -1;
};
if( %this.getSelectedItemsCount() > 1 )
{
%popup = ETMultiSelectionContextPopup;
if( !isObject( %popup ) )
%popup = new PopupMenu( ETMultiSelectionContextPopup )
{
superClass = "MenuBuilder";
isPopup = "1";
item[ 0 ] = "Delete" TAB "" TAB "EditorMenuEditDelete();";
item[ 1 ] = "Group" TAB "" TAB "EWorldEditor.addSimGroup( true );";
};
%popup.item[ 0 ] = "Delete" TAB "" TAB "EditorMenuEditDelete();";
%popup.item[ 1 ] = "Group" TAB "" TAB "EWorldEditor.addSimGroup( true );";
}
// Open context menu if this is a CameraBookmark
else if( %obj.isMemberOfClass( "CameraBookmark" ) )
{
%popup = ETCameraBookmarkContextPopup;
if( !isObject( %popup ) )
%popup = new PopupMenu( ETCameraBookmarkContextPopup )
{
superClass = "MenuBuilder";
isPopup = "1";
item[ 0 ] = "Go To Bookmark" TAB "" TAB "EditorGui.jumpToBookmark( %this.bookmark.getInternalName() );";
bookmark = -1;
};
ETCameraBookmarkContextPopup.bookmark = %obj;
}
// Open context menu if this is set CameraBookmarks group.
else if( %obj.name $= "CameraBookmarks" )
{
%popup = ETCameraBookmarksGroupContextPopup;
if( !isObject( %popup ) )
%popup = new PopupMenu( ETCameraBookmarksGroupContextPopup )
{
superClass = "MenuBuilder";
isPopup = "1";
item[ 0 ] = "Add Camera Bookmark" TAB "" TAB "EditorGui.addCameraBookmarkByGui();";
};
}
// Open context menu if this is a SimGroup
else if( !%obj.isMemberOfClass( "SceneObject" ) )
{
%popup = ETSimGroupContextPopup;
if( !isObject( %popup ) )
%popup = new PopupMenu( ETSimGroupContextPopup )
{
superClass = "MenuBuilder";
isPopup = "1";
item[ 0 ] = "Rename" TAB "" TAB "EditorTree.showItemRenameCtrl( EditorTree.findItemByObjectId( %this.object ) );";
item[ 1 ] = "Delete" TAB "" TAB "EWorldEditor.deleteMissionObject( %this.object );";
item[ 2 ] = "Inspect" TAB "" TAB "inspectObject( %this.object );";
item[ 3 ] = "-";
item[ 4 ] = "Toggle Lock Children" TAB "" TAB "EWorldEditor.toggleLockChildren( %this.object );";
item[ 5 ] = "Toggle Hide Children" TAB "" TAB "EWorldEditor.toggleHideChildren( %this.object );";
item[ 6 ] = "-";
item[ 7 ] = "Group" TAB "" TAB "EWorldEditor.addSimGroup( true );";
item[ 8 ] = "-";
item[ 9 ] = "Add New Objects Here" TAB "" TAB "EWCreatorWindow.setNewObjectGroup( %this.object );";
item[ 10 ] = "Add Children to Selection" TAB "" TAB "EWorldEditor.selectAllObjectsInSet( %this.object, false );";
item[ 11 ] = "Remove Children from Selection" TAB "" TAB "EWorldEditor.selectAllObjectsInSet( %this.object, true );";
object = -1;
};
%popup.object = %obj;
%hasChildren = %obj.getCount() > 0;
%popup.enableItem( 10, %hasChildren );
%popup.enableItem( 11, %hasChildren );
%haveObjectEntries = true;
%haveLockAndHideEntries = false;
}
// Open generic context menu.
else
{
%popup = ETContextPopup;
if( !isObject( %popup ) )
%popup = new PopupMenu( ETContextPopup )
{
superClass = "MenuBuilder";
isPopup = "1";
item[ 0 ] = "Rename" TAB "" TAB "EditorTree.showItemRenameCtrl( EditorTree.findItemByObjectId( %this.object ) );";
item[ 1 ] = "Delete" TAB "" TAB "EWorldEditor.deleteMissionObject( %this.object );";
item[ 2 ] = "Inspect" TAB "" TAB "inspectObject( %this.object );";
item[ 3 ] = "-";
item[ 4 ] = "Locked" TAB "" TAB "%this.object.setLocked( !%this.object.locked ); EWorldEditor.syncGui();";
item[ 5 ] = "Hidden" TAB "" TAB "EWorldEditor.hideObject( %this.object, !%this.object.hidden ); EWorldEditor.syncGui();";
item[ 6 ] = "-";
item[ 7 ] = "Group" TAB "" TAB "EWorldEditor.addSimGroup( true );";
object = -1;
};
if( %obj.isMemberOfClass( "CameraBookmark" ) )
{
%popup.bookmark = %obj;
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 );";
};
%popup.item[ 0 ] = "Go To Bookmark" TAB "" TAB "EditorGui.jumpToBookmark( " @ %popup.bookmark.getInternalName() @ " );";
}
// Specialized version for ConvexShapes.
else if( %obj.isMemberOfClass( "ConvexShape" ) )
else if( %obj.name $= "CameraBookmarks" )
{
%popup = ETConvexShapeContextPopup;
if( !isObject( %popup ) )
%popup = new PopupMenu( ETConvexShapeContextPopup : ETContextPopup )
{
superClass = "MenuBuilder";
isPopup = "1";
item[ 8 ] = "-";
item[ 9 ] = "Convert to Zone" TAB "" TAB "EWorldEditor.convertSelectionToPolyhedralObjects( \"Zone\" );";
item[ 10 ] = "Convert to Portal" TAB "" TAB "EWorldEditor.convertSelectionToPolyhedralObjects( \"Portal\" );";
item[ 11 ] = "Convert to Occluder" TAB "" TAB "EWorldEditor.convertSelectionToPolyhedralObjects( \"OcclusionVolume\" );";
item[ 12 ] = "Convert to Sound Space" TAB "" TAB "EWorldEditor.convertSelectionToPolyhedralObjects( \"SFXSpace\" );";
};
%popup.item[ 0 ] = "Add Camera Bookmark" TAB "" TAB "EditorGui.addCameraBookmarkByGui();";
}
// Specialized version for polyhedral objects.
else if( %obj.isMemberOfClass( "Zone" ) ||
else if( %obj.isMemberOfClass( "Scene" ))
{
%popup.item[ 0 ] = "Set as Active Scene" TAB "" TAB "EditorTree.showItemRenameCtrl( EditorTree.findItemByObjectId(" @ %popup.object @ ") );";
%popup.item[ 1 ] = "Delete" TAB "" TAB "EWorldEditor.deleteMissionObject(" @ %popup.object @ ");";
%popup.item[ 2 ] = "Inspect" TAB "" TAB "inspectObject(" @ %popup.object @ ");";
%popup.item[ 3 ] = "-";
}
else
{
%popup.object = %obj;
%haveObjectEntries = true;
%popup.item[ 0 ] = "Rename" TAB "" TAB "EditorTree.showItemRenameCtrl( EditorTree.findItemByObjectId(" @ %popup.object @ ") );";
%popup.item[ 1 ] = "Delete" TAB "" TAB "EWorldEditor.deleteMissionObject(" @ %popup.object @ ");";
%popup.item[ 2 ] = "Inspect" TAB "" TAB "inspectObject(" @ %popup.object @ ");";
%popup.item[ 3 ] = "-";
%popup.item[ 4 ] = "Locked" TAB "" TAB "%this.object.setLocked( !" @ %popup.object @ ".locked ); EWorldEditor.syncGui();";
%popup.item[ 5 ] = "Hidden" TAB "" TAB "EWorldEditor.hideObject( " @ %popup.object @ ", !" @ %popup.object @ ".hidden ); EWorldEditor.syncGui();";
%popup.item[ 6 ] = "-";
%popup.item[ 7 ] = "Group" TAB "" TAB "EWorldEditor.addSimGroup( true );";
if( %obj.isMemberOfClass( "ConvexShape" ) )
{
%popup.item[ 8 ] = "-";
%popup.item[ 9 ] = "Convert to Zone" TAB "" TAB "EWorldEditor.convertSelectionToPolyhedralObjects( \"Zone\" );";
%popup.item[ 10 ] = "Convert to Portal" TAB "" TAB "EWorldEditor.convertSelectionToPolyhedralObjects( \"Portal\" );";
%popup.item[ 11 ] = "Convert to Occluder" TAB "" TAB "EWorldEditor.convertSelectionToPolyhedralObjects( \"OcclusionVolume\" );";
%popup.item[ 12 ] = "Convert to Sound Space" TAB "" TAB "EWorldEditor.convertSelectionToPolyhedralObjects( \"SFXSpace\" );";
}
else if( %obj.isMemberOfClass( "Zone" ) ||
%obj.isMemberOfClass( "Portal" ) ||
%obj.isMemberOfClass( "OcclusionVolume" ) ||
%obj.isMemberOfClass( "SFXSpace" ) )
{
%popup = ETPolyObjectContextPopup;
if( !isObject( %popup ) )
%popup = new PopupMenu( ETPolyObjectContextPopup : ETContextPopup )
{
%popup.item[ 8 ] = "-";
%popup.item[ 9 ] = "Convert to ConvexShape" TAB "" TAB "EWorldEditor.convertSelectionToConvexShape();";
}
else if(%obj.getClassName() $= "SimGroup" ||
%obj.isMemberOfClass( "Path" ) ||
%obj.isMemberOfClass("Entity") )
{
//If it's not any special-handle classes above, then it'll be group-based stuff here
%popup.item[ 4 ] = "Toggle Lock Children" TAB "" TAB "EWorldEditor.toggleLockChildren( " @ %popup.object @ " );";
%popup.item[ 5 ] = "Toggle Hide Children" TAB "" TAB "EWorldEditor.toggleHideChildren( " @ %popup.object @ " );";
%popup.item[ 8 ] = "-";
%popup.item[ 9 ] = "Add New Objects Here" TAB "" TAB "EWCreatorWindow.setNewObjectGroup( " @ %popup.object @ " );";
%popup.item[ 10 ] = "Add Children to Selection" TAB "" TAB "EWorldEditor.selectAllObjectsInSet( " @ %popup.object @ ", false );";
%popup.item[ 11 ] = "Remove Children from Selection" TAB "" TAB "EWorldEditor.selectAllObjectsInSet( " @ %popup.object @ ", true );";
%hasChildren = %obj.getCount() > 0;
%popup.enableItem( 10, %hasChildren );
%popup.enableItem( 11, %hasChildren );
%haveObjectEntries = true;
%haveLockAndHideEntries = false;
//Special case for Entities, which is special-case AND does group stuff with chld objects
if(%obj.isMemberOfClass("Entity"))
{
superClass = "MenuBuilder";
isPopup = "1";
item[ 8 ] = "-";
item[ 9 ] = "Convert to ConvexShape" TAB "" TAB "EWorldEditor.convertSelectionToConvexShape();";
};
%popup.item[ 12 ] = "-";
%popup.item[ 13 ] = "Convert to Game Object" TAB "" TAB "EWorldEditor.createGameObject( " @ %popup.object @ " );";
%popup.item[ 14 ] = "Duplicate Game Object" TAB "" TAB "EWorldEditor.duplicateGameObject( " @ %popup.object @ " );";
%popup.item[ 15 ] = "Show in Asset Browser" TAB "" TAB "EWorldEditor.showGameObjectInAssetBrowser( " @ %popup.object @ " );";
if(!isObject(AssetDatabase.acquireAsset(%obj.gameObjectAsset)))
{
%popup.enableItem(13, true);
%popup.enableItem(14, false);
%popup.enableItem(15, false);
}
else
{
%popup.enableItem(13, false);
%popup.enableItem(14, true);
%popup.enableItem(15, true);
}
}
}
}
%popup.object = %obj;
%haveObjectEntries = true;
}
if( %haveObjectEntries )
{
%popup.enableItem( 0, %obj.isNameChangeAllowed() && %obj.getName() !$= "MissionGroup" );
%popup.enableItem( 1, %obj.getName() !$= "MissionGroup" );
%popup.enableItem( 0, %obj.isNameChangeAllowed() && %obj !$= getScene(0) );
%popup.enableItem( 1, %obj !$= getScene(0) );
if( %haveLockAndHideEntries )
{
%popup.checkItem( 4, %obj.locked );
@ -1740,6 +1704,7 @@ function EditorTree::onRightMouseUp( %this, %itemId, %mouse, %obj )
%popup.enableItem( 7, %this.isItemSelected( %itemId ) );
}
%popup.reloadItems();
%popup.showPopup( Canvas );
}
@ -2017,7 +1982,7 @@ function EWorldEditor::syncGui( %this )
%this.syncToolPalette();
EditorTree.update();
Editor.getUndoManager().updateUndoMenu( EditorGui.menuBar-->EditMenu );
Editor.getUndoManager().updateUndoMenu( EditorGui.findMenu("Edit") );
EditorGuiStatusBar.setSelectionObjectsByCount( %this.getSelectionSize() );
EWTreeWindow-->LockSelection.setStateOn( %this.getSelectionLockCount() > 0 );
@ -2080,21 +2045,21 @@ function EWorldEditor::syncToolPalette( %this )
function EWorldEditor::addSimGroup( %this, %groupCurrentSelection )
{
%activeSelection = %this.getActiveSelection();
if ( %activeSelection.getObjectIndex( MissionGroup ) != -1 )
if ( %activeSelection.getObjectIndex( getScene(0) ) != -1 )
{
MessageBoxOK( "Error", "Cannot add MissionGroup to a new SimGroup" );
MessageBoxOK( "Error", "Cannot add Scene to a new SimGroup" );
return;
}
// Find our parent.
%parent = MissionGroup;
%parent = getScene(0);
if( !%groupCurrentSelection && isObject( %activeSelection ) && %activeSelection.getCount() > 0 )
{
%firstSelectedObject = %activeSelection.getObject( 0 );
if( %firstSelectedObject.isMemberOfClass( "SimGroup" ) )
%parent = %firstSelectedObject;
else if( %firstSelectedObject.getId() != MissionGroup.getId() )
else if( %firstSelectedObject.getId() != getScene(0).getId() )
%parent = %firstSelectedObject.parentGroup;
}
@ -2253,155 +2218,6 @@ function EWorldEditor::deleteMissionObject( %this, %object )
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 )
{
if( !isObject( %set ) )

View file

@ -40,7 +40,7 @@ function ESelectObjectsWindow::toggleVisibility( %this )
/// to start searching for objects.
function ESelectObjectsWindow::getRootGroup( %this )
{
return MissionGroup;
return getScene(0);
}
//---------------------------------------------------------------------------------------------

View file

@ -34,7 +34,6 @@ EditorSettings.setDefaultValue( "orthoFOV", "50" );
EditorSettings.setDefaultValue( "orthoShowGrid", "1" );
EditorSettings.setDefaultValue( "currentEditor", "WorldEditorInspectorPlugin" );
EditorSettings.setDefaultValue( "newLevelFile", "tools/levels/BlankRoom.mis" );
EditorSettings.setDefaultValue( "newGameObjectDir", "scripts/server/gameObjects" );
if( isFile( "C:/Program Files/Torsion/Torsion.exe" ) )
EditorSettings.setDefaultValue( "torsionPath", "C:/Program Files/Torsion/Torsion.exe" );
@ -128,7 +127,7 @@ EditorSettings.setDefaultValue( "renderInfoText", "1" );
EditorSettings.beginGroup( "Grid" );
EditorSettings.setDefaultValue( "gridColor", "255 255 255 20" );
EditorSettings.setDefaultValue( "gridSize", "10 10 10" );
EditorSettings.setDefaultValue( "gridSize", "1 1 1" );
EditorSettings.setDefaultValue( "snapToGrid", "0" ); //<-- Not currently used
EditorSettings.setDefaultValue( "renderPlane", "0" );
EditorSettings.setDefaultValue( "renderPlaneHashes", "0" );

View file

@ -179,7 +179,7 @@ function EWCreatorWindow::createStatic( %this, %file )
return;
if( !isObject(%this.objectGroup) )
%this.setNewObjectGroup( MissionGroup );
%this.setNewObjectGroup( getScene(0) );
%objId = new TSStatic()
{
@ -197,7 +197,7 @@ function EWCreatorWindow::createPrefab( %this, %file )
return;
if( !isObject(%this.objectGroup) )
%this.setNewObjectGroup( MissionGroup );
%this.setNewObjectGroup( getScene(0) );
%objId = new Prefab()
{
@ -215,7 +215,7 @@ function EWCreatorWindow::createObject( %this, %cmd )
return;
if( !isObject(%this.objectGroup) )
%this.setNewObjectGroup( MissionGroup );
%this.setNewObjectGroup( getScene(0) );
pushInstantGroup();
%objId = eval(%cmd);
@ -304,36 +304,6 @@ function EWCreatorWindow::navigate( %this, %address )
%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" )
@ -768,22 +738,6 @@ function EWCreatorWindow::addPrefabIcon( %this, %fullPath )
%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 )
{
%split = strreplace( %text, "/", " " );

View file

@ -124,6 +124,12 @@ function WorldEditor::onSelectionCentroidChanged( %this )
Inspector.refresh();
}
function WorldEditor::setSceneAsDirty(%this)
{
EWorldEditor.isDirty = true;
}
//////////////////////////////////////////////////////////////////////////
function WorldEditor::init(%this)
@ -198,7 +204,7 @@ function WorldEditor::export(%this)
function WorldEditor::doExport(%this, %file)
{
missionGroup.save("~/editor/" @ %file, true);
getScene(0).save("~/editor/" @ %file, true);
}
function WorldEditor::import(%this)

View file

@ -367,3 +367,81 @@ function toggleBackbufferViz( %enable )
else if ( !%enable )
AL_DeferredShading.enable();
}
function toggleColorBlindnessViz( %enable )
{
if ( %enable $= "" )
{
$CBV_Protanopia = ColorBlindnessVisualize.isEnabled() ? false : true;
ColorBlindnessVisualize.toggle();
}
else if ( %enable )
ColorBlindnessVisualize.enable();
else if ( !%enable )
ColorBlindnessVisualize.disable();
}
new ShaderData( ColorBlindnessVisualizeShader )
{
DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
DXPixelShaderFile = "tools/worldEditor/scripts/shaders/dbgColorBlindnessVisualizeP.hlsl";
OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
OGLPixelShaderFile = "tools/worldEditor/scripts/shaders/dbgColorBlindnessVisualizeP.glsl";
samplerNames[0] = "$backBuffer";
pixVersion = 2.0;
};
singleton PostEffect( ColorBlindnessVisualize )
{
isEnabled = false;
allowReflectPass = false;
renderTime = "PFXAfterBin";
renderBin = "GlowBin";
shader = ColorBlindnessVisualizeShader;
stateBlock = PFX_DefaultStateBlock;
texture[0] = "$backBuffer";
target = "$backBuffer";
renderPriority = 10;
};
function ColorBlindnessVisualize::setShaderConsts(%this)
{
%mode = 0;
if($CBV_Protanopia)
%mode = 1;
else if($CBV_Protanomaly)
%mode = 2;
else if($CBV_Deuteranopia)
%mode = 3;
else if($CBV_Deuteranomaly)
%mode = 4;
else if($CBV_Tritanopia)
%mode = 5;
else if($CBV_Tritanomaly)
%mode = 6;
else if($CBV_Achromatopsia)
%mode = 7;
else if($CBV_Achromatomaly)
%mode = 8;
%this.setShaderConst("$mode", %mode);
}
function ColorBlindnessVisualize::onEnabled( %this )
{
AL_NormalsVisualize.disable();
AL_DepthVisualize.disable();
AL_LightSpecularVisualize.disable();
AL_LightColorVisualize.disable();
$AL_NormalsVisualizeVar = false;
$AL_DepthVisualizeVar = false;
$AL_LightSpecularVisualizeVar = false;
$AL_LightColorVisualizeVar = false;
return true;
}

View file

@ -272,7 +272,7 @@ function EditorSaveMission()
// now write the terrain and mission files out:
if(EWorldEditor.isDirty || ETerrainEditor.isMissionDirty)
MissionGroup.save($Server::MissionFile);
getScene(0).save($Server::MissionFile);
if(ETerrainEditor.isDirty)
{
// Find all of the terrain files
@ -483,6 +483,21 @@ function EditorOpenMission(%filename)
}
}
function EditorOpenSceneAppend(%levelAsset)
{
//Load the asset's level file
exec(%levelAsset.levelFile);
//We'll assume the scene name and assetname are the same for now
%sceneName = %levelAsset.AssetName;
%scene = nameToID(%sceneName);
if(isObject(%scene))
{
//Append it to our scene heirarchy
$scenesRootGroup.add(%scene);
}
}
function EditorExportToCollada()
{
@ -587,6 +602,13 @@ function makeSelectedAMesh()
EditorTree.buildVisibleTree( true );
}
function EditorTakeControlOfEntity()
{
%object = EWorldEditor.getSelectedObject(0);
switchCamera(localClientConnection, %object);
switchControlObject(localClientConnection, %object);
}
function EditorMount()
{
echo( "EditorMount" );

View file

@ -110,9 +110,13 @@ function EditorGui::buildMenus(%this)
};
// Menu bar
%this.menuBar = new MenuBar(WorldEditorMenubar)
%this.menuBar = new GuiMenuBar(WorldEditorMenubar)
{
dynamicItemInsertPos = 3;
extent = Canvas.extent.x SPC "20";
minExtent = "320 20";
horizSizing = "width";
profile = "GuiMenuBarProfile";
};
// File Menu
@ -158,7 +162,7 @@ function EditorGui::buildMenus(%this)
%fileMenu.appendItem("Exit Level" TAB "" TAB "EditorExitMission();");
%fileMenu.appendItem("Quit" TAB %quitShortcut TAB "EditorQuitGame();");
%this.menuBar.insert(%fileMenu, %this.menuBar.getCount());
%this.menuBar.insert(%fileMenu);
// Edit Menu
%editMenu = new PopupMenu()
@ -187,7 +191,7 @@ function EditorGui::buildMenus(%this)
item[15] = "Game Options..." TAB "" TAB "Canvas.pushDialog(optionsDlg);";
item[16] = "PostEffect Manager" TAB "" TAB "Canvas.pushDialog(PostFXManager);";
};
%this.menuBar.insert(%editMenu, %this.menuBar.getCount());
%this.menuBar.insert(%editMenu);
// View Menu
%viewMenu = new PopupMenu()
@ -201,7 +205,7 @@ function EditorGui::buildMenus(%this)
item[ 0 ] = "Visibility Layers" TAB "Alt V" TAB "VisibilityDropdownToggle();";
item[ 1 ] = "Show Grid in Ortho Views" TAB %cmdCtrl @ "-Shift-Alt G" TAB "EditorGui.toggleOrthoGrid();";
};
%this.menuBar.insert(%viewMenu, %this.menuBar.getCount());
%this.menuBar.insert(%viewMenu);
// Camera Menu
%cameraMenu = new PopupMenu()
@ -229,7 +233,8 @@ function EditorGui::buildMenus(%this)
Item[15] = "Manage Bookmarks..." TAB "Ctrl-Shift B" TAB "EditorGui.toggleCameraBookmarkWindow();";
item[16] = "Jump to Bookmark" TAB %this.cameraBookmarksMenu;
};
%this.menuBar.insert(%cameraMenu, %this.menuBar.getCount());
%this.menuBar.insert(%cameraMenu);
// Snap Menu
%snapToMenu = new PopupMenu()
@ -252,8 +257,8 @@ function EditorGui::buildMenus(%this)
item[8] = "Snap 2nd Object to 1st Z-" TAB "" TAB "Z-";
};
%this.menuBar.insert(%snapToMenu, %this.menuBar.getCount());
%this.menuBar.insert(%snapToMenu);
// Editors Menu
%editorsMenu = new PopupMenu()
{
@ -269,7 +274,42 @@ function EditorGui::buildMenus(%this)
//item[4] = "Terrain Painter" TAB "F4" TAB TerrainPainterPlugin;
//item[5] = "-";
};
%this.menuBar.insert(%editorsMenu, %this.menuBar.getCount());
%this.menuBar.insert(%editorsMenu);
//if we're just refreshing the menus, we probably have a list of editors we want added to the Editors menu there, so check and if so, add them now
if(isObject(EditorsMenuList))
{
%editorsListCount = EditorsMenuList.count();
for(%e = 0; %e < %editorsListCount; %e++)
{
%menuEntry = EditorsMenuList.getKey(%e);
%editorsMenu.addItem(%e, %menuEntry);
}
}
if(isObject(PhysicsEditorPlugin))
{
%physicsToolsMenu = new PopupMenu()
{
superClass = "MenuBuilder";
//class = "PhysXToolsMenu";
barTitle = "Physics";
item[0] = "Start Simulation" TAB "Ctrl-Alt P" TAB "physicsStartSimulation( \"client\" );physicsStartSimulation( \"server\" );";
//item[1] = "Stop Simulation" TAB "" TAB "physicsSetTimeScale( 0 );";
item[1] = "-";
item[2] = "Speed 25%" TAB "" TAB "physicsSetTimeScale( 0.25 );";
item[3] = "Speed 50%" TAB "" TAB "physicsSetTimeScale( 0.5 );";
item[4] = "Speed 100%" TAB "" TAB "physicsSetTimeScale( 1.0 );";
item[5] = "-";
item[6] = "Reload NXBs" TAB "" TAB "";
};
// Add our menu.
%this.menuBar.insert( %physicsToolsMenu, EditorGui.menuBar.dynamicItemInsertPos );
}
// Lighting Menu
%lightingMenu = new PopupMenu()
@ -286,7 +326,7 @@ function EditorGui::buildMenus(%this)
// NOTE: The light managers will be inserted as the
// last menu items in EditorLightingMenu::onAdd().
};
%this.menuBar.insert(%lightingMenu, %this.menuBar.getCount());
%this.menuBar.insert(%lightingMenu);
// Tools Menu
%toolsMenu = new PopupMenu()
@ -301,7 +341,7 @@ function EditorGui::buildMenus(%this)
item[2] = "Torque SimView" TAB "" TAB "tree();";
item[3] = "Make Selected a Mesh" TAB "" TAB "makeSelectedAMesh();";
};
%this.menuBar.insert(%toolsMenu, %this.menuBar.getCount());
%this.menuBar.insert(%toolsMenu);
// Help Menu
%helpMenu = new PopupMenu()
@ -316,7 +356,7 @@ function EditorGui::buildMenus(%this)
item[2] = "Offline Reference Guide..." TAB "" TAB "shellexecute(EWorldEditor.documentationReference);";
item[3] = "Torque 3D Forums..." TAB "" TAB "gotoWebPage(EWorldEditor.forumURL);";
};
%this.menuBar.insert(%helpMenu, %this.menuBar.getCount());
%this.menuBar.insert(%helpMenu);
// Menus that are added/removed dynamically (temporary)
@ -398,14 +438,21 @@ function EditorGui::buildMenus(%this)
Item[17] = "Make Selection Prefab" TAB "" TAB "EditorMakePrefab();";
Item[18] = "Explode Selected Prefab" TAB "" TAB "EditorExplodePrefab();";
Item[19] = "-";
Item[20] = "Mount Selection A to B" TAB "" TAB "EditorMount();";
Item[21] = "Unmount Selected Object" TAB "" TAB "EditorUnmount();";
Item[20] = "Take control of entity" TAB "" TAB "EditorTakeControlOfEntity();";
Item[21] = "-";
Item[22] = "Mount Selection A to B" TAB "" TAB "EditorMount();";
Item[23] = "Unmount Selected Object" TAB "" TAB "EditorUnmount();";
};
}
}
//////////////////////////////////////////////////////////////////////////
function WorldEditorMenubar::onResize(%this)
{
%this.extent.x = Canvas.extent.x;
}
function EditorGui::attachMenus(%this)
{
%this.menuBar.attachToCanvas(Canvas, 0);
@ -421,9 +468,9 @@ function EditorGui::setMenuDefaultState(%this)
if(! isObject(%this.menuBar))
return 0;
for(%i = 0;%i < %this.menuBar.getCount();%i++)
for(%i = 0;%i < %this.menuBar.getMenuCount();%i++)
{
%menu = %this.menuBar.getObject(%i);
%menu = %this.menuBar.getMenu(%i);
%menu.setupDefaultState();
}
@ -437,9 +484,10 @@ function EditorGui::findMenu(%this, %name)
if(! isObject(%this.menuBar))
return 0;
for(%i = 0;%i < %this.menuBar.getCount();%i++)
for(%i = 0; %i < %this.menuBar.getMenuCount(); %i++)
{
%menu = %this.menuBar.getObject(%i);
%menu = %this.menuBar.getMenu(%i);
if(%name $= %menu.barTitle)
return %menu;

View file

@ -0,0 +1,121 @@
//-----------------------------------------------------------------------------
// 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.
//-----------------------------------------------------------------------------
//Using calculations and values provided by Alan Zucconi
// www.alanzucconi.com
#include "../../../../core/rendering/shaders/gl/hlslCompat.glsl"
#include "shadergen:/autogenConditioners.h"
in vec2 uv0;
uniform sampler2D backBufferTex;
in float mode;
out vec4 OUT_col;
void main()
{
vec4 imageColor = texture( backBufferTex, uv0 );
if(mode == 0)
{
OUT_col = imageColor;
}
else
{
vec3 R = imageColor.r;
vec3 G = imageColor.g;
vec3 B = imageColor.b;
if(mode == 1) // Protanopia
{
R = vec3(0.56667, 0.43333, 0);
G = vec3(0.55833, 0.44167, 0);
B = vec3(0, 0.24167, 0.75833);
}
else if(mode == 2) // Protanomaly
{
R = vec3(0.81667, 0.18333, 0);
G = vec3(0.33333, 0.66667, 0);
B = vec3(0, 0.125, 0.875);
}
else if(mode == 3) // Deuteranopia
{
R = vec3(0.625, 0.375, 0);
G = vec3(0.70, 0.30, 0);
B = vec3(0, 0.30, 0.70);
}
else if(mode == 4) // Deuteranomaly
{
R = vec3(0.80, 0.20, 0);
G = vec3(0.25833, 0.74167, 0);
B = vec3(0, 0.14167, 0.85833);
}
else if(mode == 5) // Tritanopia
{
R = vec3(0.95, 0.05, 0);
G = vec3(0, 0.43333, 0.56667);
B = vec3(0, 0.475, 0.525);
}
else if(mode == 6) // Tritanomaly
{
R = vec3(0.96667, 0.03333, 0);
G = vec3(0, 0.73333, 0.26667);
B = vec3(0, 0.18333, 0.81667);
}
else if(mode == 7) // Achromatopsia
{
R = vec3(0.299, 0.587, 0.114);
G = vec3(0.299, 0.587, 0.114);
B = vec3(0.299, 0.587, 0.114);
}
else if(mode == 8) // Achromatomaly
{
R = vec3(0.618, 0.32, 0.062);
G = vec3(0.163, 0.775, 0.062);
B = vec3(0.163, 0.320, 0.516);
}
//First set
vec4 c = imageColor;
c.r = c.r * R[0] + c.g * R[1] + c.b * R[2];
c.g = c.r * G[0] + c.g * G[1] + c.b * G[2];
c.b = c.r * B[0] + c.g * B[1] + c.b * B[2];
vec3 cb = c.rgb;
cb.r = c.r * R[0] + c.g * R[1] + c.b * R[2];
cb.g = c.r * G[0] + c.g * G[1] + c.b * G[2];
cb.b = c.r * B[0] + c.g * B[1] + c.b * B[2];
// Difference
vec3 diff = abs(c.rgb - cb);
float lum = c.r*.3 + c.g*.59 + c.b*.11;
vec3 bw = vec3(lum, lum, lum);
// return vec4(lerp(bw, vec3(1, 0, 0), saturate((diff.r + diff.g + diff.b) / 3)), c.a);
OUT_col = vec4(c.rgb,1);
}
}

View file

@ -0,0 +1,118 @@
//-----------------------------------------------------------------------------
// 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.
//-----------------------------------------------------------------------------
//Using calculations and values provided by Alan Zucconi
// www.alanzucconi.com
#include "../../../../core/rendering/shaders/shaderModelAutoGen.hlsl"
#include "../../../../core/rendering/shaders/postFX/postFx.hlsl"
TORQUE_UNIFORM_SAMPLER2D(backBufferTex,0);
uniform float mode;
float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
{
float4 imageColor = TORQUE_TEX2D( backBufferTex, IN.uv0 );
if(mode == 0)
{
return imageColor;
}
else
{
float3 R = imageColor.r;
float3 G = imageColor.g;
float3 B = imageColor.b;
if(mode == 1) // Protanopia
{
R = float3(0.56667, 0.43333, 0);
G = float3(0.55833, 0.44167, 0);
B = float3(0, 0.24167, 0.75833);
}
else if(mode == 2) // Protanomaly
{
R = float3(0.81667, 0.18333, 0);
G = float3(0.33333, 0.66667, 0);
B = float3(0, 0.125, 0.875);
}
else if(mode == 3) // Deuteranopia
{
R = float3(0.625, 0.375, 0);
G = float3(0.70, 0.30, 0);
B = float3(0, 0.30, 0.70);
}
else if(mode == 4) // Deuteranomaly
{
R = float3(0.80, 0.20, 0);
G = float3(0.25833, 0.74167, 0);
B = float3(0, 0.14167, 0.85833);
}
else if(mode == 5) // Tritanopia
{
R = float3(0.95, 0.05, 0);
G = float3(0, 0.43333, 0.56667);
B = float3(0, 0.475, 0.525);
}
else if(mode == 6) // Tritanomaly
{
R = float3(0.96667, 0.03333, 0);
G = float3(0, 0.73333, 0.26667);
B = float3(0, 0.18333, 0.81667);
}
else if(mode == 7) // Achromatopsia
{
R = float3(0.299, 0.587, 0.114);
G = float3(0.299, 0.587, 0.114);
B = float3(0.299, 0.587, 0.114);
}
else if(mode == 8) // Achromatomaly
{
R = float3(0.618, 0.32, 0.062);
G = float3(0.163, 0.775, 0.062);
B = float3(0.163, 0.320, 0.516);
}
//First set
float4 c = imageColor;
c.r = c.r * R[0] + c.g * R[1] + c.b * R[2];
c.g = c.r * G[0] + c.g * G[1] + c.b * G[2];
c.b = c.r * B[0] + c.g * B[1] + c.b * B[2];
float3 cb = c.rgb;
cb.r = c.r * R[0] + c.g * R[1] + c.b * R[2];
cb.g = c.r * G[0] + c.g * G[1] + c.b * G[2];
cb.b = c.r * B[0] + c.g * B[1] + c.b * B[2];
// Difference
float3 diff = abs(c.rgb - cb);
float lum = c.r*.3 + c.g*.59 + c.b*.11;
float3 bw = float3(lum, lum, lum);
// return float4(lerp(bw, float3(1, 0, 0), saturate((diff.r + diff.g + diff.b) / 3)), c.a);
return float4(c.rgb,1);
}
}

View file

@ -20,7 +20,7 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "core/shaders/gl/hlslCompat.glsl"
#include "../../../../core/rendering/shaders/gl/hlslCompat.glsl"
in vec2 uv0;
uniform sampler2D colorBufferTex;

View file

@ -20,7 +20,7 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "core/shaders/postfx/postFx.hlsl"
#include "../../../../core/rendering/shaders/postFX/postFx.hlsl"
TORQUE_UNIFORM_SAMPLER2D(colorBufferTex,0);

View file

@ -20,7 +20,7 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "core/shaders/gl/hlslCompat.glsl"
#include "../../../../core/rendering/shaders/gl/hlslCompat.glsl"
#include "shadergen:/autogenConditioners.h"
in vec2 uv0;

View file

@ -20,14 +20,14 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "core/shaders/postfx/postFx.hlsl"
#include "core/shaders/shaderModelAutoGen.hlsl"
#include "../../../../core/rendering/shaders/postFX/postFx.hlsl"
#include "../../../../core/rendering/shaders/shaderModelAutoGen.hlsl"
TORQUE_UNIFORM_SAMPLER2D(deferredTex, 0);
TORQUE_UNIFORM_SAMPLER1D(depthViz, 1);
float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
{
float depth = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).w;
float depth = TORQUE_DEFERRED_UNCONDITION( deferredTex, IN.uv0 ).w;
return float4( TORQUE_TEX1D( depthViz, depth ).rgb, 1.0 );
}

View file

@ -20,7 +20,7 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "core/shaders/gl/hlslCompat.glsl"
#include "../../../../core/rendering/shaders/gl/hlslCompat.glsl"
in vec2 uv0;
uniform sampler2D glowBuffer;

View file

@ -20,7 +20,7 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "core/shaders/postfx/postFx.hlsl"
#include "../../../../core/rendering/shaders/postFX/postFx.hlsl"
TORQUE_UNIFORM_SAMPLER2D(glowBuffer, 0);

View file

@ -20,7 +20,7 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "core/shaders/gl/hlslCompat.glsl"
#include "../../../../core/rendering/shaders/gl/hlslCompat.glsl"
in vec2 uv0;
uniform sampler2D lightDeferredTex;

View file

@ -20,8 +20,8 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "core/shaders/shaderModelAutoGen.hlsl"
#include "core/shaders/postfx/postFx.hlsl"
#include "../../../../core/rendering/shaders/shaderModelAutoGen.hlsl"
#include "../../../../core/rendering/shaders/postFX/postFx.hlsl"
TORQUE_UNIFORM_SAMPLER2D(lightDeferredTex,0);

View file

@ -20,7 +20,7 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "core/shaders/gl/hlslCompat.glsl"
#include "../../../../core/rendering/shaders/gl/hlslCompat.glsl"
in vec2 uv0;
uniform sampler2D lightDeferredTex;

View file

@ -20,7 +20,7 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "core/shaders/postfx/postFx.hlsl"
#include "../../../../core/rendering/shaders/postFX/postFx.hlsl"
TORQUE_UNIFORM_SAMPLER2D(lightDeferredTex,0);

View file

@ -20,7 +20,7 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "core/shaders/gl/hlslCompat.glsl"
#include "../../../../core/rendering/shaders/gl/hlslCompat.glsl"
#include "shadergen:/autogenConditioners.h"
in vec2 uv0;

View file

@ -20,13 +20,13 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
#include "core/shaders/postfx/postFx.hlsl"
#include "core/shaders/shaderModelAutoGen.hlsl"
#include "../../../../core/rendering/shaders/postFX/postFx.hlsl"
#include "../../../../core/rendering/shaders/shaderModelAutoGen.hlsl"
TORQUE_UNIFORM_SAMPLER2D(deferredTex, 0);
float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
{
float3 normal = TORQUE_PREPASS_UNCONDITION( deferredTex, IN.uv0 ).xyz;
float3 normal = TORQUE_DEFERRED_UNCONDITION( deferredTex, IN.uv0 ).xyz;
return float4( ( normal + 1.0 ) * 0.5, 1.0 );
}

Some files were not shown because too many files have changed in this diff Show more