RE: [Gimp-developer] GIMP plug-in disabled.
Thank you very much Simon. That is a very nice suggestion. If I make the “RGB*”… string “”,I could make the plugin repeatable. Thanks again.. From: Dream Artist Aspiring [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 12, 2006 9:52 PM To: David Gowers Cc: gimp-developer@lists.xcf.berkeley.edu Subject: Re: [Gimp-developer] GIMP plug-in disabled. Thank you very much. That worked for me. But, my initial idea for this plugin is that, if I select this option from menu; it will create a new image and layer and draw a circle on that layer. Now, it looks like I will have to create an image and just draw a circle on it. Thanks again for the help.. On 9/12/06, David Gowers <[EMAIL PROTECTED]> wrote: On 9/13/06, Dream Artist Aspiring < [EMAIL PROTECTED]> wrote: Hi, Thank you very much for the reply. Here is the registration code. If not in Xtns, where should I put this? static void query (void) { static GimpParamDef args[] = { { GIMP_PDB_INT32, "run-mode", "Run mode" }, { GIMP_PDB_INT32, "image", "Input image" }, { GIMP_PDB_INT32, "drawable", "Input drawable" } }; gimp_install_procedure ( "plug-in-testp", "TestP", "A Test Plugin", " ", " ", "2006", "_testp", "RGB*, GRAY*", GIMP_PLUGIN, G_N_ELEMENTS (args), 0, args, NULL); gimp_plugin_menu_register ("plug-in-testp", "/Xtns/Plugins/Misc"); That all looks OK, except the path. I suggest something like "/Test/Testplugin". I think that plugins have to be registered in the image menus to be repeatable, too. Certainly the ones of mine that reside in the toolbox are not repeatable. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GIMP plug-in disabled.
On 9/13/06, Sven Neumann <[EMAIL PROTECTED]> wrote: Hi,On Wed, 2006-09-13 at 00:13 +0930, David Gowers wrote:> Your plugin needs to take an image as its first input in order to be> repeatable.What do you mean when you say "repeatable"? What you are saying here doesn't make any sense to me.So that it can be rerun.. as in 'Repeat "Despeckle"', 'Re-show "Despeckle"' ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GIMP plug-in disabled.
Hi, On Wed, 2006-09-13 at 00:13 +0930, David Gowers wrote: > Your plugin needs to take an image as its first input in order to be > repeatable. What do you mean when you say "repeatable"? What you are saying here doesn't make any sense to me. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GIMP plug-in disabled.
Dream Artist Aspiring ([EMAIL PROTECTED]) wrote: > gimp_install_procedure ( > "plug-in-testp", > "TestP", > "A Test Plugin", > " ", > " ", > "2006", > "_testp", > "RGB*, GRAY*", > GIMP_PLUGIN, > G_N_ELEMENTS (args), 0, > args, NULL); > > gimp_plugin_menu_register ("plug-in-testp", > "/Xtns/Plugins/Misc"); You register your plugin in the Toolbox menu, yet it has an image/drawable argument as the first one, and you even specify that you need and RGB(A) or GRAY(A) image open for it to become active. The main problem is, that items registered in the toolbox menu don't have an idea of what the "current" image is that should be processed by the plugin. Hence the suggestion given by the others is correct: If your plugin should work on a given image, it needs to be registered in the -Menu, and it has to take an Image and a Drawable as the first two arguments. If you want to register your plugin in the toolbox then your plugin should not expect that there are reasonable values given in the first two arguments. In this context it also does not make sense to restrict the plugin only to be active for "RGB*, GRAY*" images, in this case this string should be empty. I am guessing here, but I believe that your "not repeatable" experience is directly related to the "RGB*, GRAY*" thing, if you register with an empty string there your plugin should be active always. Bye, Simon -- [EMAIL PROTECTED] http://simon.budig.de/ ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GIMP plug-in disabled.
Thank you very much. That worked for me. But, my initial idea for this plugin is that, if I select this option from menu; it will create a new image and layer and draw a circle on that layer. Now, it looks like I will have to create an image and just draw a circle on it. Thanks again for the help.. On 9/12/06, David Gowers <[EMAIL PROTECTED]> wrote: On 9/13/06, Dream Artist Aspiring < [EMAIL PROTECTED]> wrote: Hi, Thank you very much for the reply. Here is the registration code. If not in Xtns, where should I put this?static voidquery (void){ static GimpParamDef args[] = { { GIMP_PDB_INT32, "run-mode", "Run mode" }, { GIMP_PDB_INT32, "image", "Input image" }, { GIMP_PDB_INT32, "drawable", "Input drawable" } }; gimp_install_procedure ( "plug-in-testp", "TestP", "A Test Plugin", " ", " ", "2006", "_testp", "RGB*, GRAY*", GIMP_PLUGIN, G_N_ELEMENTS (args), 0, args, NULL); gimp_plugin_menu_register ("plug-in-testp", "/Xtns/Plugins/Misc");That all looks OK, except the path. I suggest something like "/Test/Testplugin". I think that plugins have to be registered in the image menus to be repeatable, too.Certainly the ones of mine that reside in the toolbox are not repeatable. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GIMP plug-in disabled.
On 9/13/06, Dream Artist Aspiring <[EMAIL PROTECTED]> wrote: Hi, Thank you very much for the reply. Here is the registration code. If not in Xtns, where should I put this?static voidquery (void){ static GimpParamDef args[] = { { GIMP_PDB_INT32, "run-mode", "Run mode" }, { GIMP_PDB_INT32, "image", "Input image" }, { GIMP_PDB_INT32, "drawable", "Input drawable" } }; gimp_install_procedure ( "plug-in-testp", "TestP", "A Test Plugin", " ", " ", "2006", "_testp", "RGB*, GRAY*", GIMP_PLUGIN, G_N_ELEMENTS (args), 0, args, NULL); gimp_plugin_menu_register ("plug-in-testp", "/Xtns/Plugins/Misc");That all looks OK, except the path. I suggest something like "/Test/Testplugin". I think that plugins have to be registered in the image menus to be repeatable, too.Certainly the ones of mine that reside in the toolbox are not repeatable. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GIMP plug-in disabled.
Hi, Thank you very much for the reply. Here is the registration code. If not in Xtns, where should I put this?static voidquery (void){ static GimpParamDef args[] = { { GIMP_PDB_INT32, "run-mode", "Run mode" }, { GIMP_PDB_INT32, "image", "Input image" }, { GIMP_PDB_INT32, "drawable", "Input drawable" } }; gimp_install_procedure ( "plug-in-testp", "TestP", "A Test Plugin", " ", " ", "2006", "_testp", "RGB*, GRAY*", GIMP_PLUGIN, G_N_ELEMENTS (args), 0, args, NULL); gimp_plugin_menu_register ("plug-in-testp", "/Xtns/Plugins/Misc");On 9/12/06, David Gowers <[EMAIL PROTECTED]> wrote: On 9/12/06, Dream Artist Aspiring <[EMAIL PROTECTED] > wrote: Hi all, I am very new to gimp and it's development. I am trying to learn gimp-plugins. I can run the plugin fine for the first using the Xtns->... menu. But if I want to run the same plugin for second time, the menu entry is disabled. Is there something that I am doing wrong? please let me know. Thanks much in advance. HERE IS MY CODE:---static voidrun (const gchar *name, gint nparams, const GimpParam *param, gint *nreturn_vals, GimpParam **return_vals) { static GimpParam values[1]; GimpPDBStatusType status = GIMP_PDB_SUCCESS; gint32 SImg, SLay; /* Setting mandatory output values */ *nreturn_vals = 1; *return_vals = values; values[0].type = GIMP_PDB_STATUS; values[0].data.d_status = status; SImg = gimp_image_new(720,720,GIMP_RGB); SLay = gimp_layer_new(SImg, "Layer1", 720, 720, GIMP_RGB_IMAGE, 100, GIMP_NORMAL_MODE); gimp_image_add_layer(SImg, SLay, 0); gimp_drawable_fill(SLay, GIMP_BACKGROUND_FILL); gimp_display_new(SImg); gimp_displays_flush(); return;} Hi. I had a similar problem before. Please show your registration code. Your plugin needs to take an image as its first input in order to be repeatable.Your plugin will be grayed out if you registered it as accepting the wrong image types. In this case "*" is the right image type to accept. Using '' will create a plugin that accepts any input image, but is not repeatable (this was my mistake.) ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GIMP plug-in disabled.
On 9/12/06, Dream Artist Aspiring <[EMAIL PROTECTED]> wrote: Hi all, I am very new to gimp and it's development. I am trying to learn gimp-plugins. I can run the plugin fine for the first using the Xtns->... menu. But if I want to run the same plugin for second time, the menu entry is disabled. Is there something that I am doing wrong? please let me know. Thanks much in advance. HERE IS MY CODE:---static voidrun (const gchar *name, gint nparams, const GimpParam *param, gint *nreturn_vals, GimpParam **return_vals) { static GimpParam values[1]; GimpPDBStatusType status = GIMP_PDB_SUCCESS; gint32 SImg, SLay; /* Setting mandatory output values */ *nreturn_vals = 1; *return_vals = values; values[0].type = GIMP_PDB_STATUS; values[0].data.d_status = status; SImg = gimp_image_new(720,720,GIMP_RGB); SLay = gimp_layer_new(SImg, "Layer1", 720, 720, GIMP_RGB_IMAGE, 100, GIMP_NORMAL_MODE); gimp_image_add_layer(SImg, SLay, 0); gimp_drawable_fill(SLay, GIMP_BACKGROUND_FILL); gimp_display_new(SImg); gimp_displays_flush(); return;}Hi. I had a similar problem before. Please show your registration code. Your plugin needs to take an image as its first input in order to be repeatable.Your plugin will be grayed out if you registered it as accepting the wrong image types. In this case "*" is the right image type to accept. Using '' will create a plugin that accepts any input image, but is not repeatable (this was my mistake.) ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] GIMP plug-in disabled.
On 9/12/06, Dream Artist Aspiring <[EMAIL PROTECTED]> wrote: Hi all, I am very new to gimp and it's development. I am trying to learn gimp-plugins. I can run the plugin fine for the first using the Xtns->... menu. But if I want to run the same plugin for second time, the menu entry is disabled. Is there something that I am doing wrong? please let me know. Thanks much in advance. HERE IS MY CODE: --- static void run (const gchar *name, gint nparams, const GimpParam *param, gint *nreturn_vals, GimpParam **return_vals) { static GimpParam values[1]; GimpPDBStatusType status = GIMP_PDB_SUCCESS; gint32 SImg, SLay; /* Setting mandatory output values */ *nreturn_vals = 1; *return_vals = values; values[0].type = GIMP_PDB_STATUS; values[0].data.d_status = status; SImg = gimp_image_new(720,720,GIMP_RGB); SLay = gimp_layer_new(SImg, "Layer1", 720, 720, GIMP_RGB_IMAGE, 100, GIMP_NORMAL_MODE); gimp_image_add_layer(SImg, SLay, 0); gimp_drawable_fill(SLay, GIMP_BACKGROUND_FILL); gimp_display_new(SImg); gimp_displays_flush(); return; } I don't see anything obviously wrong with this code, but you left out the registration part. I'm going to guess that you registered this as an extension and not as a plugin. That might cause the symptoms you describe. (This is one of several reasons why Xtns is a bad name for that menu.) Rockwalrus ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] GIMP plug-in disabled.
Hi all, I am very new to gimp and it's development. I am trying to learn gimp-plugins. I can run the plugin fine for the first using the Xtns->... menu. But if I want to run the same plugin for second time, the menu entry is disabled. Is there something that I am doing wrong? please let me know. Thanks much in advance. HERE IS MY CODE:---static voidrun (const gchar *name, gint nparams, const GimpParam *param, gint *nreturn_vals, GimpParam **return_vals) { static GimpParam values[1]; GimpPDBStatusType status = GIMP_PDB_SUCCESS; gint32 SImg, SLay; /* Setting mandatory output values */ *nreturn_vals = 1; *return_vals = values; values[0].type = GIMP_PDB_STATUS; values[0].data.d_status = status; SImg = gimp_image_new(720,720,GIMP_RGB); SLay = gimp_layer_new(SImg, "Layer1", 720, 720, GIMP_RGB_IMAGE, 100, GIMP_NORMAL_MODE); gimp_image_add_layer(SImg, SLay, 0); gimp_drawable_fill(SLay, GIMP_BACKGROUND_FILL); gimp_display_new(SImg); gimp_displays_flush(); return;} ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer