updating [pattr] preset from ui

    Nov 13 2012 | 4:52 pm
    Consider the following example
    The intent is to re-save the preset every time the umenu's value changes. The issue arises when the preset is recalled. Since the umenu's value has updated, the preset is stored again when the preset is recalled. This occasionally leads to some extremely undesirable results.
    Is there some way to differentiate input from the user from input from pattr?
    Many thanks in advance

    • Nov 14 2012 | 2:07 pm
      Your patch is sending the store message to pattrstorage BEFORE it sends the umenu value into the pattr, which may actually explain why the presets aren't working as you expect (in the example patch at least).
      Also, in this example, the pattr object is not bound to the umenu. As you are simply using the value sent out of the pattr to update the current value of the umenu, you can insert a [prepend set] between the two to prevent subsequent output from the umenu. As per your original query, the umenu will of course output in response to user interaction.
      This will work for the setup you have in the example patch, but may need modification if you decide to either a) bind the pattr to the umenu, b) expose the umenu object directly to pattrstorage (via autopattr, the pattrstorage subscribemode behaviour, etc)
      Hope that helps