Confusion with PF_Cmd_SEQUENCE_FLATTEN command.
Hi,
I'm very confused with PF_Cmd_SEQUENCE_FLATTEN command. In the documentation it's mentioned that this is sent when saving and duplicating a sequence. When I duplicate my custom effect FLATTEN is sent. But my confusion here is this command is sent for the old effect which is being duplicated or for new duplicated effect?
Please consider what I'm doing. Please let me know in case the explanation is not enough:
I store an int in the sequence data. And for each effect i keep incrementing it.
1. I add a layer. Then I add 2 custom effects with sequence data 1 & 2 respectively.
2. Now I duplicate the layer. PF_Cmd_SEQUENCE_FLATTEN command is sent. I increment the sequence data. It's called two times for 2 custom effects. Data is 3 & 4 respectively for 2 new duplicated effects.
But the problem is that now the effects in the first layer and the second layer, both have same sequence data. i.e. 3 & 4 respectively and not 1, 2, 3 & 4.
This can happen if the FLATTEN command is sent to the old effect before duplicating. This is my guess as both the layer effects have updated IDs.
Any ideas?
Thanks,
Dheeraj.