canI import parts of one HISE project into another?
-
Put the code into its own namespace, put that in an external file, and then import that file into the new project. Either make a copy of the file in the new project's scripts folder or use the global scripts folder.
-
@d-healey I am not following. Put it into its own namespace?
-
@gryphonsegg Namespaces are a structural tool in HISE script. They allow you to organise your code into easy to manage chunks. They also provide some scope restrictions so data doesn't leak between different parts of your code, allowing you to have two variables with the same name for example.
I covered it a bit in my Christmas video last year.
-
@gryphonsegg If you want to copy all your components (Knob, Sliders, panel etc) just copy the old project UI things from XmlPresetBackups folder.
e.g.
Copy TestPianoDesktop.xml scripts from
YourProjectName\XmlPresetBackups\TestPianoUIDataand TestPiano.xml script
into your new Project XmlPresetBackups folder. -
or if you want to copy different Ui components to different parts of your new project:
- In the olde project move the set of UI components you want into a single panel
- select the panel and press "J" - this will show you the json as text... copy that text
- In your new project open a new panel (where you want these ui widgets) and press "j" again - paste in your copied JSON...
-
Is there a way to do this with Scriptnode? I see there is an "Import" option, but how?
-
@trillbilly I have tried quickly the import button but it didn't work with a scriptnode snippet but you can do it like this :
In the graph, right click on the whole network top-bar and click on the "snowflake" to 'export as base64' :
Then in an empty graph, open the 'create node' popup and paste what you've exported :
-
@Matt_SF ..or just copy the network from the folder...
-
@Lindon That only works if you want to copy the entire network rather than individual nodes
-
@d-healey of course.....but I've never wanted to coy a single node that I recall - but hey maybe...
-
@Lindon Ya, This worked better in the end