[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: Contributing our batch sprites export plugin - need pointers
From:       Iván_Yossi <ghevan () gmail ! com>
Date:       2019-07-22 4:28:34
Message-ID: 3de25a23-9e86-4c8f-b64f-fd8e995dfa9a () Spark
[Download RAW message or body]

Hi! I can answer number 3

I was working on reloading the python plugins at runtime, but I diverged from it and \
have not being able to finish it. so as it stands today, there is no way to reload \
Python plugins without restarting krita at the moment.

-IvanYossi-
El 21 de jul de 2019 9:34 -0500, Nathan Lovato <nathan@gdquest.com>, escribió:
> Hi,
> 
> I'm Nathan, also known as gdquest on the web. I make Krita tutorials
> from time to time:
> https://www.youtube.com/watch?v=qjUOdxP_L_s&list=PLhqJJNjsQ7KE3FLHIE31UgmLdcqsZfXTw
> 
> My teammate Razvan made an add-on to batch export layers flexibly. The
> tool can save lots of trimmed images for you, produce a clean folder
> structure, and scale the images on export. It uses metadata in the layer
> names.
> 
> We took inspiration from the export tools you can find in Sketch,
> affinity designer, and photoshop, and designed a tool adapted to Krita.
> 
> Here's the GitHub repository: https://github.com/GDquest/GDquest-art-tools/
> 
> Flexible batch export is something that we need as game developers, and
> that can also be of use to people making comics, doing graphic design,
> Web   design.
> 
> Thanks to Larpon, a contributor, you can also export your document for
> the Blender cut-out animation tools add-on, which allows you to do
> modular 2D animation for games.
> 
> I think it can be useful to many users and that's why we would like to
> contribute it so that it ships with Krita.
> 
> THE PROBLEM
> =============
> 
> The code currently relies on the Pillow Python imaging library. The user
> needs to install a local version of Pillow in the add-on's directory
> that matches their operating system. Right now, it's a +/- manual process.
> 
> We use Pillow for a few reasons:
> 
> 1. Resizing/scaling the image via Python starts an asynchronous process,
> but the function returns immediately. We couldn't find a way to wait for
> the scale operation to finish before Krita calls Node.save() and exports
> the image. The only way we could solve this so far was using Pillow.
> 2. Pillow is fast. Using it makes export 2+x faster compared to using
> Krita's built-in functions.
> 
> As a bonus, it's a lot easier to manipulate the image with Pillow than
> using Krita's API.
> 
> It's technically possible to automate the installation of the
> dependency, to have the right version of pillow bundled with Krita upon
> building the program.
> 
> A FEW QUESTIONS
> 
> About the add-on:
> 
> 1. Is there a reliable way to transform the layer from Python with
> Krita, and wait for it to finish before saving the file?   If so we could
> remove Pillow as a dependency. (code contributions welcome!)
> 2. Would having pillow as a dependency be okay if we contributed the
> add-on? The library itself is sizeable, and it takes a good 6 megabytes
> on disk. For a single add-on, I bet it's too big but never hurts to ask. 🙂
> 
> Python add-on development with Krita:
> 
> 3. Is there a way to reload Python plugins without closing and
> restarting Krita? Plugin dev is quite slow because of that right now.
> 
> Thank you for your time,
> Nathan
> 


[Attachment #3 (text/html)]

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection">
<div dir="auto">Hi! I can answer number 3
<div dir="auto"><br /></div>
<div dir="auto">I was working on reloading the python plugins at runtime, but I \
diverged from it and have not being able to finish it. so as it stands today, there \
is no way to reload Python plugins without restarting krita at the moment.</div> \
</div> </div>
<div name="messageSignatureSection"><br />
<div class="matchFont">-IvanYossi-</div>
</div>
<div name="messageReplySection">El 21 de jul de 2019 9:34 -0500, Nathan Lovato \
&lt;nathan@gdquest.com&gt;, escribió:<br /> <blockquote type="cite" \
class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin \
solid #1abc9c;">Hi,<br /> <br />
I'm Nathan, also known as gdquest on the web. I make Krita tutorials<br />
from time to time:<br />
https://www.youtube.com/watch?v=qjUOdxP_L_s&amp;list=PLhqJJNjsQ7KE3FLHIE31UgmLdcqsZfXTw<br \
/> <br />
My teammate Razvan made an add-on to batch export layers flexibly. The<br />
tool can save lots of trimmed images for you, produce a clean folder<br />
structure, and scale the images on export. It uses metadata in the layer<br />
names.<br />
<br />
We took inspiration from the export tools you can find in Sketch,<br />
affinity designer, and photoshop, and designed a tool adapted to Krita.<br />
<br />
Here's the GitHub repository: https://github.com/GDquest/GDquest-art-tools/<br />
<br />
Flexible batch export is something that we need as game developers, and<br />
that can also be of use to people making comics, doing graphic design,<br />
Web&#160; design.<br />
<br />
Thanks to Larpon, a contributor, you can also export your document for<br />
the Blender cut-out animation tools add-on, which allows you to do<br />
modular 2D animation for games.<br />
<br />
I think it can be useful to many users and that's why we would like to<br />
contribute it so that it ships with Krita.<br />
<br />
THE PROBLEM<br />
=============<br />
<br />
The code currently relies on the Pillow Python imaging library. The user<br />
needs to install a local version of Pillow in the add-on's directory<br />
that matches their operating system. Right now, it's a +/- manual process.<br />
<br />
We use Pillow for a few reasons:<br />
<br />
1. Resizing/scaling the image via Python starts an asynchronous process,<br />
but the function returns immediately. We couldn't find a way to wait for<br />
the scale operation to finish before Krita calls Node.save() and exports<br />
the image. The only way we could solve this so far was using Pillow.<br />
2. Pillow is fast. Using it makes export 2+x faster compared to using<br />
Krita's built-in functions.<br />
<br />
As a bonus, it's a lot easier to manipulate the image with Pillow than<br />
using Krita's API.<br />
<br />
It's technically possible to automate the installation of the<br />
dependency, to have the right version of pillow bundled with Krita upon<br />
building the program.<br />
<br />
A FEW QUESTIONS<br />
<br />
About the add-on:<br />
<br />
1. Is there a reliable way to transform the layer from Python with<br />
Krita, and wait for it to finish before saving the file?&#160; If so we could<br />
remove Pillow as a dependency. (code contributions welcome!)<br />
2. Would having pillow as a dependency be okay if we contributed the<br />
add-on? The library itself is sizeable, and it takes a good 6 megabytes<br />
on disk. For a single add-on, I bet it's too big but never hurts to ask. 🙂<br />
<br />
Python add-on development with Krita:<br />
<br />
3. Is there a way to reload Python plugins without closing and<br />
restarting Krita? Plugin dev is quite slow because of that right now.<br />
<br />
Thank you for your time,<br />
&#160;Nathan<br />
<br /></blockquote>
</div>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic