Gimp-Forum.net
Where is path to CSV in the interface - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP)
+---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions)
+---- Thread: Where is path to CSV in the interface (/Thread-Where-is-path-to-CSV-in-the-interface)



Where is path to CSV in the interface - mark_lester - 01-22-2022

I am trying to load a set of generated 2 point lines on top of the image they display a hidden geometry to..
I have stuck path-csv-0.1.py in my plug-ins directory and it shows up in the plug in browser.
I cant find where it is in the interface, how to run it.


RE: Where is path to CSV in the interface - mark_lester - 01-22-2022

(01-22-2022, 03:14 AM)mark_lester Wrote: I am trying to load a set of generated 2 point lines on top of the image they display a hidden geometry to..
I have stuck path-csv-0.1.py in my plug-ins directory and it shows up in the plug in browser.
I cant find where it is in the interface, how to run it.




Code:
➤> images = gimp.image_list()
➤> myimage = images[0]
➤> pdb.python_fu_path_csv_import(myimage,"ref","/home/mark/cardano/original.csv")
Traceback (most recent call last):
  File "<input>", line 1, in <module>
TypeError: wrong parameter type


I got that out of the console. Is it complaining about refpath ?


RE: Where is path to CSV in the interface - rich2005 - 01-22-2022

Quote:.Where is path to CSV in the interface

Right click in the paths dock, at the bottom Tools -> CSV -> Import CSV  Ofnuts will give advice, but I can't get it to work either. Edit: yes I can skip this and go to the end.


Two situations

1) Invoke the script without a path in the paths dock
loading menu '/usr/share/gimp/2.0/menus/vectors-menu.xml' for /vectors-popup
gimp: Gimp-Actions-WARNING: Uh-oh, no active item for the plug-in!


This one is a bit strange on my installation kubuntu 20.04 / Gimp 2.10.30 It works once then stops the import csv dialogue working. It looks like a file.so process gets stuck (maybe)

2) Then with a new empty path made in the paths dock.

[attachment=7383]

This is using ofnuts csv example from: https://www.gimp-forum.net/Thread-Draw-path-based-on-table-of-co-ordinates   path.csv
Code:
1-path,01,50,50,50,50,100,100

Edit: OH.. got it working using one of Ofnuts other examples DialTenMarks.csv
Make new canvas
Make new empty path in paths dialogue
Right click and invoke Tools -> CSV -> Import CSV
If you do not want to use the right-click-context, then use the Gimp 2.10 search option - the forward slash /? question mark key
example: https://i.imgur.com/9MfwayV.mp4


RE: Where is path to CSV in the interface - mark_lester - 01-22-2022

(01-22-2022, 06:11 AM)mark_lester Wrote:
(01-22-2022, 03:14 AM)mark_lester Wrote: I am trying to load a set of generated 2 point lines on top of the image they display a hidden geometry to..
I have stuck path-csv-0.1.py in my plug-ins directory and it shows up in the plug in browser.
I cant find where it is in the interface, how to run it.



Code:
images = gimp.image_list()
fill_type=1
new_image = images[0]
new_layer = new_image.layers[0]

new_vectors=pdb.gimp_vectors_new(new_image, 'Vectors!')
pdb.python_fu_path_csv_import(new_image,new_vectors,"/home/mark/cardano/original.csv")
pdb.gimp_image_add_vectors(new_image, new_vectors, 0)

pdb.gimp_context_set_brush( "Circle (07)" )
pdb.gimp_edit_stroke_vectors(new_layer, new_vectors)

gimp.Display( new_image )


that gets me the blue lines on the page which is all I needed. I aint got no CSV option in the tools menu. This will do. I screwed up the csv input, fixed now, I am airborne. Thanks for the stuff and the reply.



RE: Where is path to CSV in the interface - rich2005 - 01-22-2022

Quote:that gets me the blue lines on the page which is all I needed. I aint got no CSV option in the tools menu.

Just to clarify the plugin menu location. Not the Tools menu, it is a right-click context entry in the Paths dock.

[attachment=7384]

However as long as it works for you that is what matters.
"the blue lines" those are the paths, active will show red, inactive shows blue. Use Edit -> Stroke paths to render on the canvas.