Forum
    • Categories
    • Register
    • Login

    Engine.loadUserPreset for expansions?

    Scheduled Pinned Locked Moved General Questions
    28 Posts 2 Posters 3.1k 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.
    • David HealeyD
      David Healey @bendurso
      last edited by

      Try this 50219bb2-13bc-4384-b82e-99ca43e5068a-image.png @bendurso

      Free HISE Bootcamp Full Course for beginners.
      YouTube Channel - Public HISE tutorials
      My Patreon - HISE tutorials

      bendursoB 1 Reply Last reply Reply Quote 0
      • bendursoB
        bendurso @David Healey
        last edited by

        @d-healey Thanks, it should be like this?

        local wildcardReference = expHandler.getCurrentExpansion().getWildcardReference("UserPresets/" + "myPreset.preset");
        
        Engine.loadUserPreset(wildcardReference);
        

        This relative path it's not working. And I'm not sure how to convert this into an object

        David HealeyD 1 Reply Last reply Reply Quote 0
        • David HealeyD
          David Healey @bendurso
          last edited by

          @bendurso Do you only have one column in your preset browser?

          Free HISE Bootcamp Full Course for beginners.
          YouTube Channel - Public HISE tutorials
          My Patreon - HISE tutorials

          bendursoB 1 Reply Last reply Reply Quote 0
          • bendursoB
            bendurso @David Healey
            last edited by

            @d-healey Oh yeah I forget the folder, but still is returning a wrong full path with this.

            The console returns:
            User preset /Volumes/Ben/Hise Projects/Raizes Player/UserPresets/{EXP::Auralis}UserPresets/Category 3/Native Preset.preset doesn't exist

            Because it adds "UserPresets" before the {EXP::Auralis}

            David HealeyD 1 Reply Last reply Reply Quote 0
            • David HealeyD
              David Healey @bendurso
              last edited by

              @bendurso What happens if you don't include "UserPresets/" in your relative path?

              Free HISE Bootcamp Full Course for beginners.
              YouTube Channel - Public HISE tutorials
              My Patreon - HISE tutorials

              bendursoB 1 Reply Last reply Reply Quote 0
              • bendursoB
                bendurso @David Healey
                last edited by

                @d-healey It returns this:

                User preset /Volumes/Ben/Hise Projects/Raizes Player/UserPresets/{EXP::Auralis}Category 3/Native Preset.preset doesn't exist

                If I print this:

                local wildcardReference = expHandler.getCurrentExpansion().getWildcardReference("UserPresets/Category 3/Native Preset.preset");
                
                Console.print(wildcardReference);
                

                It returns the correct path: {EXP::Auralis}Category 3/Native Preset.preset

                But.. after inserting it on Engine.loadUserPreset, it adds the "User Preset" plugin full path (non expansion) at the beginning.

                David HealeyD 1 Reply Last reply Reply Quote 1
                • David HealeyD
                  David Healey @bendurso
                  last edited by

                  @bendurso I wonder if it only works in the compiled plugin

                  Free HISE Bootcamp Full Course for beginners.
                  YouTube Channel - Public HISE tutorials
                  My Patreon - HISE tutorials

                  David HealeyD 1 Reply Last reply Reply Quote 0
                  • David HealeyD
                    David Healey @David Healey
                    last edited by

                    @bendurso I just found an example of where I used it, might help..

                    https://codeberg.org/LibreWave/RhapsodyBoilerplate/src/branch/main/includes/Expansions.js#L63

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

                    bendursoB 1 Reply Last reply Reply Quote 1
                    • bendursoB
                      bendurso @David Healey
                      last edited by

                      @d-healey Thanks, I'm going to try... today I spent all day trying to make a custom preset browser with viewports (I almost got it), but I can't load the presets hehe.

                      David HealeyD 1 Reply Last reply Reply Quote 0
                      • David HealeyD
                        David Healey @bendurso
                        last edited by

                        @bendurso said in Engine.loadUserPreset for expansions?:

                        I spent all day trying to make a custom preset browser with viewports

                        Why?

                        Free HISE Bootcamp Full Course for beginners.
                        YouTube Channel - Public HISE tutorials
                        My Patreon - HISE tutorials

                        bendursoB 1 Reply Last reply Reply Quote 0
                        • bendursoB
                          bendurso @David Healey
                          last edited by

                          @d-healey Because the searchbar don't work on expansions, and the button bounds "Add, Rename, Delete" can't be increased. Mainly for these two things.

                          1 Reply Last reply Reply Quote 0
                          • bendursoB
                            bendurso
                            last edited by

                            @Christoph-Hart Does Engine.loadUserPreset works for expansion presets? How should be the proper way to reference the path? Thanks :)

                            David HealeyD 1 Reply Last reply Reply Quote 0
                            • David HealeyD
                              David Healey @bendurso
                              last edited by

                              @bendurso Did you try using {EXP::Auralis}Category 3/Native Preset.preset directly?

                              Free HISE Bootcamp Full Course for beginners.
                              YouTube Channel - Public HISE tutorials
                              My Patreon - HISE tutorials

                              bendursoB 1 Reply Last reply Reply Quote 0
                              • bendursoB
                                bendurso @David Healey
                                last edited by

                                @d-healey Yeap, doesnt work.

                                When you use a string path it adds "Plugin/User Presets" + the string path. (that's the error log of the console)

                                like this:
                                Plugin/User Presets/{EXP::Auralis}Category 3/Native Preset.preset

                                bendursoB David HealeyD 2 Replies Last reply Reply Quote 0
                                • bendursoB
                                  bendurso @bendurso
                                  last edited by bendurso

                                  @bendurso The only way it doesnt return an error is if I use a object full path to the preset with FileSystem.fromAboslutePath(), it starts loading a bit and Hise crashes.

                                  1 Reply Last reply Reply Quote 0
                                  • David HealeyD
                                    David Healey @bendurso
                                    last edited by

                                    @bendurso said in Engine.loadUserPreset for expansions?:

                                    When you use a string path it adds "Plugin/User Presets" + the string path.

                                    You mean Engine.loadUserPreset("{EXP::Auralis}Category 3/Native Preset.preset");?

                                    Free HISE Bootcamp Full Course for beginners.
                                    YouTube Channel - Public HISE tutorials
                                    My Patreon - HISE tutorials

                                    bendursoB 1 Reply Last reply Reply Quote 0
                                    • bendursoB
                                      bendurso @David Healey
                                      last edited by bendurso

                                      @d-healey Yeap, if you use that, the console returns:

                                      User preset /Volumes/Ben/Hise Projects/Raizes Player/UserPresets/{EXP::Auralis}Category 3/Native Preset.preset doesn't exist
                                      

                                      It directly searches inside the main plugin User Presets folder, so it's impossible to make it work.

                                      David HealeyD 1 Reply Last reply Reply Quote 0
                                      • David HealeyD
                                        David Healey @bendurso
                                        last edited by David Healey

                                        @bendurso You said using a File object causes a crash. What about instead of using fromAbsolutePath you piece the path together, something like this:

                                        local rootFolder = Expansion.getRootFolder(); // I can't remember the proper function name
                                        local preset = rootFolder.createDirectory("UserPresets").getChildFile("myPreset.preset");
                                        

                                        Free HISE Bootcamp Full Course for beginners.
                                        YouTube Channel - Public HISE tutorials
                                        My Patreon - HISE tutorials

                                        bendursoB 1 Reply Last reply Reply Quote 0
                                        • bendursoB
                                          bendurso @David Healey
                                          last edited by bendurso

                                          @d-healey I had also previously tried building the entire path that way and it doesn't work either :( I mean, it doesn't throw an error but it crashes.

                                          I just tried in the compiled plugin, and it also crashes :(

                                          David HealeyD 2 Replies Last reply Reply Quote 0
                                          • David HealeyD
                                            David Healey @bendurso
                                            last edited by

                                            @bendurso I'll do some tests

                                            Free HISE Bootcamp Full Course for beginners.
                                            YouTube Channel - Public HISE tutorials
                                            My Patreon - HISE tutorials

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

                                            26

                                            Online

                                            2.1k

                                            Users

                                            13.0k

                                            Topics

                                            113.2k

                                            Posts