Flame user of 10+ yrs but new to the forum and it’s great what you’re doing here!
Total newbie with python scripts and I’m just starting with some real basics, like creating a bespoke set of libraries and subfolders in a fresh project. I think I’ve nailed it (thanks to @andymilkis and @fredwarren for Logik Live Ep #07)… apart from deleting the automatically-generated Default Library. Any pointers please?
The default library could probably be at any index. I would either iterate over all libraries to find it or use the build in function from the flame module to find it.
Find by iterating over all libs:
for lib in flame.project.current_project.current_workspace.libraries:
if lib.name.get_value() == "Default Library":
flame.delete(lib)
Find by using the flame module’s function:
for lib in flame.find_by_name("Default Library"):
# make sure we are really dealing with a lib and not any other item that is just called "Default Library"
if isinstance(lib, flame.PyLibrary):
flame.delete(lib)
Thanks both. Out of the 3 options I could only get the iteration over all libs working, but that’s done it!
When I get more time I’ll work out how to make the other options work. It’s pretty heavy going when you’re this new to python.
Thanks again
Hi all,
I have a similar request, I’m hoping to get the library name that contains the sequence I’m exporting to use in the file path.
Tried all variations on current library but no joy.
Any ideas?
If the sequence is on your current desk and you want to find the library where it has also been saved you probably need to crawl all libraries to find the sequence. Have a look at this code snippet which shows you how to collect clips from libraries with an unknown level of subfolders:
Instead of just adding every clip (clips.append(clip)) you would add a check if the clip name equals your clip name.
Thanks for you help Claus,
The clip will always be in a library.
Had a look at the link and can return lots of sequence info but don’t see any way to get which library its saved in.