HISE Logo Forum
    • Categories
    • Register
    • Login

    SaveInProject without saveInPreset

    Scheduled Pinned Locked Moved Scripting
    presetssaveinpreset
    5 Posts 2 Posters 105 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Matt_SFM
      Matt_SF
      last edited by

      Hello folks,
      As the title, how would you go about saving widgets in the project (in the DAW) without saving them in the presets?

      My use case: I have my drums plugin with comboBoxes that handles multi-out routing.
      I wish to save the user's routing setup in his project when he saves it (obviously) , but at the same I wish to allow him to setup the routing and keep this setup while browsing the presets.

      Would that be possible?
      Hint: I tried a postCallback in a presetHandler but it doesn't work.

      Develop branch
      Win10 & VS17 / Ventura & Xcode 14. 3

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @Matt_SF
        last edited by

        @Matt_SF said in SaveInProject without saveInPreset:

        Hint: I tried a postCallback in a presetHandler but it doesn't work.

        You need to use saveInPreset and the pre and post callbacks.

        In the pre-callback you store the current value, then the saveInPreset thing will trigger, then in the post-callback you restore the value you saved in the pre-callback.

        And you'll use UserPresetHandler.isInternalPresetLoad() to distinguish between a preset load and a daw restore.

        More info - https://forum.hise.audio/topic/6410/restoring-properties-with-daw-session?_=1735644318211

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        Matt_SFM 2 Replies Last reply Reply Quote 0
        • Matt_SFM
          Matt_SF @d.healey
          last edited by

          @d-healey said in SaveInProject without saveInPreset:

          You need to use saveInPreset and the pre and post callbacks.

          In the pre-callback you store the current value, then the saveInPreset thing will trigger, then in the post-callback you restore the value you saved in the pre-callback.

          That's what I did.

          And you'll use UserPresetHandler.isInternalPresetLoad() to distinguish between a preset load and a daw restore.

          But I haven't done this.

          Thanks David! I'll try this and report back 👍

          Develop branch
          Win10 & VS17 / Ventura & Xcode 14. 3

          1 Reply Last reply Reply Quote 0
          • Matt_SFM
            Matt_SF @d.healey
            last edited by

            @d-healey seems to be working fine!

            I remember having seen the post you reffered to but couldn't find it when searching the forum.

            I've said it many times but I don't know what we would do without you 😁🙏

            Develop branch
            Win10 & VS17 / Ventura & Xcode 14. 3

            d.healeyD 1 Reply Last reply Reply Quote 1
            • d.healeyD
              d.healey @Matt_SF
              last edited by

              @Matt_SF said in SaveInProject without saveInPreset:

              couldn't find it when searching the forum

              I struggled to find it too, looking forward to getting better search functionality back!

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              1 Reply Last reply Reply Quote 1
              • First post
                Last post

              19

              Online

              1.7k

              Users

              11.8k

              Topics

              102.7k

              Posts