Krita 5.2 ManualKDE application and needs the KDE libraries. You might also want to install the KDE system settings module and tweak the GUI theme and fonts used, depending on your distributions. Nautilus/Nemo file extensions Running basic Krita commands To allow Python to communicate with Krita, we will use the Krita module. At the top of every script, we will write from krita import *. This allows us to talk to Krita example above. [print([a.objectName(), a.text()]) for a in Krita.instance().actions()] The Python module inspect was designed for this sort of task. Here’s a useful function to print info about a class0 码力 | 1502 页 | 79.07 MB | 1 年前3
Krita 5.2 브로셔Running basic Krita commands To allow Python to communicate with Krita, we will use the Krita module. At the top of every script, we will write from krita import *. This allows us to talk to Krita example above. [print([a.objectName(), a.text()]) for a in Krita.instance().actions()] The Python module inspect was designed for this sort of task. Here’s a useful function to print info about a class note on unit tests If you want to write unit tests for your plugin, have a look at the mock krita module [https://github.com/rbreu/krita-python-mock]. Conclusion Okay, so that covers all the Krita specific0 码力 | 1531 页 | 79.11 MB | 1 年前3
Krita 4.x 官方文档中文版 2021-08-06ApyqtSignal 在使⽤⾮标准 Python 对象的信息和信息槽时,你要把它们的名称 放到引号⾥⾯。 关于单元测试的提醒 如果你打算为你的插件编写单元测试,可参考 mock krita module [https://github.com/rbreu/krita-python-mock] ⻚⾯。 结语 以上便是给 Krita 创建⼀个 Python 插件所必须的全部技术细节。 虽然本 This version of Python will be used for two things to configure Qt and to build the Python scripting module. Do not set PYTHONHOME or PYTHONPATH. Make sure that your Python will have the correct architecture able to import Krita’s Python plugins outside of Krita in the unit test setup, there is a mock krita module that will return mock objects for any attribute names so that importing krita and registering plugins0 码力 | 1594 页 | 110.95 MB | 1 年前3
Krita 4.x 官方文档中文版 2021-08-06ApyqtSignal 在使用非标准 Python 对象的信息和信息槽时,你要把它们的名称放到引号里 面。 关于单元测试的提醒 如果你打算为你的插件编写单元测试,可参考 mock krita module [https://github.com/rbreu/krita-python-mock] 页面。 结语 以上便是给 Krita 创建一个 Python 插件所必须的全部技术细节。虽然本教程既 This version of Python will be used for two things to configure Qt and to build the Python scripting module. Do not set PYTHONHOME or PYTHONPATH. Make sure that your Python will have the correct architecture able to import Krita’s Python plugins outside of Krita in the unit test setup, there is a mock krita module that will return mock objects for any attribute names so that importing krita and registering plugins0 码力 | 1373 页 | 74.74 MB | 1 年前3
Krita 5.2 中文手册pyqtSignal 在使用非标准 Python 对象的信息和信息槽时,你要把它们的名称放到引号里 面。 关于单元测试的提醒 如果你打算为你的插件编写单元测试,可参考 mock krita module [https://github.com/rbreu/krita-python-mock] 页面。 结语 以上便是给 Krita 创建一个 Python 插件所必须的全部技术细节。虽然本教程既 This version of Python will be used for two things to configure Qt and to build the Python scripting module. Do not set PYTHONHOME or PYTHONPATH. Make sure that your Python will have the correct architecture able to import Krita’s Python plugins outside of Krita in the unit test setup, there is a mock krita module that will return mock objects for any attribute names so that importing krita and registering plugins0 码力 | 1594 页 | 79.20 MB | 1 年前3
Krita 5.2 官方文档中文版 2023-12-08ApyqtSignal 在使用非标准 Python 对象的信息和信息槽时,你要把它们的名称 放到引号里面。 关于单元测试的提醒 如果你打算为你的插件编写单元测试,可参考 mock krita module [https://github.com/rbreu/krita-python-mock] 页面。 结语 以上便是给 Krita 创建一个 Python 插件所必须的全部技术细节。 虽然本教 This version of Python will be used for two things to configure Qt and to build the Python scripting module. Do not set PYTHONHOME or PYTHONPATH. Make sure that your Python will have the correct architecture able to import Kritaʼs Python plugins outside of Krita in the unit test setup, there is a mock krita module that will return mock objects for any attribute names so that importing krita and registering plugins0 码力 | 1685 页 | 91.87 MB | 1 年前3
Krita 5.2 官方文档中文版 2023-12-08ApyqtSignal 在使用非标准 Python 对象的信息和信息槽时,你要把它们的名称放到引号里 面。 关于单元测试的提醒 如果你打算为你的插件编写单元测试,可参考 mock krita module [https://github.com/rbreu/krita-python-mock] 页面。 结语 以上便是给 Krita 创建一个 Python 插件所必须的全部技术细节。虽然本教程既 This version of Python will be used for two things to configure Qt and to build the Python scripting module. Do not set PYTHONHOME or PYTHONPATH. Make sure that your Python will have the correct architecture able to import Krita’s Python plugins outside of Krita in the unit test setup, there is a mock krita module that will return mock objects for any attribute names so that importing krita and registering plugins0 码力 | 1562 页 | 79.19 MB | 1 年前3
Krita 5.1 官方文档中文版 2023-05-26ApyqtSignal 在使用非标准 Python 对象的信息和信息槽时,你要把它们的名称放到引号里 面。 关于单元测试的提醒 如果你打算为你的插件编写单元测试,可参考 mock krita module [https://github.com/rbreu/krita-python-mock] 页面。 结语 以上便是给 Krita 创建一个 Python 插件所必须的全部技术细节。虽然本教程既 This version of Python will be used for two things to configure Qt and to build the Python scripting module. Do not set PYTHONHOME or PYTHONPATH. Make sure that your Python will have the correct architecture able to import Krita’s Python plugins outside of Krita in the unit test setup, there is a mock krita module that will return mock objects for any attribute names so that importing krita and registering plugins0 码力 | 1547 页 | 78.22 MB | 1 年前3
Krita 5.2 マニュアル
This version of Python will be used for two things to configure Qt and to build the Python scripting module. Do not set PYTHONHOME or PYTHONPATH. Make sure that your Python will have the correct architecture able to import Krita's Python plugins outside of Krita in the unit test setup, there is a mock krita module that will return mock objects for any attribute names so that importing krita and registering plugins code units that are independent of Krita-related functions. Another caveat is that the mock krita module doesn't work with wildcard imports (from krita import *), but those should be avoided anyway. Introduction0 码力 | 1591 页 | 79.16 MB | 1 年前3
共 9 条
- 1













