HISE Logo Forum
    • Categories
    • Register
    • Login

    How to Use the Custom User Preset Model?

    Scheduled Pinned Locked Moved Solved Scripting
    1 Posts 1 Posters 167 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.
    • clevername27C
      clevername27
      last edited by clevername27

      Is anyone familiar with the Custom User Preset Model, and perhaps could help?

      I've written this test, but as the documentation instructs, I need to first save the object before I can use Object Persistence. How do I do this, and am I on the right track (below)? Thank you.

      const var internalPresetHandler = Engine.createUserPresetHandler();
      
      inline function LoadHostPluginData (obj) {
      
      	Engine.showMessageBox("Load", obj.testItem, 2);
      };
      
      inline function SaveHostPluginData () {
      
      	return { "testItem": 7 };
      }
      
      internalPresetHandler.setUseCustomUserPresetModel(LoadHostPluginData, SaveHostPluginData, true);
      

      EDIT: Solution was to create the file by referencing it in the API.

      1 Reply Last reply Reply Quote 0
      • clevername27C clevername27 has marked this topic as solved on
      • First post
        Last post

      30

      Online

      1.8k

      Users

      12.1k

      Topics

      105.1k

      Posts