Open kguyaux opened 4 years ago
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:
What does a command look like?
This interprocess communication sounds a lot like how pyblish-qml works.
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")
@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.
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..
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
..and I forked avalon-core, and added the tvpaint-branch https://github.com/kguyaux/core/tree/tvpaint
@kguyaux great news. We'll have a look at the code with pype.club team to see if we could help somehow.
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:
Now proceeding with Load & Creation-functionality, to be continued...