This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[Suggestion][Feature Request]Some workflow related things

Tags: None
(comma "," separated)
User avatar
radian
Registered Member
Posts
89
Karma
1
OS
Well, commissioning a plugin is the last thing you can do. Or if you are very rich\busy ¯\_(ツ)_/¯ But if many people will like your idea someone will have good reason to implement it.

MR4Y wrote:As per the links things...Don't you have to set up the whole thing to work with Krita to the point that you'd need to learn C++ anyways?


There is nothing hard to set up VM that build from sources (or setup all stuff if you use linux) and start messing with code. Of course it's better to know some programming basics to mess more successfully and better understand what the heck you are looking at. And python is perfect language to learn basics.
I guess with plugins you won't need to know about C++ and building from source but still some python knowledge will be useful.
User avatar
Metallicow
Registered Member
Posts
53
Karma
0
OS
MR4Y wrote:One of the big pluses of free software is that you can make things happen without money. But, unfortunately, you can't commission without money.


"Free" is this instance doesn't exactly have anything to do with money. It is the freedom that the license passes on to the end user. "Free as in free beer". Nobody really expects developers to work on software without some sort of compensation outside of their general "volunteer"/"hobby" time. So, if a feature is wanted fairly quickly outside of these restraints, people commission or contract work done for them specifically. Donating to the foundation is more of a general fund for supporting full-time devs to work on things that are agreed upon as a community whole for the best directions to work on at the time.

For example, if I wanted to sell my "Color Pickin` Pro" plugin for say $5 to users, until I collect enough funds to cover my development costs before I release it to the community under a general open license, I could do that. Stuff like this happens all the time in the blender community. It is a different way to raise money for time spent and sometimes $5/10 distributed thru out each user is better way to do this than say by $500/1000/2000/etc up front from an individual.

Of course if someone tried to do that with the default popup and charge a fee, that would most likely be frowned upon/taboo. Your own personal written code is free for you to do whatever you like with it, tho collecting money this way is usually done to recover dev costs/etc. For example, I would like a nice $200-400 tablet to play around/develop with...

MR4Y wrote:As per the links things...Don't you have to set up the whole thing to work with Krita to the point that you'd need to learn C++ anyways?

With the plugins, Python will be bundled with the application and PyQt is used internally, so that is all you would really need to learn other than the pykrita python api.

After you have a working plugin, then you could choose to port it into C++ krita core code, if desired. ...or the krita core team deems it useful enough to do so to get into master builds depending on the plugin as python will be an entryway to implementing other features on their lists.


User avatar
Metallicow
Registered Member
Posts
53
Karma
0
OS
@ MR4Y
Here is a sample app to get you started with your design/layout image basics. Note: You will have to change the PySide import to PyQt4 or PyQt5 depending on which you are using.
Ex:
from PySide.QtGui import ...
would become
from PyQt5.QtGui import ...

Code: Select all
#!/usr/bin/env python
# -*- coding: utf-8 -*-


from PySide.QtGui import qApp, QAction, QApplication, QColor, QImage, QPainter, QWidget
from PySide.QtCore import Qt, QSize, QPoint


class ShapedWindow(QWidget):
    def __init__(self):
        super(ShapedWindow, self).__init__()
        self.offset = QPoint(0, 0)
        self.initUI()

        quitAction = QAction("E&xit", self, shortcut="Ctrl+Q",
                             triggered=qApp.quit)
        self.addAction(quitAction)
        self.setContextMenuPolicy(Qt.ActionsContextMenu)

    def initUI(self):
        self.setWindowFlags(Qt.FramelessWindowHint)
        self.setAttribute(Qt.WA_TranslucentBackground)

    def sizeHint(self):
        return QSize(512, 512)

    def paintEvent(self, event):
        qp = QPainter()
        qp.begin(self)
        qp.setRenderHint(QPainter.Antialiasing)
        qp.setPen(Qt.NoPen)
        qp.setBrush(QColor(0, 127, 0, 127))
        qp.drawRect(0, 0, 512, 512)
        #qp.drawEllipse(0, 0, 512, 512)
        #qp.drawImage(0, 0, QImage("images/mylayout.png"))
        qp.end()

    def mousePressEvent(self, event):
        if event.button() == Qt.MiddleButton:
            self.offset = event.globalPos() - self.frameGeometry().topLeft()
            # self.offset = event.pos()
            event.accept()
            print(self.offset)

    def mouseMoveEvent(self, event):
        if event.buttons() == Qt.MiddleButton:
            self.move(event.globalPos() - self.offset)
            # x = event.globalX()
            # y = event.globalY()
            # x_offset = self.offset.x()
            # y_offset = self.offset.y()
            # self.move(x - x_offset, y - y_offset)
            event.accept()


if __name__ == '__main__':
    app = QApplication([])
    frame = ShapedWindow()
    frame.show()
    app.exec_()




Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]