![]() Registered Member ![]()
|
Can Krita access VanishingPointAssistant::adjustPosition via Pyhton?
https://api.kde.org/extragear-api/graph ... 94a65081c8 Two vanishing points must be aligned horizontally(pixel coordinates) for 3-point perspective(eyelevel) and 2-point perspective(eyelevel), but Krita can not. Krita cannot move the vanishing point by numerical input(pixel coordinates). Can I access the function of moving the vanishing point by numerical input(pixel coordinates) via Python? Or do I have to hack C++ code and merge request? |
![]() Registered Member ![]()
|
Hi! May I know if python scripting is necessary for what you are trying to achieve? I also wanted to be able to specify the exact positions of assistants, but I opted for a C++ solution and implemented a coordinates display in the Tool Options, it shows the coordinates of the currently selected assistant, and it accepts numeric input.
![]() ![]() I haven't tried submitting this into Krita it yet, but if you're interested I'll try to have the code cleaned up soon so its presentable for a merge request in future versions. |
![]() Registered Member ![]()
|
Dear NMaghfurUsman,
Your C++ code is what I wanted. Does it accept numeric input from numeric keys on PC keyboard? Please merge request your C++ code on Krita's Git"L"ab. |
![]() Registered Member ![]()
|
It uses the KisDoubleParseSpinBox class, which means it can do numeric input and operators like addition, subtraction, divide, multiply that you have on your numpad, along with whatever else this widget class provides. If you are capable of compiling Krita on your system, you can checkout my code from here https://invent.kde.org/nmaghfurusman/kr ... rds-widget and in the meantime I'll try to submit a merge request for review later this weekend. I've also made an attempt at a Python API for assistants over here https://invent.kde.org/nmaghfurusman/kr ... stants-api So far it's only good for getting the current set of Assistant objects on the canvas, and getting/setting the X,Y coordinates of the AssistantHandle's that belong to each Assistant object. From python scripts that is. |
![]() Registered Member ![]()
|
Dear NMaghfurUsman,
I appreciate you.
I am grateful to you. I am trying to create Japanese comic(manga) Extension for Krita(Python) now. |
![]() Registered Member ![]()
|
+1 for this, thanks for working on this
|
![]() Registered Member ![]()
|
Nabil Maghfur Usman.
I'd like to ask you for a merge request as soon as possible. I need this feature for a 3 point perspective. Your code is great.
|
Registered users: Bing [Bot], claydoh, Evergrowing, Google [Bot], rblackwell