export to one xml (fta)

This commit is contained in:
2016-02-19 02:16:45 +06:00
parent fc1f934a9a
commit d6b538c274
22 changed files with 407 additions and 109 deletions

View File

@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<RootNamespace></RootNamespace>
<ProjectGuid>{7FF03E09-4B14-EFF9-4F08-36E102F327D3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<AssemblyName>Assembly-CSharp-Editor</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseDirectory>Assets</BaseDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Temp\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;UNITY_5_3_2;UNITY_5_3;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Temp\bin\Release\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.XML" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="UnityEngine">
<HintPath>/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEditor">
<HintPath>/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\FlashTools\Scripts\Internal\Editor\FlashAnimAssetEditor.cs" />
<Compile Include="Assets\FlashTools\Scripts\Internal\Editor\FlashAnimEditor.cs" />
<Reference Include="UnityEditor.Advertisements">
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Advertisements/Editor/UnityEditor.Advertisements.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/EditorTestsRunner/Editor/nunit.framework.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.EditorTestsRunner">
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/EditorTestsRunner/Editor/UnityEditor.EditorTestsRunner.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.UI">
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Networking">
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.Networking">
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.TreeEditor">
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.Graphs">
<HintPath>/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.Graphs.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.Android.Extensions">
<HintPath>/Applications/Unity/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.iOS.Extensions">
<HintPath>/Applications/Unity/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.AppleTV.Extensions">
<HintPath>/Applications/Unity/PlaybackEngines/AppleTVSupport/UnityEditor.AppleTV.Extensions.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.Tizen.Extensions">
<HintPath>/Applications/Unity/PlaybackEngines/TizenPlayer/UnityEditor.Tizen.Extensions.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.SamsungTV.Extensions">
<HintPath>/Applications/Unity/PlaybackEngines/STVPlayer/UnityEditor.SamsungTV.Extensions.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.WebGL.Extensions">
<HintPath>/Applications/Unity/PlaybackEngines/WebGLSupport/UnityEditor.WebGL.Extensions.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.LinuxStandalone.Extensions">
<HintPath>/Applications/Unity/PlaybackEngines/LinuxStandaloneSupport/UnityEditor.LinuxStandalone.Extensions.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.WindowsStandalone.Extensions">
<HintPath>/Applications/Unity/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.OSXStandalone.Extensions">
<HintPath>/Applications/Unity/PlaybackEngines/MacStandaloneSupport/UnityEditor.OSXStandalone.Extensions.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="Assembly-CSharp.csproj">
<Project>{ED48043C-7BE9-40F3-EC3C-3D4369E54740}</Project> <Name>Assembly-CSharp</Name> </ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

66
Assembly-CSharp.csproj Normal file
View File

@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<RootNamespace></RootNamespace>
<ProjectGuid>{ED48043C-7BE9-40F3-EC3C-3D4369E54740}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<AssemblyName>Assembly-CSharp</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<BaseDirectory>Assets</BaseDirectory>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Temp\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;UNITY_5_3_2;UNITY_5_3;UNITY_5;ENABLE_NEW_BUGREPORTER;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_FRAME_DEBUGGER;ENABLE_GENERICS;ENABLE_HOME_SCREEN;ENABLE_IMAGEEFFECTS;ENABLE_LIGHT_PROBES_LEGACY;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_PLUGIN_INSPECTOR;ENABLE_SHADOWS;ENABLE_SINGLE_INSTANCE_BUILD_SETTING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_SPRITE_POLYGON;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_UNET;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;INCLUDE_IL2CPP;INCLUDE_DIRECTX12;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_LOCALIZATION;ENABLE_ANDROID_ATLAS_ETC1_COMPRESSION;ENABLE_EDITOR_TESTS_RUNNER;UNITY_STANDALONE_OSX;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_GAMECENTER;ENABLE_TEXTUREID_MAP;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_LOG_MIXED_STACKTRACE;ENABLE_UNITYWEBREQUEST;ENABLE_CLUSTERINPUT;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_OSX</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Temp\bin\Release\</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<NoWarn>0169</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.XML" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="UnityEngine">
<HintPath>/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEditor">
<HintPath>/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEditor.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\FlashTools\Scripts\FlashAnim.cs" />
<Compile Include="Assets\FlashTools\Scripts\FlashAnimAsset.cs" />
<Reference Include="UnityEngine.UI">
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Networking">
<HintPath>/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll</HintPath>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 73ec459545ae3489596d951cd04a348c
timeCreated: 1455736596
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: faef3a94e41ed4e7fbb40518322c3494
timeCreated: 1455736597
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cfa2cd974323a4198b3f1d9a21becc10
timeCreated: 1455736596
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4137e45a3fa034fadadb10b797754a2e
timeCreated: 1455736596
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 56efc704a4e13427194e075561649ed1
timeCreated: 1455736596
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 21aa39328267d446b943c01ecb384e13
folderAsset: yes
timeCreated: 1455736806
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,6 @@
using UnityEngine;
namespace FlashTools {
public class FlashAnim : MonoBehaviour {
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b97e5bf24f6a64697ae8b7dc211e3127
timeCreated: 1455736843
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,6 @@
using UnityEngine;
namespace FlashTools {
public class FlashAnimAsset : MonoBehaviour {
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 06e77921b348447d8afc2d08cad866b6
timeCreated: 1455736827
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c649686f2102d4b03a8b167b86430eec
folderAsset: yes
timeCreated: 1455736963
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a45d7db78d482494d8456892d9007d32
folderAsset: yes
timeCreated: 1455736975
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,6 @@
using UnityEngine;
namespace FlashTools.Internal {
public class FlashAnimAssetEditor : MonoBehaviour {
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b39a64fff989148cf99d507561558d94
timeCreated: 1455737008
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,6 @@
using UnityEngine;
namespace FlashTools.Internal {
public class FlashAnimEditor : MonoBehaviour {
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 781fe7f2449064964aa12b2b41537001
timeCreated: 1455737000
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,2 +1,2 @@
m_EditorVersion: 5.3.1f1
m_EditorVersion: 5.3.2f1
m_StandardAssetsVersion: 0

View File

@@ -202,15 +202,14 @@ if (typeof Object.create != 'function') {
}
};
UniqueIds.prototype.save = function (xml_path) {
ft.type_assert(xml_path, 'string');
var xml_node = new XmlNode("strings");
UniqueIds.prototype.export = function (xml_node) {
ft.type_assert(xml_node, XmlNode);
var strings_node = xml_node.child("strings");
ft.object_foreach(this.stringIds, function (key, value) {
xml_node.child("string")
strings_node.child("string")
.attr("id", value)
.attr("str", ft.escape_string(key));
});
xml_node.save(xml_path);
};
// ----------------------------------------------------------------------------
@@ -300,7 +299,6 @@ if (typeof Object.create != 'function') {
ft.trace_fmt("{0}-= BitmapAsset =-", indent);
ft.trace_fmt("{0}-Id : {1}", indent, this.get_id());
ft.trace_fmt("{0}-Name : {1}", indent, this.get_name());
ft.trace_fmt("{0}-ExportFilename : {1}", indent, this.get_export_filename());
};
BitmapAsset.prototype.get_id = function () {
@@ -311,12 +309,8 @@ if (typeof Object.create != 'function') {
return this.item.name;
};
BitmapAsset.prototype.get_type = function () {
return "bitmap";
};
BitmapAsset.prototype.get_export_filename = function () {
return "bitmaps/{0}.png".format(this.get_id());
return "{0}.png".format(this.get_id());
};
BitmapAsset.prototype.get_export_fullfilename = function (export_folder) {
@@ -345,9 +339,7 @@ if (typeof Object.create != 'function') {
BitmapAsset.prototype.export_description = function (xml_node) {
ft.type_assert(xml_node, XmlNode);
xml_node.child("bitmap")
.attr("id" , this.get_id())
.attr("type" , this.get_type())
.attr("filename", this.get_export_filename());
.attr("id", this.get_id());
};
// ----------------------------------------------------------------------------
@@ -367,9 +359,8 @@ if (typeof Object.create != 'function') {
indent = indent || "";
ft.type_assert(indent, 'string');
ft.trace_fmt("{0}-= SymbolAsset =-", indent);
ft.trace_fmt("{0}-Id : {1}", indent, this.get_id());
ft.trace_fmt("{0}-Name : {1}", indent, this.get_name());
ft.trace_fmt("{0}-ExportFilename : {1}", indent, this.get_export_filename());
ft.trace_fmt("{0}-Id : {1}" , indent, this.get_id());
ft.trace_fmt("{0}-Name : {1}" , indent, this.get_name());
};
SymbolAsset.prototype.get_id = function () {
@@ -380,21 +371,6 @@ if (typeof Object.create != 'function') {
return this.item.name;
};
SymbolAsset.prototype.get_type = function () {
return "symbol";
};
SymbolAsset.prototype.get_export_filename = function () {
return "symbols/{0}.xml".format(this.get_id());
};
SymbolAsset.prototype.get_export_fullfilename = function (export_folder) {
ft.type_assert(export_folder, 'string');
return ft.combine_path(
export_folder,
this.get_export_filename());
};
SymbolAsset.prototype.convert = function (document) {
ft.type_assert(document, Document);
new TimelineInst(this.item.timeline, this.uniqueIds)
@@ -407,28 +383,12 @@ if (typeof Object.create != 'function') {
.prepare(document);
};
SymbolAsset.prototype.export = function (export_folder, xml_node) {
ft.type_assert(export_folder, 'string');
SymbolAsset.prototype.export = function (xml_node) {
ft.type_assert(xml_node, XmlNode);
this.export_content(export_folder);
this.export_description(xml_node);
};
SymbolAsset.prototype.export_content = function (export_folder) {
ft.type_assert(export_folder, 'string');
var xml_node = new XmlNode("symbol")
var symbol_node = xml_node.child("symbol")
.attr("id", this.get_id());
new TimelineInst(this.item.timeline, this.uniqueIds)
.export_description(xml_node);
xml_node.save(this.get_export_fullfilename(export_folder));
};
SymbolAsset.prototype.export_description = function (xml_node) {
ft.type_assert(xml_node, XmlNode);
xml_node.child("symbol")
.attr("id" , this.get_id())
.attr("type" , this.get_type())
.attr("filename", this.get_export_filename());
.export_description(symbol_node);
};
// ----------------------------------------------------------------------------
@@ -498,7 +458,7 @@ if (typeof Object.create != 'function') {
.export(export_folder, xml_node);
} else if (this.is_symbol_item(item)) {
new SymbolAsset(item, this.uniqueIds)
.export(export_folder, xml_node);
.export(xml_node);
} else {
throw "Unsupported library item type ({0})!"
.format(item.itemType);
@@ -525,20 +485,10 @@ if (typeof Object.create != 'function') {
indent = indent || "";
ft.type_assert(indent, 'string');
ft.trace_fmt("{0}-= TimelineInst =-", indent);
ft.trace_fmt("{0}-Id : {1}", indent, this.get_id());
ft.trace_fmt("{0}-Name : {1}", indent, this.get_name());
ft.trace_fmt("{0}-Layers : {1}", indent, this.timeline.layerCount);
ft.trace_fmt("{0}-Frames : {1}", indent, this.timeline.frameCount);
};
TimelineInst.prototype.get_id = function () {
return this.uniqueIds.get_string_id(this.get_name());
};
TimelineInst.prototype.get_name = function () {
return this.timeline.name;
};
TimelineInst.prototype.remove_empty_layers = function () {
var layers = this.timeline.layers;
for ( var i = 0; i < layers.length; ) {
@@ -577,11 +527,9 @@ if (typeof Object.create != 'function') {
TimelineInst.prototype.export_description = function (xml_node) {
ft.type_assert(xml_node, XmlNode);
var timeline_node = xml_node.child("timeline")
.attr("id", this.get_id());
ft.array_foreach(this.timeline.layers, function(layer) {
new LayerInst(layer, this.uniqueIds)
.export_description(timeline_node);
.export_description(xml_node);
}.bind(this));
};
@@ -937,6 +885,7 @@ if (typeof Object.create != 'function') {
ft.trace_fmt("{0}-Document : {1}", indent, this.document.name);
ft.trace_fmt("{0}-Document path : {1}", indent, this.get_document_path());
ft.trace_fmt("{0}-Export folter : {1}", indent, this.get_export_folder());
ft.trace_fmt("{0}-Export path : {1}", indent, this.get_export_path());
};
Exporter.prototype.get_document_path = function () {
@@ -949,22 +898,10 @@ if (typeof Object.create != 'function') {
"_export/");
};
Exporter.prototype.get_stage_export_path = function () {
Exporter.prototype.get_export_path = function () {
return ft.combine_path(
this.get_export_folder(),
"stage.xml");
};
Exporter.prototype.get_library_export_path = function () {
return ft.combine_path(
this.get_export_folder(),
"library.xml");
};
Exporter.prototype.get_strings_export_path = function () {
return ft.combine_path(
this.get_export_folder(),
"strings.xml");
"asset.fta");
};
Exporter.prototype.export = function () {
@@ -977,9 +914,7 @@ if (typeof Object.create != 'function') {
this.delete_unused_items();
this.convert_document();
this.prepare_document();
this.export_library();
this.export_stage();
this.export_strings();
this.export_document();
ft.trace_fmt("- Finish : {0}", this.get_export_folder());
} catch (e) {
ft.trace_fmt("- Error : {0}", e);
@@ -1000,14 +935,6 @@ if (typeof Object.create != 'function') {
throw "Can't create document export folder ({0})!"
.format(export_folder);
}
if (!FLfile.createFolder(export_folder + "bitmaps/")) {
throw "Can't create document bitmaps export folder ({0})!"
.format(export_folder);
}
if (!FLfile.createFolder(export_folder + "symbols/")) {
throw "Can't create document symbols export folder ({0})!"
.format(export_folder);
}
};
Exporter.prototype.full_exit_edit_mode = function () {
@@ -1038,23 +965,29 @@ if (typeof Object.create != 'function') {
.prepare(this.document);
};
Exporter.prototype.export_library = function () {
var xml_node = new XmlNode("library")
Exporter.prototype.export_document = function() {
var xml_node = new XmlNode("document")
.attr("frame_rate", this.document.frameRate);
this.export_library(xml_node);
this.export_stage(xml_node);
this.export_strings(xml_node);
xml_node.save(this.get_export_path());
};
Exporter.prototype.export_library = function (xml_node) {
var library_node = xml_node.child("library");
new LibraryInst(this.document.library, this.uniqueIds)
.export(this.get_export_folder(), xml_node);
xml_node.save(this.get_library_export_path());
.export(this.get_export_folder(), library_node);
};
Exporter.prototype.export_stage = function () {
var xml_node = new XmlNode("stage");
Exporter.prototype.export_stage = function (xml_node) {
var stage_node = xml_node.child("stage");
new TimelineInst(this.document.getTimeline(), this.uniqueIds)
.export_description(xml_node);
xml_node.save(this.get_stage_export_path(document));
.export_description(stage_node);
};
Exporter.prototype.export_strings = function () {
this.uniqueIds.save(this.get_strings_export_path());
Exporter.prototype.export_strings = function (xml_node) {
this.uniqueIds.export(xml_node);
};
// ------------------------------------

29
unityflash.sln Normal file
View File

@@ -0,0 +1,29 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2008
Project("{D58E310B-CC7A-56FA-675C-024D435EF77E}") = "unityflash", "Assembly-CSharp.csproj", "{ED48043C-7BE9-40F3-EC3C-3D4369E54740}"
EndProject
Project("{D58E310B-CC7A-56FA-675C-024D435EF77E}") = "unityflash", "Assembly-CSharp-Editor.csproj", "{7FF03E09-4B14-EFF9-4F08-36E102F327D3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{ED48043C-7BE9-40F3-EC3C-3D4369E54740}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED48043C-7BE9-40F3-EC3C-3D4369E54740}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED48043C-7BE9-40F3-EC3C-3D4369E54740}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED48043C-7BE9-40F3-EC3C-3D4369E54740}.Release|Any CPU.Build.0 = Release|Any CPU
{7FF03E09-4B14-EFF9-4F08-36E102F327D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7FF03E09-4B14-EFF9-4F08-36E102F327D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7FF03E09-4B14-EFF9-4F08-36E102F327D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7FF03E09-4B14-EFF9-4F08-36E102F327D3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Assembly-CSharp.csproj
EndGlobalSection
EndGlobal

13
unityflash.userprefs Normal file
View File

@@ -0,0 +1,13 @@
<Properties StartupItem="Assembly-CSharp.csproj">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" PreferredExecutionTarget="Unity.Instance.Unity Editor" />
<MonoDevelop.Ide.Workbench ActiveDocument="Assets/FlashTools/Scripts/Internal/Editor/FlashAnimAssetEditor.cs">
<Files>
<File FileName="Assets/FlashTools/Scripts/Internal/Editor/FlashAnimAssetEditor.cs" Line="6" Column="2" />
<File FileName="Assets/FlashTools/Scripts/Internal/Editor/FlashAnimEditor.cs" Line="3" Column="32" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
</Properties>