Closed NathanLovato closed 5 years ago
Tell me if you have any questions. If you don't already, you can use this command line tool to checkout to these changes and test them on your computer: https://github.com/github/hub/
hub checkout https://github.com/snuq/VSEQF/pull/2
Right now the PR mostly adds code, but if you could untangle your fade functions from the code at the end it should remove lines on top of making the code easier to maintain.
I didn't remove the current fade functions as they're used in several places throughout the code, to detect fades. I just reworked Fades add and fades clear.
The fades and fades_set functions have many responsibilities and are pretty entangled with the codebase. I'd recommend splitting them to have a function dedicated to detecting fades. You can use the functions I added for other operations. And with that, you should have both simpler and more flexible code.
I tested that the features work in Blender. I'll let you check that the logic works for you. I tried to preserve the existing functionality in VSEQF but as it's not my addon and I don't know every corner case you might have covered, I can't guarantee I didn't miss anything.
There's still some refactoring work to do to remove your
fades
andset_fades
functions, which I'll leave up to you (I've got a long to-do list of my own as you can imagine 😅)In any case here are some tricks I use to keep the code flexible: