|
@@ -105,7 +105,7 @@ function NewAnimationAssetDialog::Validate(%this)
|
|
%this.moduleNameBox.setText(%modSig);
|
|
%this.moduleNameBox.setText(%modSig);
|
|
%this.prevFolder = %folderPath;
|
|
%this.prevFolder = %folderPath;
|
|
}
|
|
}
|
|
- %assetPath = %folderPath @ %assetName @ ".asset.taml";
|
|
|
|
|
|
+ %assetPath = pathConcat(%folderPath, %assetName @ ".animation.taml");
|
|
%moduleName = getUnit(%this.moduleNameBox.getText(), 0, "_");
|
|
%moduleName = getUnit(%this.moduleNameBox.getText(), 0, "_");
|
|
%moduleVersion = getUnit(%this.moduleNameBox.getText(), 1, "_");
|
|
%moduleVersion = getUnit(%this.moduleNameBox.getText(), 1, "_");
|
|
%assetID = %moduleName @ ":" @ %assetName;
|
|
%assetID = %moduleName @ ":" @ %assetName;
|
|
@@ -127,6 +127,20 @@ function NewAnimationAssetDialog::Validate(%this)
|
|
%this.feedback.setText("You can only create an animation asset inside of a module.");
|
|
%this.feedback.setText("You can only create an animation asset inside of a module.");
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ %module = ModuleDatabase.findModule(%moduleName, %moduleVersion);
|
|
|
|
+ if(!isObject(%module))
|
|
|
|
+ {
|
|
|
|
+ %this.feedback.setText("There was a problem finding the module for this asset.");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ else if(%module.Synchronized)
|
|
|
|
+ {
|
|
|
|
+ %this.feedback.setText("You cannot add assets to a library module. Updates to the module would remove your assets. Instead, create your own module and add assets to it. Remember to have your module scan for assets.");
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
%button = AssetAdmin.Dictionary["AnimationAsset"].getButton(%assetID);
|
|
%button = AssetAdmin.Dictionary["AnimationAsset"].getButton(%assetID);
|
|
if(isObject(%button))
|
|
if(isObject(%button))
|
|
@@ -136,7 +150,7 @@ function NewAnimationAssetDialog::Validate(%this)
|
|
}
|
|
}
|
|
|
|
|
|
%this.createButton.active = true;
|
|
%this.createButton.active = true;
|
|
- %this.feedback.setText("Press the Create button to open the new asset for editing.");
|
|
|
|
|
|
+ %this.feedback.setText("Press the Create button to open the new asset for editing. Your new asset will have the extension animation.taml. You must have your module scan the asset's folder for this extension.");
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -152,7 +166,7 @@ function NewAnimationAssetDialog::onCreate(%this)
|
|
{
|
|
{
|
|
%folderPath = %this.getFolderPath();
|
|
%folderPath = %this.getFolderPath();
|
|
%assetName = %this.assetNameBox.getText();
|
|
%assetName = %this.assetNameBox.getText();
|
|
- %assetPath = %folderPath @ %assetName @ ".asset.taml";
|
|
|
|
|
|
+ %assetPath = pathConcat(%folderPath, %assetName @ ".animation.taml");
|
|
%moduleName = getUnit(%this.moduleNameBox.getText(), 0, "_");
|
|
%moduleName = getUnit(%this.moduleNameBox.getText(), 0, "_");
|
|
%moduleVersion = getUnit(%this.moduleNameBox.getText(), 1, "_");
|
|
%moduleVersion = getUnit(%this.moduleNameBox.getText(), 1, "_");
|
|
%assetID = %moduleName @ ":" @ %assetName;
|
|
%assetID = %moduleName @ ":" @ %assetName;
|