brunchstudio / pytvpaint

Python scripting for TVPaint
https://brunchstudio.github.io/pytvpaint/
MIT License
18 stars 2 forks source link

Does save_audio_dependencies command work? #14

Closed AdemirPasalicSC closed 1 month ago

AdemirPasalicSC commented 1 month ago

https://github.com/brunchstudio/pytvpaint/blob/a14574078b951602acd783b3f8e516e9a1560e33/pytvpaint/project.py#L708-L711

I was thinking that it would do the equivalent to Project -> Dependencies -> Embed audio dependencies, now

Any ideas?

I'm using TVPaint Animation 11 Pro WIBU (11.5.3-64 bits)

johhnry commented 1 month ago

Hi @AdemirPasalicSC,

Their documentation is lacking for information about this specific George function. I don't have access to TVPaint right now, maybe @rlahmidi can help you on that one!

I hope that PyTVPaint is working great for you anyway ;)

rlahmidi commented 1 month ago

hey @AdemirPasalicSC, I just tested this and can confirm that it's not working. But the issue seems to be stemming from tvpaint. The audio dependencies are not saved even when calling the function tv_ProjectSaveAudioDependencies directly in george from tvpaint, tv_ProjectSaveVideoDependencies doesn't seem to work either. They both return a -1 code which in TVPaint usually means an error occured, but as @johhnry said, there is no documentation for the function or it's return codes in tvpaint, this is all they provide :


tv_projectsaveaudiodependencies

[DESCRIPTION]

------------------------------------------------------------------------------------------------------

tv_projectsavevideodependencies

[DESCRIPTION]

------------------------------------------------------------------------------------------------------

You can fix or at least avoid the issue with tv_ProjectSaveVideoDependencies by using clip.load_media and setting the preload attribute to true, but I see no fix for tv_ProjectSaveAudioDependencies.

Since this is not an issue with pytvpaint, I would suggest reaching out directly to the TVPaint support team to fix this. In the meantime, I think i'll remove the functions from our API and add a note in the documentation

AdemirPasalicSC commented 1 month ago

Hi @rlahmidi, I did expect this was the case, but I had a small glimmer of hope. Thanks for testing it and confirming that both george commands return a -1 code directly in george from TVPaint. I'll reach out to the TVPaint support team and hopefully it will get fixed in a future patch.

AdemirPasalicSC commented 1 month ago

Hi @johhnry and @rlahmidi,

I got word back from TVPaint.

There's something missing in the documentation for this one, you need to get the project's ID first, and set it as parameter to the command. Here's how you should use it:

tv_ProjectCurrentID
projectID = result
tv_ProjectSaveAudioDependencies projectID true

We'll update the documentation this week.

I've asked them if they could update the documentation for tv_ProjectSaveVideoDependencies as well.

rlahmidi commented 1 month ago

that's great to know, i'll test this and update the code on our side as well !

rlahmidi commented 1 month ago

Added fix in new version 1.0.2 ( @AdemirPasalicSC ) as usual functions are viewable in the doc (links below) with their new arguments, took a little bit of testing to get the correct arguments for tv_ProjectSaveVideoDependencies 😅

Goerge Command : link

API Command : link

AdemirPasalicSC commented 1 month ago

@rlahmidi thanks and good job on the video dependencies! 🥇 The official TVPaint documentation is still empty, so consider this the most updated documentation on save dependencies :D Hope it will help others encountering this issue 👍