It is currently Thu Jul 04, 2024 4:01 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: PyScript to draw arrow
PostPosted: Sun Mar 05, 2017 12:06 pm  (#21) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
So should fletcha.py be removed and replaced with this new one?

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: PyScript to draw arrow
PostPosted: Sun Mar 05, 2017 5:24 pm  (#22) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
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.

#if "python_fu_text_along_path_full" in dir(pdb):
#    def_txt = ""
#else:
#    def_txt = "you need the add-on text-along-path-0.4.py"
def_txt=""


But it doesn't work. Someone knows an other way to reach this goal ?

Try:
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.

_________________
Image


Top
 Post subject: Re: PyScript to draw arrow
PostPosted: Tue Mar 07, 2017 11:35 pm  (#23) 
Offline
GimpChat Member
User avatar

Joined: Jan 30, 2017
Posts: 19
@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. :gaah
Ofnuts wrote:
Try:
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


Top
 Post subject: Re: PyScript to draw arrow
PostPosted: Fri Nov 18, 2022 1:04 am  (#24) 
Offline
New Member

Joined: Nov 18, 2022
Posts: 1
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


Top
Post new topic Reply to topic  [ 24 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Draw Arrows/Draw Shapes: Sorry! My download link hadn't worked.

0

No new posts Attachment(s) HN: Draw shape - Create paths draw shapes simultaneously and easily

31

No new posts I cannot make the draw tool actually draw

3

No new posts First draw

1

No new posts Attachment(s) Draw on Paper

10



* Login  



Powered by phpBB3 © phpBB Group