Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
qbist
#1
Hi,
I wanted to try using plug_in_qbist inside a filter (i.e. try to use it non-interactively)
I did some tests, but without success.
The statement pdb.plug_in_qbist (inImage, inLayer) returns an error (RuntimeError: calling error).
I'm using Windows 10, Gimp 2.8.22. 
Did someone make use of it? (or can just test now if it works?)
Thanks a lot
Reply
#2
From the source code:
Code:
case GIMP_RUN_INTERACTIVE:
   /* Possibly retrieve data */
   gimp_get_data (PLUG_IN_PROC, &qbist_info);

   /* Get information from the dialog */
   if (dialog_run ())
   {
       status = GIMP_PDB_SUCCESS;
       gimp_set_data (PLUG_IN_PROC, &qbist_info, sizeof (QbistInfo));
   }
   else
   status = GIMP_PDB_EXECUTION_ERROR;
   break;

case GIMP_RUN_NONINTERACTIVE:
   status = GIMP_PDB_CALLING_ERROR;
   break;
So, obviously not meant to be called from a script, and certainly not from Python, since plugins called by Python always have the GIMP_RUN_NONINTERACTIVE flag set. You may have some luck calling from Scripts-fu since IIRC in Script-fu you can set the interactive flag (but the user will get a dialog...).
Reply
#3
Thanks Ofnuts, but I wanted to use it without user interaction.
Hence, I give up.
Pity, it could create nice "overlaying" layers better than Plasma.
In case I will decide to go on, I will prepare a set of outcomes interactively and use them as pattern, but it's less "surprising".
Thanks again.
Reply


Forum Jump: