← Back to team overview

phatch-dev team mailing list archive

[Bug 381091] Re: unexpected multiple save actions behaviour

 

You could add a flag that sets variables "sticky", indicating that the
reference-variable should be the one from initial image.

Additionally you could add a "chain"-flag. This way actions needing
variables refreshed after every action get along.

-- 
unexpected multiple save actions behaviour
https://bugs.launchpad.net/bugs/381091
You received this bug notification because you are a member of Phatch
Developers, which is subscribed to Phatch.

Status in Phatch = Photo & Batch!: Confirmed

Bug description:
If you add multiple save actions the resulting behaviour is unexpected.
Let's say I'm executing the following actionlist:

{'actions': [
             {'fields': {'In': u'<folder>_phatch1/<subfolder>'},
              'label': 'Save'},
             {'fields': {'In': u'<folder>_phatch2/<subfolder>'},
              'label': 'Save'},
             {'fields': {'In': u'<folder>_phatch3/<subfolder>'},
              'label': 'Save'}],
 'description': u'Describe here the action list.'}

The resulting images will be written to:
<folder>_phatch1/
<folder>_phatch2/phatch1/
<folder>_phatch2/phatch2/phatch1/

If you remove <subfolder> from paths the resulting images will be written to:
<folder>_phatch1/
<folder>_phatch2/
<folder>_phatch3/

After some debugging I think I know the cause of this behaviour.  <subfolder> is calculated like this:
info[_t('subfolder')]  = dirname[len(info[_t('folder')])+1:]

But when an image is saved, its location info (or dirname) changes to the new save location. After the first save the dirname becomes <folder>_phatch1/  and as a result subfolder will be phatch1