Scripts and Restore Workplace

Moderator: jsachs

Post Reply
Robert Schleif
Posts: 349
Joined: May 1st, 2009, 8:28 pm

Scripts and Restore Workplace

Post by Robert Schleif »

PWP failed to restore my original workspace following the second of two power outages a few hours apart. Was this failure an anomaly, or does the program not know to retain the original workspace script?
In the same vein, it looks like scripts do not record a user's response to "Confirm Profile Conversion". Therefore, restoring a workplace can require user intervention for completion. For me, this is slightly inconvenient as my workflow frequently uses Precise Gaussian Blur and I'm in the habit of leaving my computer as Precise Guassian grinds away (or as recover workspace does its thing).
jsachs
Posts: 4389
Joined: January 22nd, 2009, 11:03 pm

Re: Scripts and Restore Workplace

Post by jsachs »

The crash recovery workspace that is automatically restored after a crash is the last workspace that was active the last time Picture Window exited normally. Thus, unless you exited PWP after the first crash and before the second one, it would not recover anything you did after the first crash. You may well get a more recent snapshot of activity by manually restoring the last autosaved workspace via the Script/Recover command from the main menu. The current workspace is autosaved every time you click OK in a transformation and in several other situations.

The Confirm Profile Conversion settings are in fact saved in the script file, however in some cases they may be ignored. Under File/Preferences, there is a setting under On Script Load that has two options: Warn about color management changes / Ignore color management changes. If you select Ignore color management changes, the Confirm Profile Conversion settings (being part of the color management settings) are not restored from the script file which is probably what is causing the problem you are seeing. Possibly there should be a third option to Accept color management changes, but this has the danger that it can mess up your color management settings without a warning.
Jonathan Sachs
Digital Light & Color
Robert Schleif
Posts: 349
Joined: May 1st, 2009, 8:28 pm

Re: Scripts and Restore Workplace

Post by Robert Schleif »

I did try restoring the last autosaved workspace, but that generated the same workspace that was generated by recover. Oh well, must have been a an unusual situation.
When PWP is recovering or restoring a workspace, it would be nice if it made the same choice in Confirm Profile Conversion as was made originally. Otherwise, when a script is run for other purposes, asking or not as chosen in Preferences seems appropriate.
jsachs
Posts: 4389
Joined: January 22nd, 2009, 11:03 pm

Re: Scripts and Restore Workplace

Post by jsachs »

After you recovered, most likely the last autosaved workspace was overwritten by the recovered workspace, but if you recover one of the earlier versions (Autosave 1..5) you should be able to get your work back.

If you revert to Warning on color management settings change, PWP should re-apply the settings from the script file. Bear in mind that the final image is likely to depend on the color management settings, including whether or not you convert profiles when loading images. Once the color management settings are changed, they will remain changed until you explicitly change them back, so the Convert Profile settings will remain changed for the current session since PWP has no way to know when it is OK to change them back to the settings before you loaded the script file.
Jonathan Sachs
Digital Light & Color
Robert Schleif
Posts: 349
Joined: May 1st, 2009, 8:28 pm

Re: Scripts and Restore Workplace

Post by Robert Schleif »

Since the convert profile window showed up in response to the File Open transformation, I expected that my response affected only that transformation. It might be helpful if that window warned the user that a response to the window can change an item in preferences.
jsachs
Posts: 4389
Joined: January 22nd, 2009, 11:03 pm

Re: Scripts and Restore Workplace

Post by jsachs »

Let me try to explain this more clearly as it is admittedly confusing.

The response to the File Open warning does not affect the Preferences setting.

The issue is whether or not the color management settings (including whether or not to restore the settings from the script file) are copied over the current color management settings or ignored when you load a script file. This is controlled by the Preferences setting.

The idea behind the script file is to be able to reload all the operations in the workspace so that when all the images are recalculated you get exactly the same images you had when the script file was saved. The only way to guarantee this 100% is to save all the color management settings with the script file and to reload them when you load the script file. For example, running the same set of transformations but with a different working color space can produce a color shift in the images. On the other hand, overwriting the current color management settings can be an annoyance since you may have a good reason to use different settings than were in effect when the script file was saved. Usually any differences in color space settings are minor or inconsequential. Anyway, the Preferences setting lets you either issue a warning when loading a script and one or more of its color management settings are different from the current settings, or you can just ignore the color management settings in the script and continue using the current settings. In some cases, this might produce a slightly different image than you had when the script was created, but it avoids warnings. If, on the other hand, you opt for a warning and then load the color management settings from the script file, your current color management settings are modified and if you want them back you need to reset them manually when you are done working on the workspace loaded by the script.
Jonathan Sachs
Digital Light & Color
Robert Schleif
Posts: 349
Joined: May 1st, 2009, 8:28 pm

Re: Scripts and Restore Workplace

Post by Robert Schleif »

OK. Now I understand. Thank you for the explanation. A way that PWP could maintain the elexibility that you have built in, and at the same time allow my scripts or workspace recovery scripts to run unattended would be after 30 seconds for Profile Conversion window to default to the profile used originally.
jsachs
Posts: 4389
Joined: January 22nd, 2009, 11:03 pm

Re: Scripts and Restore Workplace

Post by jsachs »

I made the following change for the next release...

If you encounter the profile conversion dialog box while executing a script file or during a batch operation, and if you do not respond within 30 seconds, Picture Window will simulate your pressing the Convert button and will let execution continue. This facilitates unattended operation but if you need to intervene manually to adjust the profile, you still have 30 seconds to do so.
Jonathan Sachs
Digital Light & Color
Post Reply