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

Python: Dodge Filter Problem

Tags: None
(comma "," separated)
User avatar
ren062408
Registered Member
Posts
29
Karma
0
OS

Python: Dodge Filter Problem

Sat Oct 27, 2018 8:35 am
Hi, I wanted to apply some filters using python.

so here's what I have now:
Code: Select all
from krita import *

activeDoc = Krita.instance().activeDocument()
activeNode = activeDoc.activeNode()
filterDodge = Krita.instance().filter('dodge')

filterDodge.apply(activeNode, 0, 0, 1280, 720)

activeDoc.refreshProjection

print(filterDodge.configuration().properties())

Nothing happens. so far, I've been able to successfully use a 'blur' filter but not filters like 'dodge', which is the specific filter I need now.

If I try to see the 'blur' filter's properties using:
Code: Select all
print(filterObject.configuration().properties)

it returns a lot of things I can tweak. But on a 'dodge' filter object there is none {}. I think same goes for 'Burn' filter, don't know about the others tho. I wanted to know if its not possible to use 'dodge' right now or am I missing something.
User avatar
TheraHedwig
KDE Developer
Posts
1794
Karma
10
OS
If you go to filter->dodge and then press the 'xml' button in the top left you'll see the xml configuration for the dodge filter.

I suspect that we aren't creating a default configuration for that filter in the code.
User avatar
ren062408
Registered Member
Posts
29
Karma
0
OS

Re: Python: Dodge Filter Problem

Sat Oct 27, 2018 6:19 pm
TheraHedwig wrote:If you go to filter->dodge and then press the 'xml' button in the top left you'll see the xml configuration for the dodge filter.

I suspect that we aren't creating a default configuration for that filter in the code.

Thanks, checked the xml and got the keys that I needed. I've got it working now :)


Bookmarks



Who is online

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