Created
February 26, 2026 02:04
-
-
Save barezina/ecdb29f005fb1712901189335249ca98 to your computer and use it in GitHub Desktop.
davinci resolve dates >> comments (source tape bug)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # use this code for the date created column | |
| from datetime import datetime | |
| pm = resolve.GetProjectManager() | |
| proj = pm.GetCurrentProject() | |
| mp = proj.GetMediaPool() | |
| bin = mp.GetCurrentFolder() | |
| print('in bin ', bin.GetName()) | |
| clips = bin.GetClips() | |
| for i in clips: | |
| print(clips[i].GetClipProperty('Date Created')) | |
| propDate = clips[i].GetClipProperty('Date Created') | |
| date_format = "%a %b %d %Y %H:%M:%S" | |
| datetime_obj = datetime.strptime(propDate, date_format) | |
| unix_timestamp = str(int(datetime_obj.timestamp())) | |
| print("Unix Timestamp:", unix_timestamp) | |
| clips[i].SetClipProperty("Comments", unix_timestamp) | |
| # use this code for the date modified column | |
| from datetime import datetime | |
| pm = resolve.GetProjectManager() | |
| proj = pm.GetCurrentProject() | |
| mp = proj.GetMediaPool() | |
| bin = mp.GetCurrentFolder() | |
| print('in bin ', bin.GetName()) | |
| clips = bin.GetClips() | |
| for i in clips: | |
| print(clips[i].GetClipProperty('Date Modified')) | |
| propDate = clips[i].GetClipProperty('Date Modified') | |
| date_format = "%a %b %d %H:%M:%S %Y" | |
| datetime_obj = datetime.strptime(propDate, date_format) | |
| unix_timestamp = str(int(datetime_obj.timestamp())) | |
| print("Unix Timestamp:", unix_timestamp) | |
| clips[i].SetClipProperty("Comments", unix_timestamp) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment