Python script tvLoadProject and missing sound popup
Python script tvLoadProject and missing sound popup
Hello,
I'm scripting an export of a tvpp files as PNG, and for a tvvp file, I have a
missing sound dependences popup window cf. attachement.
How can I get rid of it in my script?
I'm using "tv_LoadProject silent 1" for now.
Thanks in advance !
Maelvon
I'm scripting an export of a tvpp files as PNG, and for a tvvp file, I have a
missing sound dependences popup window cf. attachement.
How can I get rid of it in my script?
I'm using "tv_LoadProject silent 1" for now.
Thanks in advance !
Maelvon
- Attachments
-
- tvpainttv_LoadProject.PNG (12.67 KiB) Viewed 3025 times
Re: Python script tvLoadProject and missing sound popup
Theoretically, that should do the trick. Do not consider it as a "setting" command, it's a parameter that should be used when you actually load the project.
Here's an example that worked for me, on a project with missing dependencies :
Code: Select all
tv_loadproject "/home/xavier/content/A/Project.tvpp" silent 1
What's the behaviour of your TVPaint ? does it seem to freeze ?
You may wait a little bit until the next release, that should fix it.
Re: Python script tvLoadProject and missing sound popup
Actually no, if you saw the popup as you explained then I'd think the silent parameter wasn't used.
Re: Python script tvLoadProject and missing sound popup
Hi Xavier,
The Tvpaint with "tv_LoadProject C:\Myprojectpath\mytpv.tvpp silent 1" hangs as you say (freeze at 90%) with the file which miss the sound file (bar.tvpp).
The script send to os.system:
I'm on the version 11.5.3-64 [1359wo]
Too bad I came across the bug!
The Tvpaint with "tv_LoadProject C:\Myprojectpath\mytpv.tvpp silent 1" hangs as you say (freeze at 90%) with the file which miss the sound file (bar.tvpp).
The script send to os.system:
Code: Select all
C:\"Program Files\TVPaint Developpement\TVPaint Animation 11.5 Pro (64bits)\TVPaint Animation 11.5 Pro (64bits).exe" "cmd=tv_LoadProject C:\Users\foo\Documents\bar.tvpp silent 1" "cmd=tv_SaveMode PNG b32" "cmd=tv_Background NONE" "cmd=tv_AlphaSaveMode NoPreMultiply" "cmd=tv_SaveSequence C:\Users\foo\Documents\bar_001.PNG" "cmd=tv_quit"
Too bad I came across the bug!
Re: Python script tvLoadProject and missing sound popup
Is there any workarround?
Can I edit/remove the links of all the sound files before exporting the png files?
I'm trying to find a quick solution, cannot really wait for the next TVP version, unless it's scheduled to come out tomorrow!
Can I edit/remove the links of all the sound files before exporting the png files?
I'm trying to find a quick solution, cannot really wait for the next TVP version, unless it's scheduled to come out tomorrow!
Re: Python script tvLoadProject and missing sound popup
The bug may occur on every project file with missing dependencies (ie: video that was not preloaded, or sound).
So yes, you can try to open the project in TVPaint : provided you don't click on "ignore all dependencies", TVPaint won't freeze.
Regarding the audio files, you can remove the ones that are missing (or all) using the sound panel.
Regarding the missing non-preloaded videos (if any), you will have to provide an other location I guess... I know no option to remove the references from TVPaint.
Re: Python script tvLoadProject and missing sound popup
Thanks Xavier,
My problem is that I want to export a lot of tvpp files, and cannot check manually, one by one, for missing sounds or videos, and I'll want just to pass this blocking popup in my script!
I've not checked if we can access to the sound panel in command line, is it possible, and how? Like removing all linked sound before exporting to Png.
My problem is that I want to export a lot of tvpp files, and cannot check manually, one by one, for missing sounds or videos, and I'll want just to pass this blocking popup in my script!
I've not checked if we can access to the sound panel in command line, is it possible, and how? Like removing all linked sound before exporting to Png.
Re: Python script tvLoadProject and missing sound popup
There's a complete reference here : https://tvpaint.com/doc/tvp11/files/les ... mmands.txtMaelvon wrote: ↑29 Aug 2022, 13:33 Thanks Xavier,
My problem is that I want to export a lot of tvpp files, and cannot check manually, one by one, for missing sounds or videos, and I'll want just to pass this blocking popup in my script!
I've not checked if we can access to the sound panel in command line, is it possible, and how? Like removing all linked sound before exporting to Png.
You may want to use tv_soundprojectremove :
Code: Select all
tv_soundprojectremove [iTrackIndex]
[DESCRIPTION]
Remove a sound track
[PARAMETERS]
iTrackIndex int The track index (if 0 or not set, remove the first one)
[RETURN]
0 int Track removed
[ERROR]
-2 int Invalid track index
Code: Select all
[EXAMPLE]
// Remove all sounds
run=1
WHILE run
tv_SoundProjectRemove 0
IF result<0
run=0
END
END
--------
Re: Python script tvLoadProject and missing sound popup
In addition, instead of "cmd=" you may put everything in a script and then use
https://www.tvpaint.com/doc/tvp11/index ... ts&lang=en
Code: Select all
TVPaint.exe script="c:\absolute\path\to\script"
Re: Python script tvLoadProject and missing sound popup
Ok, but there is a certain chicken and egg question here.
As I cannot open with a batch script the files with a missing sound file, while the popup hang the process while opening them.
As I want to open a list of tvpp files, export still png from them. The script either show the "missing sound dependencies" popup, and the script hangs here, or if I set the "silent 1" it also hangs.
So I cannot unlink the soud with the Georges script, as I cannot open open the file first.
The idea of removing the sound file with a script is not working here!
I'm stuck with with "silent 1" bug, and don't see another alternative here, another idea? Wait for the next release!!?
As I cannot open with a batch script the files with a missing sound file, while the popup hang the process while opening them.
As I want to open a list of tvpp files, export still png from them. The script either show the "missing sound dependencies" popup, and the script hangs here, or if I set the "silent 1" it also hangs.
So I cannot unlink the soud with the Georges script, as I cannot open open the file first.
The idea of removing the sound file with a script is not working here!
I'm stuck with with "silent 1" bug, and don't see another alternative here, another idea? Wait for the next release!!?
Re: Python script tvLoadProject and missing sound popup
Well TVPaint is not meant to do what you're trying to. There will be a dedicated tool soon, but in the meantime we're running out of options !