Initial implementation of the Asset Browser tool.

This commit is contained in:
Areloch 2018-01-28 15:30:17 -06:00
parent d22e7c98e1
commit 1278cf22a2
38 changed files with 8518 additions and 0 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();
}