├── ProjectSettings ├── ProjectVersion.txt ├── TagManager.asset ├── TimeManager.asset ├── AudioManager.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── DynamicsManager.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── NetworkManager.asset ├── ProjectSettings.asset ├── QualitySettings.asset ├── Physics2DSettings.asset ├── ClusterInputManager.asset ├── EditorBuildSettings.asset └── UnityConnectSettings.asset ├── Assets ├── main.unity ├── main.unity.meta ├── script.cs.meta └── script.cs ├── .gitignore └── README.md /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.5.2f1 2 | -------------------------------------------------------------------------------- /Assets/main.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/Assets/main.unity -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bitbutter/UndoStripperForArtRageScripts/master/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /Assets/main.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8353c0808a927420d8f51f905788e6ae 3 | timeCreated: 1490694268 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/script.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a67af11b9887480da177da5bd5cd5aa 3 | timeCreated: 1490694302 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Visual Studio 2015 cache directory 9 | /.vs/ 10 | 11 | # Autogenerated VS/MD/Consulo solution and project files 12 | ExportedObj/ 13 | .consulo/ 14 | *.csproj 15 | *.unityproj 16 | *.sln 17 | *.suo 18 | *.tmp 19 | *.user 20 | *.userprefs 21 | *.pidb 22 | *.booproj 23 | *.svd 24 | *.pdb 25 | 26 | # Unity3D generated meta files 27 | *.pidb.meta 28 | 29 | # Unity3D Generated File On Crash Reports 30 | sysinfo.txt 31 | 32 | # Builds 33 | *.apk 34 | *.unitypackage -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UndoStripperForArtRageScripts 2 | A simple tool for the [ArtRage](https://www.artrage.com/) drawing program. The tool strips out strokes that were removed with an Undo event from ArtRage script recordings. This tool has been built in [Unity](https://unity3d.com/). 3 | 4 | # Download 5 | 6 | Get the latest version [from the releases page](https://github.com/bitbutter/UndoStripperForArtRageScripts/releases). 7 | 8 | # Instructions 9 | 10 | * Duplicate an existing ArtRage script file that has Undo events in it. 11 | 12 | * Open the duplicated file in Sublime Text. Delete any 'NUL' items you see inside the Header block. 13 | 14 | * Select all the text in the file and copy it to the clipboard. 15 | 16 | * Launch UndoStripperForArtRageScripts and click the 'Process' button. After a short delay the background will turn green. Then go back to the text editor and paste the clipboard contents back in, overwriting the selection. Save the file. 17 | 18 | * When you run the new file in ArtRage it will play back without showing any strokes that you used the Undo function to remove while drawing. 19 | 20 | These instructions are displayed in the tool window too. 21 | -------------------------------------------------------------------------------- /Assets/script.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | using System; 6 | public class script : MonoBehaviour { 7 | public Image panelImage; 8 | 9 | // Use this for initialization 10 | public void Process () { 11 | panelImage.color=Color.white; 12 | 13 | string content = GUIUtility.systemCopyBuffer; 14 | string[] splitString = content.Split(new string[] { "\r\n", "\n" }, StringSplitOptions.None); 15 | 16 | //Debug.Log(splitString[splitString.Length-2]); 17 | string outputString = ""; 18 | string temporaryString = ""; 19 | int lastStrokeEventStartline=-1; 20 | bool strokeJustFinished=false; 21 | bool insideStroke=false; 22 | 23 | Debug.Log("lines "+splitString.Length); 24 | for(int i = 0;i 4 && splitString[i].Substring(splitString[i].Length-4,4) == "Undo"){ 30 | Debug.Log("undo detected"); 31 | Debug.Log("discarding: "+temporaryString); 32 | temporaryString=""; 33 | continue; 34 | } else { 35 | outputString += temporaryString; 36 | temporaryString=""; 37 | } 38 | } 39 | if(splitString[i]==""){ 40 | insideStroke=true; 41 | } 42 | if(insideStroke){ 43 | temporaryString += splitString[i]+"\n"; 44 | } else{ 45 | outputString += splitString[i]+"\n"; 46 | } 47 | if(splitString[i]==""){ 48 | strokeJustFinished=true; 49 | insideStroke=false; 50 | } else { 51 | strokeJustFinished=false; 52 | } 53 | } 54 | GUIUtility.systemCopyBuffer = outputString; 55 | Debug.Log("copied a stripped version of the script to the clipboard"); 56 | panelImage.color=Color.green; 57 | } 58 | } 59 | --------------------------------------------------------------------------------