mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Merge pull request #575 from Areloch/QOLBugfix20210912
Misc QOL and bugfixes for 2021/09/12
This commit is contained in:
commit
0e775be56b
15 changed files with 469 additions and 90 deletions
|
|
@ -0,0 +1,220 @@
|
||||||
|
//--- OBJECT WRITE BEGIN ---
|
||||||
|
$guiContent = new GuiControl(AssetBrowser_setAssetTarget) {
|
||||||
|
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_setAssetTargetWindow) {
|
||||||
|
text = "Set Asset Destination";
|
||||||
|
resizeWidth = "1";
|
||||||
|
resizeHeight = "1";
|
||||||
|
canMove = "1";
|
||||||
|
canClose = "1";
|
||||||
|
canMinimize = "0";
|
||||||
|
canMaximize = "0";
|
||||||
|
canCollapse = "0";
|
||||||
|
closeCommand = "Canvas.popDialog(AssetBrowser_setAssetTarget);";
|
||||||
|
edgeSnap = "1";
|
||||||
|
margin = "0 0 0 0";
|
||||||
|
padding = "0 0 0 0";
|
||||||
|
anchorTop = "1";
|
||||||
|
anchorBottom = "0";
|
||||||
|
anchorLeft = "1";
|
||||||
|
anchorRight = "0";
|
||||||
|
position = "328 311";
|
||||||
|
extent = "368 118";
|
||||||
|
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 29";
|
||||||
|
extent = "116 17";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "ToolsGuiTextProfile";
|
||||||
|
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 = "135 28";
|
||||||
|
extent = "202 18";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "ToolsGuiPopUpMenuProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "1";
|
||||||
|
internalName = "ModuleList";
|
||||||
|
class = "AssetBrowserModuleList";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
};
|
||||||
|
new GuiTextCtrl() {
|
||||||
|
text = "Target Path:";
|
||||||
|
maxLength = "1024";
|
||||||
|
margin = "0 0 0 0";
|
||||||
|
padding = "0 0 0 0";
|
||||||
|
anchorTop = "1";
|
||||||
|
anchorBottom = "0";
|
||||||
|
anchorLeft = "1";
|
||||||
|
anchorRight = "0";
|
||||||
|
position = "12 54";
|
||||||
|
extent = "116 17";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "ToolsGuiTextProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "1";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
};
|
||||||
|
new GuiTextEditCtrl() {
|
||||||
|
historySize = "0";
|
||||||
|
tabComplete = "0";
|
||||||
|
sinkAllKeyEvents = "0";
|
||||||
|
password = "0";
|
||||||
|
passwordMask = "*";
|
||||||
|
text = "data/";
|
||||||
|
maxLength = "1024";
|
||||||
|
margin = "0 0 0 0";
|
||||||
|
padding = "0 0 0 0";
|
||||||
|
anchorTop = "1";
|
||||||
|
anchorBottom = "0";
|
||||||
|
anchorLeft = "1";
|
||||||
|
anchorRight = "0";
|
||||||
|
position = "135 54";
|
||||||
|
extent = "201 18";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "width";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "ToolsGuiTextEditProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "0";
|
||||||
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "1";
|
||||||
|
internalName = "targetPath";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
};
|
||||||
|
new GuiBitmapButtonCtrl() {
|
||||||
|
BitmapAsset = "ToolsModule:iconOpen_image";
|
||||||
|
bitmapMode = "Centered";
|
||||||
|
autoFitExtents = "0";
|
||||||
|
useModifiers = "0";
|
||||||
|
useStates = "1";
|
||||||
|
masked = "0";
|
||||||
|
groupNum = "-1";
|
||||||
|
buttonType = "PushButton";
|
||||||
|
useMouseEvents = "0";
|
||||||
|
position = "340 51";
|
||||||
|
extent = "22 22";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "left";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "ToolsGuiButtonProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
command = "SelectAssetPath.showDialog(AssetBrowser.dirHandler.currentAddress, \"setAssetTargetUpdatePath\");\nSelectAssetPathWindow.selectWindow();";
|
||||||
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
|
tooltip = "New Module";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "0";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
};
|
||||||
|
new GuiButtonCtrl() {
|
||||||
|
text = "Done";
|
||||||
|
groupNum = "-1";
|
||||||
|
buttonType = "PushButton";
|
||||||
|
useMouseEvents = "0";
|
||||||
|
position = "227 87";
|
||||||
|
extent = "64 22";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "left";
|
||||||
|
vertSizing = "top";
|
||||||
|
profile = "ToolsGuiButtonProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
command = "setAssetTarget();";
|
||||||
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "0";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
};
|
||||||
|
new GuiButtonCtrl() {
|
||||||
|
text = "Cancel";
|
||||||
|
groupNum = "-1";
|
||||||
|
buttonType = "PushButton";
|
||||||
|
useMouseEvents = "0";
|
||||||
|
position = "295 87";
|
||||||
|
extent = "64 22";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "left";
|
||||||
|
vertSizing = "top";
|
||||||
|
profile = "ToolsGuiButtonProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
command = "AssetBrowser_setAssetTargetWindow.onClose();";
|
||||||
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "0";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
//--- OBJECT WRITE END ---
|
||||||
|
|
@ -69,6 +69,7 @@ function initializeAssetBrowser()
|
||||||
exec("./guis/looseFileAudit.gui");
|
exec("./guis/looseFileAudit.gui");
|
||||||
exec("./guis/assetNameEdit.gui");
|
exec("./guis/assetNameEdit.gui");
|
||||||
exec("./guis/createNewCollectionSet.gui");
|
exec("./guis/createNewCollectionSet.gui");
|
||||||
|
exec("./guis/setAssetTarget.gui");
|
||||||
|
|
||||||
exec("./scripts/assetBrowser." @ $TorqueScriptFileExtension);
|
exec("./scripts/assetBrowser." @ $TorqueScriptFileExtension);
|
||||||
exec("./scripts/popupMenus." @ $TorqueScriptFileExtension);
|
exec("./scripts/popupMenus." @ $TorqueScriptFileExtension);
|
||||||
|
|
@ -85,6 +86,7 @@ function initializeAssetBrowser()
|
||||||
exec("./scripts/selectPath." @ $TorqueScriptFileExtension);
|
exec("./scripts/selectPath." @ $TorqueScriptFileExtension);
|
||||||
exec("./scripts/looseFileAudit." @ $TorqueScriptFileExtension);
|
exec("./scripts/looseFileAudit." @ $TorqueScriptFileExtension);
|
||||||
exec("./scripts/creator." @ $TorqueScriptFileExtension);
|
exec("./scripts/creator." @ $TorqueScriptFileExtension);
|
||||||
|
exec("./scripts/setAssetTarget." @ $TorqueScriptFileExtension);
|
||||||
|
|
||||||
//Processing for the different asset types
|
//Processing for the different asset types
|
||||||
exec("./scripts/assetTypes/component." @ $TorqueScriptFileExtension);
|
exec("./scripts/assetTypes/component." @ $TorqueScriptFileExtension);
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ function AssetBrowser_addModuleWindow::CreateNewModule(%this)
|
||||||
|
|
||||||
//force a refresh of our modules list
|
//force a refresh of our modules list
|
||||||
ModuleDatabase.ignoreLoadedGroups(true);
|
ModuleDatabase.ignoreLoadedGroups(true);
|
||||||
ModuleDatabase.scanModules();
|
ModuleDatabase.registerModule(%moduleFilePath, %newModuleName @ ".module");
|
||||||
%success = ModuleDatabase.loadExplicit(%newModuleName, 1);
|
%success = ModuleDatabase.loadExplicit(%newModuleName, 1);
|
||||||
ModuleDatabase.ignoreLoadedGroups(false);
|
ModuleDatabase.ignoreLoadedGroups(false);
|
||||||
|
|
||||||
|
|
@ -123,8 +123,9 @@ function AssetBrowserModuleList::refresh(%this)
|
||||||
%count = getWordCount(%moduleList);
|
%count = getWordCount(%moduleList);
|
||||||
for(%i=0; %i < %count; %i++)
|
for(%i=0; %i < %count; %i++)
|
||||||
{
|
{
|
||||||
%moduleName = getWord(%moduleList, %i);
|
%moduleDef = getWord(%moduleList, %i);
|
||||||
%this.add(%moduleName.ModuleId, %i);
|
%moduleName = %moduleDef.ModuleId;
|
||||||
|
%this.add(%moduleName, %i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -165,8 +165,14 @@ function getAssetTypeByFilename(%filePath)
|
||||||
|
|
||||||
function AssetBrowser::onBeginDropFiles( %this )
|
function AssetBrowser::onBeginDropFiles( %this )
|
||||||
{
|
{
|
||||||
if(!AssetBrowser.isAwake())
|
if(!AssetBrowser.isAwake() || !AssetBrowser.isVisible())
|
||||||
|
{
|
||||||
|
if(GuiEditorIsActive())
|
||||||
|
GuiEditor.onBeginDropFiles();
|
||||||
|
else if(EditorIsActive())
|
||||||
|
EWorldEditor.onBeginDropFiles();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
error("% DragDrop - Beginning files dropping.");
|
error("% DragDrop - Beginning files dropping.");
|
||||||
if(!ImportAssetWindow.isAwake())
|
if(!ImportAssetWindow.isAwake())
|
||||||
|
|
@ -175,45 +181,28 @@ function AssetBrowser::onBeginDropFiles( %this )
|
||||||
|
|
||||||
function AssetBrowser::onDropFile( %this, %filePath )
|
function AssetBrowser::onDropFile( %this, %filePath )
|
||||||
{
|
{
|
||||||
if(!%this.isVisible())
|
if(!AssetBrowser.isAwake() || !AssetBrowser.isVisible())
|
||||||
|
{
|
||||||
|
if(GuiEditorIsActive())
|
||||||
|
GuiEditor.onDropFile(%filePath);
|
||||||
|
else if(EditorIsActive())
|
||||||
|
EWorldEditor.onDropFile(%filePath);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ImportAssetWindow.importer.addImportingFile(%filePath);
|
ImportAssetWindow.importer.addImportingFile(%filePath);
|
||||||
|
|
||||||
/*%fileExt = fileExt( %filePath );
|
|
||||||
//add it to our array!
|
|
||||||
if(isImageFormat(%fileExt))
|
|
||||||
%assetItem = %this.addImportingAsset("ImageAsset", %filePath);
|
|
||||||
else if( isShapeFormat(%fileExt))
|
|
||||||
%assetItem = %this.addImportingAsset("ShapeAsset", %filePath);
|
|
||||||
else if( isSoundFormat(%fileExt))
|
|
||||||
%assetItem = %this.addImportingAsset("SoundAsset", %filePath);
|
|
||||||
else if( %fileExt $= "." @ $TorqueScriptFileExtension || %fileExt $= "." @ $TorqueScriptFileExtension @ ".dso" )
|
|
||||||
%assetItem = %this.addImportingAsset("ScriptAsset", %filePath);
|
|
||||||
else if( %fileExt $= ".gui" || %fileExt $= ".gui.dso" )
|
|
||||||
%assetItem = %this.addImportingAsset("GUIAsset", %filePath);
|
|
||||||
else if (%fileExt $= ".zip")
|
|
||||||
%this.onDropZipFile(%filePath);
|
|
||||||
else if( %fileExt $= "")
|
|
||||||
%this.onDropFolder(%filePath);
|
|
||||||
|
|
||||||
if(%assetItem !$= "")
|
|
||||||
{
|
|
||||||
SessionImportAssetItems.add(%assetItem);
|
|
||||||
ImportAssetItems.add(%assetItem);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
//Used to keep tabs on what files we were trying to import, used mainly in the event of
|
|
||||||
//adjusting configs and needing to completely reprocess the import
|
|
||||||
//ensure we're not doubling-up on files by accident
|
|
||||||
//if(ImportAssetWindow.importingFilesArray.getIndexFromKey(%filePath) == -1)
|
|
||||||
// ImportAssetWindow.importingFilesArray.add(%filePath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function AssetBrowser::onDropZipFile(%this, %filePath)
|
function AssetBrowser::onDropZipFile(%this, %filePath)
|
||||||
{
|
{
|
||||||
if(!%this.isVisible())
|
if(!AssetBrowser.isAwake() || !AssetBrowser.isVisible())
|
||||||
|
{
|
||||||
|
if(GuiEditorIsActive())
|
||||||
|
GuiEditor.onDropZipFile(%filePath);
|
||||||
|
else if(EditorIsActive())
|
||||||
|
EWorldEditor.onDropZipFile(%filePath);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
%zip = new ZipObject();
|
%zip = new ZipObject();
|
||||||
%zip.openArchive(%filePath);
|
%zip.openArchive(%filePath);
|
||||||
|
|
@ -226,27 +215,6 @@ function AssetBrowser::onDropZipFile(%this, %filePath)
|
||||||
%fileEntry = %zip.getFileEntry(%i);
|
%fileEntry = %zip.getFileEntry(%i);
|
||||||
%fileFrom = getField(%fileEntry, 0);
|
%fileFrom = getField(%fileEntry, 0);
|
||||||
|
|
||||||
//First, we wanna scan to see if we have modules to contend with. If we do, we'll just plunk them in wholesale
|
|
||||||
//and not process their contents.
|
|
||||||
|
|
||||||
//If not modules, it's likely an art pack or other mixed files, so we'll import them as normal
|
|
||||||
/*if( (%fileExt $= ".png") || (%fileExt $= ".jpg") || (%fileExt $= ".bmp") || (%fileExt $= ".dds") )
|
|
||||||
%this.importAssetListArray.add("ImageAsset", %filePath);
|
|
||||||
else if( (%fileExt $= ".dae") || (%fileExt $= ".dts"))
|
|
||||||
%this.importAssetListArray.add("ShapeAsset", %filePath);
|
|
||||||
else if( (%fileExt $= ".ogg") || (%fileExt $= ".wav") || (%fileExt $= ".mp3"))
|
|
||||||
%this.importAssetListArray.add("SoundAsset", %filePath);
|
|
||||||
else if( (%fileExt $= ".gui") || (%fileExt $= ".gui.dso"))
|
|
||||||
%this.importAssetListArray.add("GUIAsset", %filePath);
|
|
||||||
//else if( (%fileExt $= "." @ $TorqueScriptFileExtension) || (%fileExt $= ".dso"))
|
|
||||||
// %this.importAssetListArray.add("Script", %filePath);
|
|
||||||
else if( (%fileExt $= ".mis"))
|
|
||||||
%this.importAssetListArray.add("LevelAsset", %filePath);*/
|
|
||||||
|
|
||||||
// For now, if it's a .tscript file, we'll assume it's a behavior.
|
|
||||||
//if (fileExt(%fileFrom) !$= "." @ $TorqueScriptFileExtension)
|
|
||||||
// continue;
|
|
||||||
|
|
||||||
%fileTo = expandFilename("^tools/assetBrowser/importTemp/") @ %fileFrom;
|
%fileTo = expandFilename("^tools/assetBrowser/importTemp/") @ %fileFrom;
|
||||||
%zip.extractFile(%fileFrom, %fileTo);
|
%zip.extractFile(%fileFrom, %fileTo);
|
||||||
//exec(%fileTo);
|
//exec(%fileTo);
|
||||||
|
|
@ -259,8 +227,14 @@ function AssetBrowser::onDropZipFile(%this, %filePath)
|
||||||
|
|
||||||
function AssetBrowser::onDropFolder(%this, %filePath)
|
function AssetBrowser::onDropFolder(%this, %filePath)
|
||||||
{
|
{
|
||||||
if(!%this.isVisible())
|
if(!AssetBrowser.isAwake() || !AssetBrowser.isVisible())
|
||||||
|
{
|
||||||
|
if(GuiEditorIsActive())
|
||||||
|
GuiEditor.onDropFolder(%filePath);
|
||||||
|
else if(EditorIsActive())
|
||||||
|
EWorldEditor.onDropFolder(%filePath);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
%zip = new ZipObject();
|
%zip = new ZipObject();
|
||||||
%zip.openArchive(%filePath);
|
%zip.openArchive(%filePath);
|
||||||
|
|
@ -306,8 +280,14 @@ function AssetBrowser::onDropFolder(%this, %filePath)
|
||||||
|
|
||||||
function AssetBrowser::onEndDropFiles( %this )
|
function AssetBrowser::onEndDropFiles( %this )
|
||||||
{
|
{
|
||||||
if(!%this.isVisible())
|
if(!AssetBrowser.isAwake() || !AssetBrowser.isVisible())
|
||||||
|
{
|
||||||
|
if(GuiEditorIsActive())
|
||||||
|
GuiEditor.onEndDropFiles();
|
||||||
|
else if(EditorIsActive())
|
||||||
|
EWorldEditor.onEndDropFiles();
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ImportAssetWindow.refresh();
|
ImportAssetWindow.refresh();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,22 @@ function AssetBrowser::buildDatablockPreview(%this, %assetDef, %previewData)
|
||||||
"\nDatablock Type: " @ %assetDef.getClassName() @
|
"\nDatablock Type: " @ %assetDef.getClassName() @
|
||||||
"\nDefinition Path: " @ %assetDef.getFilename();
|
"\nDefinition Path: " @ %assetDef.getFilename();
|
||||||
|
|
||||||
%previewData.doubleClickCommand = "AssetBrowser.schedule(10, \"spawnDatablockObject\",\""@ %assetDef @"\");";//browseTo %assetDef.dirPath / %assetDef.assetName
|
|
||||||
|
if(%this.selectMode)
|
||||||
|
{
|
||||||
|
%previewData.doubleClickCommand = "AssetBrowser.selectAsset( AssetBrowser.selectedAsset );";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(EditorSettings.value("Assets/Browser/doubleClickAction", "Edit Asset") $= "Edit Asset")
|
||||||
|
{
|
||||||
|
%previewData.doubleClickCommand = "DatablockEditorPlugin.openDatablock( "@%assetDef@" );";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%previewData.doubleClickCommand = "AssetBrowser.onDatablockEditorDropped( "@%assetDef@" );";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function spawnDatablockObject(%datablock)
|
function spawnDatablockObject(%datablock)
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,6 @@ function AssetBrowser::loadCreatorClasses(%this)
|
||||||
|
|
||||||
%guiClasses.sortk(true);
|
%guiClasses.sortk(true);
|
||||||
|
|
||||||
%guiClasses.echo();
|
|
||||||
|
|
||||||
%currentCat = "";
|
%currentCat = "";
|
||||||
for(%i=0; %i < %guiClasses.count(); %i++)
|
for(%i=0; %i < %guiClasses.count(); %i++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
function AssetBrowser_setAssetTarget::showDialog(%this, %callback)
|
||||||
|
{
|
||||||
|
AssetBrowser_setAssetTarget.callback = %callback;
|
||||||
|
Canvas.pushDialog(AssetBrowser_setAssetTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
function AssetBrowser_setAssetTarget::onWake(%this)
|
||||||
|
{
|
||||||
|
%targetModule = AssetBrowser.dirHandler.getModuleFromAddress(AssetBrowser.dirHandler.currentAddress).ModuleId;
|
||||||
|
|
||||||
|
if(%targetModule $= "")
|
||||||
|
%targetModule = EditorSettings.value("Assets/New/defaultModule", "");
|
||||||
|
|
||||||
|
AssetBrowser_setAssetTarget-->moduleList.setText(%targetModule);
|
||||||
|
|
||||||
|
%moduleDef = ModuleDatabase.findModule(%targetModule);
|
||||||
|
|
||||||
|
%targetPath = AssetBrowser.dirHandler.currentAddress;
|
||||||
|
if(!startsWith(%targetPath, %moduleDef.ModulePath))
|
||||||
|
{
|
||||||
|
%targetPath = %moduleDef.ModulePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
AssetBrowser_setAssetTarget-->targetPath.text = %targetPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
function AssetBrowser_setAssetTargetWindow::onClose(%this)
|
||||||
|
{
|
||||||
|
Canvas.popDialog(AssetBrowser_setAssetTarget);
|
||||||
|
}
|
||||||
|
|
||||||
|
function setAssetTargetUpdatePath(%targetPath)
|
||||||
|
{
|
||||||
|
AssetBrowser_setAssetTarget-->targetPath.text = %targetPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
function setAssetTarget()
|
||||||
|
{
|
||||||
|
AssetBrowser.dirHandler.currentAddress = AssetBrowser_setAssetTarget-->targetPath.text;
|
||||||
|
eval(AssetBrowser_setAssetTarget.callback);
|
||||||
|
|
||||||
|
Canvas.popDialog(AssetBrowser_setAssetTarget);
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,6 @@ $guiContent = new GuiControl(DatablockEditorCreatePrompt,EditorGuiGroup) {
|
||||||
minExtent = "8 2";
|
minExtent = "8 2";
|
||||||
horizSizing = "right";
|
horizSizing = "right";
|
||||||
vertSizing = "bottom";
|
vertSizing = "bottom";
|
||||||
fixedAspectRatio = "0";
|
|
||||||
profile = "ToolsGuiDefaultProfile";
|
profile = "ToolsGuiDefaultProfile";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
active = "1";
|
active = "1";
|
||||||
|
|
@ -14,6 +13,7 @@ $guiContent = new GuiControl(DatablockEditorCreatePrompt,EditorGuiGroup) {
|
||||||
isContainer = "1";
|
isContainer = "1";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
canSaveDynamicFields = "1";
|
canSaveDynamicFields = "1";
|
||||||
|
fixedAspectRatio = "0";
|
||||||
|
|
||||||
new GuiWindowCtrl() {
|
new GuiWindowCtrl() {
|
||||||
text = "Create New Datablock";
|
text = "Create New Datablock";
|
||||||
|
|
@ -32,18 +32,18 @@ $guiContent = new GuiControl(DatablockEditorCreatePrompt,EditorGuiGroup) {
|
||||||
anchorBottom = "0";
|
anchorBottom = "0";
|
||||||
anchorLeft = "1";
|
anchorLeft = "1";
|
||||||
anchorRight = "0";
|
anchorRight = "0";
|
||||||
position = "389 252";
|
position = "374 252";
|
||||||
extent = "207 167";
|
extent = "309 167";
|
||||||
minExtent = "8 2";
|
minExtent = "8 2";
|
||||||
horizSizing = "right";
|
horizSizing = "right";
|
||||||
vertSizing = "bottom";
|
vertSizing = "bottom";
|
||||||
fixedAspectRatio = "0";
|
|
||||||
profile = "ToolsGuiWindowProfile";
|
profile = "ToolsGuiWindowProfile";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
active = "1";
|
active = "1";
|
||||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
isContainer = "1";
|
isContainer = "1";
|
||||||
|
internalName = "promptWindow";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
canSaveDynamicFields = "0";
|
canSaveDynamicFields = "0";
|
||||||
|
|
||||||
|
|
@ -61,7 +61,6 @@ $guiContent = new GuiControl(DatablockEditorCreatePrompt,EditorGuiGroup) {
|
||||||
minExtent = "8 2";
|
minExtent = "8 2";
|
||||||
horizSizing = "right";
|
horizSizing = "right";
|
||||||
vertSizing = "bottom";
|
vertSizing = "bottom";
|
||||||
fixedAspectRatio = "0";
|
|
||||||
profile = "ToolsGuiTextProfile";
|
profile = "ToolsGuiTextProfile";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
active = "1";
|
active = "1";
|
||||||
|
|
@ -86,11 +85,10 @@ $guiContent = new GuiControl(DatablockEditorCreatePrompt,EditorGuiGroup) {
|
||||||
anchorLeft = "1";
|
anchorLeft = "1";
|
||||||
anchorRight = "0";
|
anchorRight = "0";
|
||||||
position = "7 45";
|
position = "7 45";
|
||||||
extent = "191 17";
|
extent = "294 18";
|
||||||
minExtent = "8 2";
|
minExtent = "8 2";
|
||||||
horizSizing = "right";
|
horizSizing = "right";
|
||||||
vertSizing = "bottom";
|
vertSizing = "bottom";
|
||||||
fixedAspectRatio = "0";
|
|
||||||
profile = "ToolsGuiTextEditProfile";
|
profile = "ToolsGuiTextEditProfile";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
active = "1";
|
active = "1";
|
||||||
|
|
@ -106,12 +104,11 @@ $guiContent = new GuiControl(DatablockEditorCreatePrompt,EditorGuiGroup) {
|
||||||
groupNum = "-1";
|
groupNum = "-1";
|
||||||
buttonType = "PushButton";
|
buttonType = "PushButton";
|
||||||
useMouseEvents = "0";
|
useMouseEvents = "0";
|
||||||
position = "7 137";
|
position = "111 137";
|
||||||
extent = "122 22";
|
extent = "122 22";
|
||||||
minExtent = "8 2";
|
minExtent = "8 2";
|
||||||
horizSizing = "right";
|
horizSizing = "right";
|
||||||
vertSizing = "bottom";
|
vertSizing = "bottom";
|
||||||
fixedAspectRatio = "0";
|
|
||||||
profile = "ToolsGuiButtonProfile";
|
profile = "ToolsGuiButtonProfile";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
active = "1";
|
active = "1";
|
||||||
|
|
@ -128,12 +125,11 @@ $guiContent = new GuiControl(DatablockEditorCreatePrompt,EditorGuiGroup) {
|
||||||
groupNum = "-1";
|
groupNum = "-1";
|
||||||
buttonType = "PushButton";
|
buttonType = "PushButton";
|
||||||
useMouseEvents = "0";
|
useMouseEvents = "0";
|
||||||
position = "135 137";
|
position = "239 137";
|
||||||
extent = "63 22";
|
extent = "63 22";
|
||||||
minExtent = "8 2";
|
minExtent = "8 2";
|
||||||
horizSizing = "right";
|
horizSizing = "right";
|
||||||
vertSizing = "bottom";
|
vertSizing = "bottom";
|
||||||
fixedAspectRatio = "0";
|
|
||||||
profile = "ToolsGuiButtonProfile";
|
profile = "ToolsGuiButtonProfile";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
active = "1";
|
active = "1";
|
||||||
|
|
@ -159,7 +155,6 @@ $guiContent = new GuiControl(DatablockEditorCreatePrompt,EditorGuiGroup) {
|
||||||
minExtent = "8 2";
|
minExtent = "8 2";
|
||||||
horizSizing = "right";
|
horizSizing = "right";
|
||||||
vertSizing = "bottom";
|
vertSizing = "bottom";
|
||||||
fixedAspectRatio = "0";
|
|
||||||
profile = "ToolsGuiTextProfile";
|
profile = "ToolsGuiTextProfile";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
active = "1";
|
active = "1";
|
||||||
|
|
@ -182,11 +177,10 @@ $guiContent = new GuiControl(DatablockEditorCreatePrompt,EditorGuiGroup) {
|
||||||
anchorLeft = "1";
|
anchorLeft = "1";
|
||||||
anchorRight = "0";
|
anchorRight = "0";
|
||||||
position = "7 87";
|
position = "7 87";
|
||||||
extent = "191 19";
|
extent = "294 19";
|
||||||
minExtent = "8 2";
|
minExtent = "8 2";
|
||||||
horizSizing = "right";
|
horizSizing = "right";
|
||||||
vertSizing = "bottom";
|
vertSizing = "bottom";
|
||||||
fixedAspectRatio = "0";
|
|
||||||
profile = "ToolsGuiPopUpMenuProfile";
|
profile = "ToolsGuiPopUpMenuProfile";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
active = "1";
|
active = "1";
|
||||||
|
|
@ -198,7 +192,6 @@ $guiContent = new GuiControl(DatablockEditorCreatePrompt,EditorGuiGroup) {
|
||||||
canSaveDynamicFields = "0";
|
canSaveDynamicFields = "0";
|
||||||
};
|
};
|
||||||
new GuiCheckBoxCtrl() {
|
new GuiCheckBoxCtrl() {
|
||||||
useInactiveState = "0";
|
|
||||||
text = "Client-Side Datablock";
|
text = "Client-Side Datablock";
|
||||||
groupNum = "-1";
|
groupNum = "-1";
|
||||||
buttonType = "ToggleButton";
|
buttonType = "ToggleButton";
|
||||||
|
|
@ -208,10 +201,9 @@ $guiContent = new GuiControl(DatablockEditorCreatePrompt,EditorGuiGroup) {
|
||||||
minExtent = "8 2";
|
minExtent = "8 2";
|
||||||
horizSizing = "right";
|
horizSizing = "right";
|
||||||
vertSizing = "bottom";
|
vertSizing = "bottom";
|
||||||
fixedAspectRatio = "0";
|
|
||||||
profile = "ToolsGuiCheckBoxProfile";
|
profile = "ToolsGuiCheckBoxProfile";
|
||||||
visible = "1";
|
visible = "1";
|
||||||
active = "1";
|
active = "0";
|
||||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
isContainer = "0";
|
isContainer = "0";
|
||||||
|
|
|
||||||
|
|
@ -259,7 +259,7 @@ $guiContent = new GuiControl() {
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
canSaveDynamicFields = "0";
|
canSaveDynamicFields = "0";
|
||||||
altCommand = "DatablockEditorPlugin.createDatablock();";
|
altCommand = "DatablockEditorPlugin.pickDatablockPath();";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -666,6 +666,7 @@ function DatablockEditorPlugin::createDatablock(%this)
|
||||||
// Show the dialog.
|
// Show the dialog.
|
||||||
|
|
||||||
canvas.pushDialog( DatablockEditorCreatePrompt, 0, true );
|
canvas.pushDialog( DatablockEditorCreatePrompt, 0, true );
|
||||||
|
DatablockEditorCreatePrompt-->promptWindow.text = "Create New Datablock in module: " @ DatablockEditorPlugin.targetCreationModule;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -679,6 +680,7 @@ function DatablockEditorPlugin::pickDatablockPath(%this)
|
||||||
|
|
||||||
function DatablockEditorPlugin::pickedNewDBTargetModule(%this, %module)
|
function DatablockEditorPlugin::pickedNewDBTargetModule(%this, %module)
|
||||||
{
|
{
|
||||||
|
DatablockEditorPlugin.targetCreationModule = %module;
|
||||||
%moduleDef = ModuleDatabase.findModule(%module);
|
%moduleDef = ModuleDatabase.findModule(%module);
|
||||||
|
|
||||||
$DATABLOCK_EDITOR_DEFAULT_FILENAME = %moduleDef.ModulePath @ "/scripts/managedData/managedDatablocks." @ $TorqueScriptFileExtension;
|
$DATABLOCK_EDITOR_DEFAULT_FILENAME = %moduleDef.ModulePath @ "/scripts/managedData/managedDatablocks." @ $TorqueScriptFileExtension;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ function onDropFile( %filePath )
|
||||||
}
|
}
|
||||||
function onDropEnd( %fileCount )
|
function onDropEnd( %fileCount )
|
||||||
{
|
{
|
||||||
|
|
||||||
//error("% DragDrop - Completed file dropping");
|
//error("% DragDrop - Completed file dropping");
|
||||||
Input::GetEventManager().postEvent( "EndDropFiles" );
|
Input::GetEventManager().postEvent( "EndDropFiles" );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -722,6 +722,64 @@ function GuiEditor::onMouseModeChange( %this )
|
||||||
GuiEditorStatusBar.setText( GuiEditorStatusBar.getMouseModeHelp() );
|
GuiEditorStatusBar.setText( GuiEditorStatusBar.getMouseModeHelp() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
function GuiEditor::onBeginDropFiles( %this )
|
||||||
|
{
|
||||||
|
if(!%this.isVisible())
|
||||||
|
return;
|
||||||
|
|
||||||
|
AssetBrowser_setAssetTarget.showDialog("EWorldEditor.doFileDropProcessing();");
|
||||||
|
|
||||||
|
if(!isObject($EditorImportFileList))
|
||||||
|
$EditorImportFileList = new ArrayObject();
|
||||||
|
|
||||||
|
$EditorImportFileList.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
function GuiEditor::onDropFile( %this, %filePath )
|
||||||
|
{
|
||||||
|
if(!%this.isVisible())
|
||||||
|
return;
|
||||||
|
|
||||||
|
$EditorImportFileList.add(%filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
function GuiEditor::onDropZipFile(%this, %filePath)
|
||||||
|
{
|
||||||
|
if(!%this.isVisible())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function GuiEditor::onDropFolder(%this, %filePath)
|
||||||
|
{
|
||||||
|
if(!%this.isVisible())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function GuiEditor::onEndDropFiles( %this )
|
||||||
|
{
|
||||||
|
if(!%this.isVisible())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function GuiEditor::doFileDropProcessing(%this)
|
||||||
|
{
|
||||||
|
if(!ImportAssetWindow.isAwake())
|
||||||
|
ImportAssetWindow.showDialog();
|
||||||
|
|
||||||
|
for(%i=0; %i < $EditorImportFileList.Count(); %i++)
|
||||||
|
{
|
||||||
|
%file = $EditorImportFileList.getKey(%i);
|
||||||
|
ImportAssetWindow.importer.addImportingFile(%file);
|
||||||
|
}
|
||||||
|
|
||||||
|
$EditorImportFileList.empty();
|
||||||
|
|
||||||
|
ImportAssetWindow.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
//=============================================================================================
|
//=============================================================================================
|
||||||
// Resolution List.
|
// Resolution List.
|
||||||
//=============================================================================================
|
//=============================================================================================
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,7 @@ function ObjectBuilderGui::createImageAssetType(%this, %index)
|
||||||
modal = "1";
|
modal = "1";
|
||||||
command = %this @ ".getImageAsset(" @ %index @ ");";
|
command = %this @ ".getImageAsset(" @ %index @ ");";
|
||||||
};
|
};
|
||||||
%button.setBitmap("tools/materialEditor/gui/change-material-btn");
|
%button.setBitmap("ToolsModule:change_material_btn_n_image");
|
||||||
%this.controls[%this.numControls].addGuiControl(%button);
|
%this.controls[%this.numControls].addGuiControl(%button);
|
||||||
|
|
||||||
%this.numControls++;
|
%this.numControls++;
|
||||||
|
|
@ -466,7 +466,7 @@ function ObjectBuilderGui::createMaterialNameType(%this, %index)
|
||||||
modal = "1";
|
modal = "1";
|
||||||
command = %this @ ".getMaterialName(" @ %index @ ");";
|
command = %this @ ".getMaterialName(" @ %index @ ");";
|
||||||
};
|
};
|
||||||
%button.setBitmap("tools/materialEditor/gui/change-material-btn");
|
%button.setBitmap("ToolsModule:change_material_btn_n_image");
|
||||||
%this.controls[%this.numControls].addGuiControl(%button);
|
%this.controls[%this.numControls].addGuiControl(%button);
|
||||||
|
|
||||||
//%val = %this.field[%index, value];
|
//%val = %this.field[%index, value];
|
||||||
|
|
@ -869,7 +869,6 @@ function ObjectBuilderGui::buildCloudLayer(%this)
|
||||||
OBObjectName.setValue( "" );
|
OBObjectName.setValue( "" );
|
||||||
%this.objectClassName = "CloudLayer";
|
%this.objectClassName = "CloudLayer";
|
||||||
%this.addField( "textureAsset", "TypeImageAsset", "Image", "Core_Rendering:clouds_normal_displacement_image" );
|
%this.addField( "textureAsset", "TypeImageAsset", "Image", "Core_Rendering:clouds_normal_displacement_image" );
|
||||||
//%this.addField( "textureFile", "TypeImageFilename", "Texture", "core/rendering/images/clouds_normal_displacement" );
|
|
||||||
%this.process();
|
%this.process();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -881,9 +880,10 @@ function ObjectBuilderGui::buildBasicClouds(%this)
|
||||||
|
|
||||||
// This is a trick... any fields added after process won't show
|
// This is a trick... any fields added after process won't show
|
||||||
// up as controls, but will be applied to the created object.
|
// up as controls, but will be applied to the created object.
|
||||||
%this.addField( "texture[0]", "TypeImageFilename", "Texture", "core/rendering/images/cloud1" );
|
%this.addField( "textureAsset[0]", "TypeImageAssetId", "TextureAsset", "Core_Rendering:cloud1_image" );
|
||||||
%this.addField( "texture[1]", "TypeImageFilename", "Texture", "core/rendering/images/cloud2" );
|
%this.addField( "textureAsset[1]", "TypeImageAssetId", "TextureAsset", "Core_Rendering:cloud2_image" );
|
||||||
%this.addField( "texture[2]", "TypeImageFilename", "Texture", "core/rendering/images/cloud3" );
|
%this.addField( "textureAsset[2]", "TypeImageAssetId", "TextureAsset", "Core_Rendering:cloud3_image" );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function ObjectBuilderGui::checkExists( %this, %classname )
|
function ObjectBuilderGui::checkExists( %this, %classname )
|
||||||
|
|
@ -994,9 +994,9 @@ function ObjectBuilderGui::addWaterObjectFields(%this)
|
||||||
%this.addField("waveSpeed[2]", "TypeFloat", "Wave Speed", "1");
|
%this.addField("waveSpeed[2]", "TypeFloat", "Wave Speed", "1");
|
||||||
%this.addField("overallWaveMagnitude", "TypeFloat", "Overall Wave Magnitude", "1.0");
|
%this.addField("overallWaveMagnitude", "TypeFloat", "Overall Wave Magnitude", "1.0");
|
||||||
|
|
||||||
%this.addField("rippleTex", "TypeImageFilename", "Ripple Texture", "core/rendering/images/ripple" );
|
%this.addField("rippleTexAsset", "TypeImageAssetId", "Ripple Texture", "Core_Rendering:ripple_image" );
|
||||||
%this.addField("depthGradientTex", "TypeImageFilename", "Depth Gradient Texture", "core/rendering/images/depthcolor_ramp" );
|
%this.addField("depthGradientTexAsset", "TypeImageAssetId", "Depth Gradient Texture", "Core_Rendering:depthcolor_ramp_imag" );
|
||||||
%this.addField("foamTex", "TypeImageFilename", "Foam Texture", "core/rendering/images/foam" );
|
%this.addField("foamTexAsset", "TypeImageAssetId", "Foam Texture", "Core_Rendering:foam_image" );
|
||||||
}
|
}
|
||||||
|
|
||||||
function ObjectBuilderGui::buildWaterBlock(%this)
|
function ObjectBuilderGui::buildWaterBlock(%this)
|
||||||
|
|
@ -1411,3 +1411,14 @@ function PrecipitationData::create(%datablock)
|
||||||
};
|
};
|
||||||
return %obj;
|
return %obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function TriggerData::create(%datablock)
|
||||||
|
{
|
||||||
|
%obj = new Trigger()
|
||||||
|
{
|
||||||
|
dataBlock = %datablock;
|
||||||
|
parentGroup = EWCreatorWindow.objectGroup;
|
||||||
|
polyhedron = "-0.5 0.5 0.0 1.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 1.0";
|
||||||
|
};
|
||||||
|
return %obj;
|
||||||
|
}
|
||||||
|
|
@ -321,6 +321,64 @@ function WorldEditor::onWorldEditorUndo( %this )
|
||||||
Inspector.refresh();
|
Inspector.refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
function WorldEditor::onBeginDropFiles( %this )
|
||||||
|
{
|
||||||
|
if(!%this.isVisible())
|
||||||
|
return;
|
||||||
|
|
||||||
|
AssetBrowser_setAssetTarget.showDialog("EWorldEditor.doFileDropProcessing();");
|
||||||
|
|
||||||
|
if(!isObject($EditorImportFileList))
|
||||||
|
$EditorImportFileList = new ArrayObject();
|
||||||
|
|
||||||
|
$EditorImportFileList.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
function WorldEditor::onDropFile( %this, %filePath )
|
||||||
|
{
|
||||||
|
if(!%this.isVisible())
|
||||||
|
return;
|
||||||
|
|
||||||
|
$EditorImportFileList.add(%filePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
function WorldEditor::onDropZipFile(%this, %filePath)
|
||||||
|
{
|
||||||
|
if(!%this.isVisible())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function WorldEditor::onDropFolder(%this, %filePath)
|
||||||
|
{
|
||||||
|
if(!%this.isVisible())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function WorldEditor::onEndDropFiles( %this )
|
||||||
|
{
|
||||||
|
if(!%this.isVisible())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
function WorldEditor::doFileDropProcessing(%this)
|
||||||
|
{
|
||||||
|
if(!ImportAssetWindow.isAwake())
|
||||||
|
ImportAssetWindow.showDialog();
|
||||||
|
|
||||||
|
for(%i=0; %i < $EditorImportFileList.Count(); %i++)
|
||||||
|
{
|
||||||
|
%file = $EditorImportFileList.getKey(%i);
|
||||||
|
ImportAssetWindow.importer.addImportingFile(%file);
|
||||||
|
}
|
||||||
|
|
||||||
|
$EditorImportFileList.empty();
|
||||||
|
|
||||||
|
ImportAssetWindow.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
function Inspector::onInspectorFieldModified( %this, %object, %fieldName, %arrayIndex, %oldValue, %newValue )
|
function Inspector::onInspectorFieldModified( %this, %object, %fieldName, %arrayIndex, %oldValue, %newValue )
|
||||||
{
|
{
|
||||||
// The instant group will try to add our
|
// The instant group will try to add our
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue