It is currently Tue Aug 25, 2026 11:21 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Satus of PDB Call to continue script when call was successful
PostPosted: Mon Nov 06, 2017 4:45 am  (#1) 
Offline
New Member

Joined: Nov 06, 2017
Posts: 2
Hi,

Im new to Gimp Plugins and its very intriguing and quite fun.
Right now Im just a bit overwhelmed. I need the status of a pdb call and only continue the script when its done. As far as I researched this I need to use the progess calls (ie gimp-progress-install), but this seems to exceed my programming capabilities.

Can you guys tell me how to achive this?

I call pdb.gimp_layer_set_offsets(layer, layer.offsets[0], 200) in a loop and it does not change the offsets before saving. When I use it outside the loop in a single run, it works.

I guess or hope Im overlooking something and this might be trivial. Last resort would be to just use wait, but im not exactly keen for it, since the script should run without review/checks after its execution.

Thanks a lot,
Karl


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Satus of PDB Call to continue script when call was successful
PostPosted: Mon Nov 06, 2017 5:02 am  (#2) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
When the call returns the offset as changed. Must be a problem in your code...

By the way instead of the PDB call you can also use:
layer.set_offsets(oX,oY)


(but this isn't why your code doesn't work, since it's strictly equivalent to the PDB code)

_________________
Image


Top
 Post subject: Re: Satus of PDB Call to continue script when call was successful
PostPosted: Mon Nov 06, 2017 6:03 am  (#3) 
Offline
New Member

Joined: Nov 06, 2017
Posts: 2
Okay, with knowing that the work is done when the pdb call returns, I tested again and it was indeed my fault. I shouldnt have jumped to conslusions so fast.

Thank you.


Top
 Post subject: Re: Satus of PDB Call to continue script when call was successful
PostPosted: Mon Nov 06, 2017 6:52 am  (#4) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
akarl wrote:
Okay, with knowing that the work is done when the pdb call returns, I tested again and it was indeed my fault. I shouldnt have jumped to conslusions so fast.

Thank you.

40 years of programming (first program in 1976) taught me this: if it doesn't work, it is much more likely to be a problem with my code than with anything else. :)

_________________
Image


Top
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group