GIMP Chat http://gimpchat.com/ |
|
PyScript to draw arrow http://gimpchat.com/viewtopic.php?f=9&t=15232 |
Page 2 of 2 |
Author: | Rod [ Sun Mar 05, 2017 12:06 pm ] |
Post subject: | Re: PyScript to draw arrow |
So should fletcha.py be removed and replaced with this new one? |
Author: | ofnuts [ Sun Mar 05, 2017 5:24 pm ] |
Post subject: | Re: PyScript to draw arrow |
Salamandre wrote: @Ofnuts No I prefer to modify my script to make it work with yours as such. Same here Salamandre wrote: I think duplicating scripts or "stealing" codes is counter productive. That's what you are doing anyway. As long as you distribute my code or a modified version of it, you will have to track any changes I make, whether it remains a separate script or the code is included in yours. Salamandre wrote: However, a procedure that creates objects (in your case vectors) should either destroy them before ending or return them as values. A procedure perhaps, but not a script, which is what we are talking about. This script can produce a variable number of paths, and there is no way to return them using the current API. Had I documented my script to be import'able, things would be different. Salamandre wrote: In the first part of my script, I tried to put a verification to see if the script text_along_path_full was there, and to inform the user if not. Code: Select all #if "python_fu_text_along_path_full" in dir(pdb): But it doesn't work. Someone knows an other way to reach this goal ? Try: Code: Select all if 'python_fu_text_along_path_full' in set(dir(pdb)): Edit: strange... I could reproduce the problem, but now that I want to investigate this further, procname in dir(pdb) works as expected. |
Author: | Salamandre [ Tue Mar 07, 2017 11:35 pm ] |
Post subject: | Re: PyScript to draw arrow |
@Rod Yes, flecha.py is no more usefull. @Ofnuts ofnuts wrote: Salamandre wrote: I think duplicating scripts or "stealing" codes is counter productive. That's what you are doing anyway. As long as you distribute my code or a modified version of it, you will have to track any changes I make, whether it remains a separate script or the code is included in yours. I don't get this: I plane to indicate to users to download your script as well. Though, there is no double ? Ofnuts wrote: Salamandre wrote: However, a procedure that creates objects (in your case vectors) should either destroy them before ending or return them as values. A procedure perhaps, but not a script, which is what we are talking about. This script can produce a variable number of paths, and there is no way to return them using the current API. Had I documented my script to be import'able, things would be different. My mistake, as it is possible to return as many number of paths as you want, I thought it would be easy. But I found no way to return a undefined number or objects. Ofnuts wrote: Try: Code: Select all if 'python_fu_text_along_path_full' in set(dir(pdb)): Edit: strange... I could reproduce the problem, but now that I want to investigate this further, procname in dir(pdb) works as expected. [/quote] Same result. Note that the python itself returns no error, but for some reason the script is not registered with this code. Maybe the pdb library being modified during the Gimp startup, it is not available, while inside a function that is not called at once, it works. I will maybe just make a message that pops up if you try to put a text without the text_along_path script installed |
Author: | vrdenj [ Fri Nov 18, 2022 1:04 am ] |
Post subject: | Re: PyScript to draw arrow |
While reading Herbert Nemeczek's "Install plug-ins and modules.docx" file I noticed on page 34 that he triggered the dreaded "Failed to load module "canberra-gtx-module" error. I've seen a message like this before and, though the "pk-gtk-module" generates the same error, the fix is the same: This example is from the Fedora-37 distribution, though the solution is the same for all distributions I think. 1. Find the provider of the missing module: $ dnf provides */libpk-gtk-module.so PackageKit-gtk3-module-1.2.5-2.fc37.x86_64 : Install fonts automatically using: PackageKit 2. Install the missing package: $ sudo dnf install PackageKit-gtk3-module-1.2.5-2.fc37.x86_64 Nothing to do, PackageKit-gtk3-module-1.2.5-2.fc37.x86_64 is already installed. So, the problem is not a missing module, but rather the file /etc/ld.so.conf.d/gtk3.conf, which provides the path to the module, that is missing! Solution (for missing pk-gtk-module): $ sudo bash -c 'cat > /etc/ld.so.conf.d/gtk3.conf << 'EOF' /usr/lib64/gtk-3.0/modules EOF' $ sudo ldconfig This solution to the missing pk-gtk-module was not my own enlightenment, I found it with a web search: Source: https://robbinespu.github.io/eng/2018/0 ... odule.html |
Page 2 of 2 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |