Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lomo Effect for 2.9.9
#6
(03-12-2018, 05:13 AM)dinasset Wrote: Nothing specific, just the way to set the layer's mode is typical of 2.9

About the FG/BG saving/restoring: some times ago I noticed (on 2.8) that the push/pop operations were not enough for them (OK for pattern, font, gradient), hence I specifically added those.
Didn't try yet if that was a temporary bug on 2.8.

Works for me on 2.8.22. Even better, it seems that of you do one context_push() there is an implicit context_pop() at the end:

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

from gimpfu import *

def testContext(image,layer):
    gimp.context_push()
    gimp.set_foreground(0,0,255)
    layer.fill(FOREGROUND_FILL)
#    gimp.context_pop()  # doesn't even seem necessary
    
register(
    'test-context','Test context','Test context',
    '','','','Test context','RGB*',
    [(PF_IMAGE,'image','Input image', None),(PF_DRAWABLE,'layer','Input layer', None)],[],
    testContext,
    menu='<Image>/Test'
)

main()
Reply


Messages In This Thread
Lomo Effect for 2.9.9 - by dinasset - 03-11-2018, 01:00 PM
RE: Lomo Effect for 2.9.9 - by Espermaschine - 03-11-2018, 01:23 PM
RE: Lomo Effect for 2.9.9 - by rich2005 - 03-11-2018, 01:47 PM
RE: Lomo Effect for 2.9.9 - by Ofnuts - 03-11-2018, 10:02 PM
RE: Lomo Effect for 2.9.9 - by dinasset - 03-12-2018, 05:13 AM
RE: Lomo Effect for 2.9.9 - by Ofnuts - 03-12-2018, 07:57 AM
RE: Lomo Effect for 2.9.9 - by dinasset - 03-12-2018, 10:04 AM

Forum Jump: