Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix empty select template text #36

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

samhitech
Copy link

This bug results in 'list index out of range' error when using the script.

  • The select template text had no items to select although several or one text+ elements where in the media pool.

Now fixed enjoy!

This bug results in 'list index out of range' error when using the script.
- The select template text had no items to select although several or one text+ elements where in the media pool.

Now fixed enjoy!
@gab12
Copy link

gab12 commented May 5, 2024

Good morning,

Allow me to point out that the problem is not resolved.
We agree that the problem is these 2 lines:

       itemType = item.GetClipProperty()["Type"]
       if itemType == "Generator" or itemType == "Fusion Title":

Unfortunately the itemType is language sensitive in Davinci Resolve. If you are in French, item.GetClipProperty()["Type"] for example, does not return "Generator" but "Générateur". And therefore regenerates the bug.
So as soon as we are not in English on Davinci, the “List Index Out of Range” problem will come back.
I hope I've helped you !

The clip type changes with the language preset, thus I have adjusted the script to take that into consideration. 

Tested with:
- Version 19.0B build 20
- Version 19.0B build 25
@samhitech
Copy link
Author

Good morning,

Thanks, that was helpful!
I have tested this with the new beta version and the update (v19.0B).
I think 'Generator' is for older versions.
I added this to account for all languages supported by DR.
One could add 'Générateur' or whatever is the equivalent in their language to the CLIP_TYPES_LOCALE list.

CLIP_TYPES_LOCALE = [
   'Título – Fusion', # spanish
   "Título Fusion", # portuguese
   "Generator", # en-us?
   "Fusion Title", # English
   "Titre Fusion", # French
   "Титры на стр. Fusion", # Russian
   "Fusion Titel", # German
   "Titolo Fusion", # Italian
   "Fusionタイトル", # Japanese
   "Fusion标题", # Chinese
   "퓨전 타이틀", # Korean
   "Tiêu đề Fusion", # Vietnamese
   "Fusion Titles", # Thai
]

def recursiveSearch(folder):
   items = folder.GetClipList()
   for item in items:
      itemType = item.GetClipProperty()["Type"]
      if itemType in CLIP_TYPES_LOCALE:

@bpatt12
Copy link

bpatt12 commented May 10, 2024

Hey Sam, I am a complete noob and don't know what to do to fix the issue. I am getting the same error. I apologize for not knowing this, but how do I implement this solution to my davinci/auto-subs problem? @samhitech

@samhitech
Copy link
Author

Hey @bpatt12, no worries.

Replace the script auto-subs.py located in:
C:\ProgramData\Blackmagic Design\DaVinci Resolve\Fusion\Scripts\Utility\

With the one downloaded from here:
https://github.com/samhitech/auto-subs/blob/main/auto-subs.py

This should solve the problem for DR v19.

@LuukMo
Copy link

LuukMo commented May 16, 2024

Hey @bpatt12, no worries.

Replace the script auto-subs.py located in: C:\ProgramData\Blackmagic Design\DaVinci Resolve\Fusion\Scripts\Utility\

With the one downloaded from here: https://github.com/samhitech/auto-subs/blob/main/auto-subs.py

This should solve the problem for DR v19.

Thanks so much, this worked for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants