Re: [Gimp-developer] How to make a PyGimp plugin rerunnable?
On Sat, Aug 12, 2006 at 03:33:57AM +, David Gowers wrote: > > Yes, that was exactly what's needed. > Looks like '' means 'image is irrelevant' while '*' means 'all'. > it has been my experience that '*' always creates a script that will only run once and sit there grayed out in the menu as you described while '' always works if there is no image or if it is all image types. only put something there if you need to limit it to certain image formats. unless something has changed since i changed the way i write scripts. crol ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] How to make a PyGimp plugin rerunnable?
On 8/11/06, Seth Burgess <[EMAIL PROTECTED]> wrote: I think the better question is why is it runnable at all? The install_procedure call has an argument of '' for image types it can work on; since you're under the , this should be dynamically changed based upon the characteristics of the image under it. Try using a type of '*' instead, or RGB* if you want to be more specific, and see if that helps. Yes, that was exactly what's needed.Looks like '' means 'image is irrelevant' while '*' means 'all'.Kevin: Nope; read more carefully. it did show up, it just wasn't rerunnable ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] How to make a PyGimp plugin rerunnable?
David Gowers wrote: I've written several PyGimp plugins, but when I go to the 'recent filters' menu or try to rerun one, it is disabled. I can run it okay and it produces the expected results, but I can't rerun it. You don't need to do anything in your plug-in. It was a limitation within GIMP that prevented most (all?) of the script-based plug-ins from appearing in the 'recent filters' list. This has been fixed in the current GIMP source. -- Cheers! Kevin. http://www.interlog.com/~kcozens/ |"What are we going to do today, Borg?" Owner of Elecraft K2 #2172|"Same thing we always do, Pinkutus: | Try to assimilate the world!" #include| -Pinkutus & the Borg ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] How to make a PyGimp plugin rerunnable?
I've written several PyGimp plugins, but when I go to the 'recent filters' menu or try to rerun one, it is disabled. I can run it okay and it produces the expected results, but I can't rerun it. to clarify, I'm using the simple gimpplugin.plugin class (GimpFu is far too heavyweight and slow for something with no UI needed) Here's a super-simplified plugin just to demonstrate this. How do I get it to be rerunnable? (pasted here as well as attached, in case the attachment is filtered out by the mailing list software.) #!/usr/bin/python import gimp,gimpplugin from gimpfu import PLUGIN, PF_INT, PF_IMAGE, PF_DRAWABLE, PDB_SUCCESS pdb = gimp.pdb import os class Simple(gimpplugin.plugin): def query(self): d = '' gimp.install_procedure('plug_in_simple', d,d,d,d,d,'/File/Simple_Test', '',PLUGIN, [( PF_INT, 'run_mode', "run mode"),(PF_IMAGE, 'image', 'Image'), (PF_DRAWABLE, 'drawable', 'Drawable')] , []) def plug_in_simple(self, run_mode, image, drawable): return # returning PDB_SUCCESS doesn't help, nor does returning None (as gimpfu.py does) def start(self): gimpplugin.plugin.start(self) if __name__ == '__main__': Simple().start() #!/usr/bin/python import gimp,gimpplugin from gimpfu import PLUGIN, PF_INT, PF_IMAGE, PF_DRAWABLE, PDB_SUCCESS pdb = gimp.pdb import os class Simple(gimpplugin.plugin): def query(self): d = '' gimp.install_procedure('plug_in_simple', d,d,d,d,d,'/File/Simple_Test', '',PLUGIN, [(PF_INT, 'run_mode', "run mode"),(PF_IMAGE, 'image', 'Image'), (PF_DRAWABLE, 'drawable', 'Drawable')], []) def plug_in_simple(self, run_mode, image, drawable): return # returning PDB_SUCCESS doesn't help, nor does returning None (as gimpfu.py does) def start(self): gimpplugin.plugin.start(self) if __name__ == '__main__': Simple().start()___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer