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

TVPaint integration #526

Open
kguyaux opened this issue Feb 10, 2020 · 7 comments
Open

TVPaint integration #526

kguyaux opened this issue Feb 10, 2020 · 7 comments

Comments

@kguyaux
Copy link

kguyaux commented Feb 10, 2020

I have worked on the TVPaint-integration. So far I have the workfiles-tool working.
It took me a while to find an approach that was stable and not too difficult :-).
The working is based on a python-wrapper around the tvpaint-app that uses the socketserver-module(py).
With tvp-plugins that are made with the TVPaint-SDK, it is possible to talk to the pythonwrapper.

The wrapper starts tvpaint in a subprocess and keeps listening for commands(like "open the workfile gui"), until the shutdown command is given from tvpaint when it closes..
The whole module(called "python-tvpaint") that contains the wrapper/launcher, also has functions to talk back to tvpaint. (but for now, only when the given plugin is listening..)
It is possible to keep tvpaint accepting commands in a separate thread, but this can crash tvpaint very easily. I have to explore this some more..

Demo of using the workfiles-tool from within TVPaint:
avalon_tvpaint_workfiles_demo2

Now proceeding with Load & Creation-functionality,
to be continued...

@tokejepsen
Copy link
Collaborator

Exciting stuff!

Took me a couple of views to notice the Avalon panel from where you launched the workfiles app.

So to clarify the communication workflow:

  • Avalon Launcher launches a Python subprocess
  • Python subprocess launches TVPaint
  • Python subprocess listens with stdout for commands from TVPaint

What does a command look like?

This interprocess communication sounds a lot like how pyblish-qml works.

@kguyaux
Copy link
Author

kguyaux commented Feb 13, 2020

Hi Toke,

all communication goes via sockets. I started using this method because I wanted the communication to go both ways.
Also TVPaint can now receive errormessages from python side.. if necessary.

A command, for now, is just a simple string that gets compared by the pythonside or tvpaint-side,
like "OPEN workfiles", or "OPEN creator"..
.. after that, for example: Avalons workio-module, can then use the a TVP-wrapper-method like 'execTVPcommand' as follows:

import pytvpaint.functions as tvp tvp.execTVPcommand("tv_saveProject /path/to/savinglocation/test.tvpp")

@mkolar
Copy link
Member

mkolar commented Apr 30, 2020

@kguyaux have you gotten anywhere further with the TV Paint integration? We'll be interested in implementing TV in avalon very soon probably, though we could put our heads together and pool resources to push it a bit.

@kguyaux
Copy link
Author

kguyaux commented May 4, 2020

Hi @mkolar,
I did not have enough time to work on it, unfortunately ..and the current crisis is not helping either :-) I have put this on my list and will contact you as soon as when I have put my head back into it..

@kguyaux
Copy link
Author

kguyaux commented Jun 4, 2020

I did not have time to work on the tvpaint-integration, But I did manage to upload the tvpaint-part to github:
https://github.com/kguyaux/tvpaint-avalon
I'll now work on publishing the avalon-core part..
..to be continued

@kguyaux
Copy link
Author

kguyaux commented Jun 4, 2020

..and I forked avalon-core, and added the tvpaint-branch
https://github.com/kguyaux/core/tree/tvpaint

@mkolar
Copy link
Member

mkolar commented Jun 7, 2020

@kguyaux great news. We'll have a look at the code with pype.club team to see if we could help somehow.

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

No branches or pull requests

3 participants