Hi, direct to the matter: my idea is to make a live bridge between Krita and Blender for texture painting, more specific for hand-painting workflow.
What I mean with ‘live’?
While painting in Krita you should see a brush gizmo being projected in Blender model indicating its position in 3d space. Also refreshing textures to see the changes on Krita reflected in your 3D model.
About refreshing texture for live linking:
- Auto refresh at the end of the stroke.
- Manual refresh when saving on Krita.
- Use a proper timer to auto-refresh.
- So much impact and maybe lag at the end (or in-between for timer case) of each stroke --> Use threading may solve this(?
- What about quick followed strokes? --> Maybe use a QTimer and listen to mouse events to avoid overload(?
- So big texture maps may need too much time to export/import --> Use a quick low res version for preview? (Could be an option).
- Ideal: automatic way, but so problematic and can have serious performance issues at the end.
- Efficient: manual way, but not so practical at the end as it lose all live thing.
What is minimum needed - in general - to make it possible:
- Blender Addon and Krita Plugin. Set the bridge between them.
- (Krita) Read mouse relative position over canvas. This will be helpful to sample the position on Blender and then “project” it over the model.
- Krita sends mouse position to Blender each x time. And refresh signal when export/save is complete so Blender can refresh gizmo position and texture image.
So in instance I need to know if it’s possible to access relative mouse position over canvas or at least absolute mouse position over viewport area along with canvas size/ratio as well as canvas zoom and position/offset.