Python API - delete/remove clips OR replace clips using flame.import_clips

Python API - delete/remove clips OR replace clips using flame.import_clips

stefanLDEBT
Explorer Explorer
1,116 Views
2 Replies
Message 1 of 3

Python API - delete/remove clips OR replace clips using flame.import_clips

stefanLDEBT
Explorer
Explorer

I'm looking for a solution to delete/remove clips with the python api. Is this possible?

 

I need this function for a clip-file import script which creates the clip-files and imports them into the media library. Ideally I want to replace existing files with the same name, but if I import the files using the flame.import_clips function, they only get added and import_clips does not seem to have the option "add" or "replace" if the clip already exists.

 

Without this possibility I need to delete the clips which already exist to avoid having duplicates. 

 

Using the wiretap api does not make sense in this case because as far as I know it can not work on open projects (is this still valid?)

 

thanks for your help!

Stefan

 

0 Likes
Accepted solutions (1)
1,117 Views
2 Replies
Replies (2)
Message 2 of 3

fred.warren
Autodesk
Autodesk
Accepted solution

Hello @stefanLDEBT,

 

It is currently not possible to select if a clip will be added or replaced when you use the flame.media_panel.move() and flame.media_panel.copy() functions. There is a request about this over at flamefeedback.autodesk.com. You can add your vote to: FI-02371

 

As for deleting a clip, this can be done using the flame.delete() function by passing the clip itself as the argument. For example: flame.delete(<PyClip>)

 

Please accept this as a solution if you feel your question has been answered.

 

fred

 

 


Frédéric Warren
User Experience Designer
0 Likes
Message 3 of 3

stefanLDEBT
Explorer
Explorer

Thank you Fred,

 

"You can add your vote to: FI-02371"

done 😉 It seems to be "accepted" as major priority, so I guess it's going to be in a future version soon. Thanks! 

 

Meanwhile I work around it using the delete function - I totally missed this in the docs. 

 

best,

Stefan

 

 

0 Likes