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

Suggestion for documentation.

Tags: None
(comma "," separated)
saedjubarin
Registered Member
Posts
58
Karma
0

Suggestion for documentation.

Mon Mar 18, 2019 9:01 am
Krita Scripting and Plugin Wrapper Library: libkis

There's a mention about importing krita, and it importing two built-ins, Application and Scripter, of which both lack any further explanation. The following sentence is even more obscure: "This is an alias for Krita.instance(), which is the first place from which to access the running Krita instance." This? What is this? Furthermore, what is Scripter? I understand that Application is Krita.instance(), but only from the context. Scripter remains a mystery to me, because it doesn't show up anywhere even with the search. Many of the tutorials advice me to do this: app = Krita.instance(), but when I look at the plugins/python/... stuff many of the plugins there just use Application, which in return is confusing because without reading the confusing libkis page I would have no idea that Application is being imported somewhere.

I'll repeat this: There is no documentation about Scripter.

Don't get me wrong, the link above is very informative overall, but some minor overhaul would do wonders.
saedjubarin
Registered Member
Posts
58
Karma
0

Re: Suggestion for documentation.

Mon Mar 18, 2019 9:11 am
What does this mean: "Note: internally, Krita distinguishes between images and documents." ? What other documents are we talking about than images?

Edit: Oh, I notice that the explanation is provided in the next paragraph instead of in context. Unstructured text like this is confusing.
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Suggestion for documentation.

Mon Mar 18, 2019 9:19 am
If you think you can do better, provide better text?
saedjubarin
Registered Member
Posts
58
Karma
0

Re: Suggestion for documentation.

Mon Mar 18, 2019 5:02 pm
boudewijn wrote:If you think you can do better, provide better text?


To be able to decently do that I would have to know what is "Scripter".
User avatar
TheraHedwig
KDE Developer
Posts
1794
Karma
10
OS

Re: Suggestion for documentation.

Mon Mar 18, 2019 5:39 pm
Maybe read the introduction to python scripting? https://docs.krita.org/en/user_manual/p ... pting.html
saedjubarin
Registered Member
Posts
58
Karma
0

Re: Suggestion for documentation.

Tue Mar 19, 2019 7:23 am
TheraHedwig wrote:Maybe read the introduction to python scripting? https://docs.krita.org/en/user_manual/p ... pting.html


So you're saying when I do:
Code: Select all
import krita

I get access to Application as in Krita.instance() and Scripter as in the Scripter Krita Plugin? That makes no sense. Isn't Scripter something that I access pykrita with instead of accessing Scripter from pykrita? I've read the introduction.
saedjubarin
Registered Member
Posts
58
Karma
0

Re: Suggestion for documentation.

Tue Mar 19, 2019 7:30 am
What is the difference between Scripter and Application?
Code: Select all
print(dir(Scripter))
print(dir(Application))

both return pretty identical list.
User avatar
TheraHedwig
KDE Developer
Posts
1794
Karma
10
OS

Re: Suggestion for documentation.

Tue Mar 19, 2019 12:43 pm
Then that's the 'Scripter()' synonym, which much like Application() means the same thing as Krita.instance()


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]