View Full Version : Is there a way to fix this script file?

03-08-2013, 10:14 AM
I started recording a script after loading a reference and didn't 'include painting' as there was nothing yet painted.
I then proceeded to draw on the initial layer, the output of which wasn't included in the output of the final script, so my script playback is missing a fairly essential layer.

I would have included the script file, but the forums won't allow me to post links yet.

03-08-2013, 01:36 PM

But only if you had saved the painting at the point before you started the recording, because you need to at least have that information, to add it. If you have that, then you may be able do it. It's not necessarily going to be an easy fix, unless you know your way around code. What you'll want to do, is open the painting you had saved before you began recording, and then start recording, except this time include the painting. Immediately after starting the recording, stop the recording and save it. This will create a script file that has the information in it as script code, which you'll need to copy and paste into the other script file. Now open the script file you just made within notepad or another text editing program (I recommend Notepad++). Locate and select all the code starting from (and including) <StartupFeatures> down to the code ending with (and including) </StartupFeatures>. It'll probably be a lot of code, because it'll have the binary information for the canvas, stencils, references, etc... Once you've selected it all, hold Ctrl and hit your "C" key to copy the code. Now open your original script file (be sure to save a copy of the original, because you may end screwing it up a few times before getting it right). Once more, locate and select all the code starting from (and including) <StartupFeatures> down to the code ending with (and including) </StartupFeatures>, but this time paste over it by holding Ctrl and hitting your "V" key. This will paste the code you copied from your other script file, over the base start information in this one. Now save the script (remember not to overwrite the original file, in case you need to make other changes). Now, when you play the script back, it should inject the art you had created before you started the original recording.

This all may sound tricky, but it's fairly simple when you know what to look for. Though, depending on the complexity of the painting, it could cause odd results. If you can't get it to work, you might try posting the original painting (before you started recording it), along with the script you recorded, and I can take a crack at piecing them together for you.