Hey, everybody!
I just wonder, can I create folders for assets or events using scripts?
Hey, everybody!
I just wonder, can I create folders for assets or events using scripts?
Creating a folder:
var folder = studio.project.create('EventFolder');
folder.name = "Hello World";
Assigning a folder to an event:
event.folder = folder;
For assets you can set the path of a ManagedObject:AudioFile by calling AudioFile.setAssetPath, it will automatically create folders based on the path:
AudioFile.setAssetPath(“folder/subfolder/test.wav”);
Thanks! It works
I have one more question. How to change a path for the folder and event in the project using script?
I figured out. Thanks
var folder = studio.project.create('EventFolder');
var subfolder = studio.project.create('EventFolder');
folder.name = "Folder";
subfolder.name = "Sub Folder";
subfolder.folder = folder;