GIMP Chat http://gimpchat.com/ |
|
"Wrong parameter type" using Map object (Solved) http://gimpchat.com/viewtopic.php?f=9&t=18752 |
Page 1 of 1 |
Author: | Pocholo [ Sat Sep 05, 2020 12:40 pm ] |
Post subject: | "Wrong parameter type" using Map object (Solved) |
Hi guys! I'm writing a plugin using Map object and is giving me this error. What i'm I missing? ![]() I'm using the procedure code sample by Graechan here: viewtopic.php?f=9&t=10856 post #3 Code: Select all pdb.plug_in_map_object(img, pumLayer, |
Author: | MareroQ [ Sat Sep 05, 2020 2:50 pm ] |
Post subject: | Re: "Wrong parameter type" using Map object |
Hi Pocholo. Right now, the only plugin I can remember that works fine with plug_in_map_object is "Planet_wire_frame_model.py" by TinTran: https://gimplearn.net/viewtopic.php?f=3&t=535 Code: Select all pdb.plug_in_map_object(image, drawable,1,0.5,0.5,2.0,0.5,0.5,0.0,1.0,0.0,0.0,0.0,1.0,0.0,-1.5,70,45,2,(255,255,255),1.0,1.0,1.0,1.0,1.0,1.0,0.3,1,0.5,0,27,True,False,False,True,0.25,0.25,0.25,0.25,1.00,None,None,None,None,None,None,None,None) |
Author: | Pocholo [ Sat Sep 05, 2020 9:24 pm ] |
Post subject: | Re: "Wrong parameter type" using Map object |
Thank you so much for your help, MararoQ. I will try that. ![]() |
Author: | Graechan [ Sat Sep 05, 2020 9:48 pm ] |
Post subject: | Re: "Wrong parameter type" using Map object |
Pocholo Please post your pumpkin pattern or xcf file so I can run map object on it
|
Author: | Pocholo [ Sun Sep 06, 2020 12:48 am ] |
Post subject: | Re: "Wrong parameter type" using Map object |
Graechan wrote: Pocholo Please post your pumpkin pattern or xcf file so I can run map object on it Graechan, I got the Map object fixed and working with MareroQ sample from one of Tin Tran plugin "Planet_wire_frame_model.py". The only difference a I see on the code is that some parameters were written in lowercase (True, False) and the last 8 parameters were written as None instead of -1. Code: Select all pdb.plug_in_map_object(img, pumLayer, This is the result using Map object and G'MIC: ![]() Thank you anyway, you guys are being great in my coding learning journey. |
Author: | Graechan [ Sun Sep 06, 2020 1:51 am ] |
Post subject: | Re: "Wrong parameter type" using Map object |
That was just reflecting the difference between Python and Scheme
by the way great looking Pumpkin |
Author: | ofnuts [ Sun Sep 06, 2020 2:42 am ] |
Post subject: | Re: "Wrong parameter type" using Map object |
Pocholo wrote: The only difference a I see on the code is that some parameters were written in lowercase (True, False) and the last 8 parameters were written as None instead of -1. Because: 1) in Python, the two boolean values are True and False, with an initial cap. 2) In Script-fu, you don't deal with Gimp objects (image, layers, paths...), directly but with a "handle" which is a positive integer number (more or less a sequence number of creation), so "no object" is the special "-1" handle. In Python-fu, the Gimp objects are wrapped in a Python object, so "no object" is "None", which is the reserved value for "nothing" in Python (most other programming languages use "null" instead). |
Author: | Pocholo [ Sun Sep 06, 2020 7:52 am ] |
Post subject: | Re: "Wrong parameter type" using Map object |
@Graechan, Thank you for the amiability to help! What I'm trying to archive is creating a carved pumpkin. By the way, I'm using the pumpkin gradient created by our latest friend Oregonian: viewtopic.php?f=23&t=622&p=6131&hilit=pumpkin+gradient#p6131 @Thanks for the explanation Ofnuts, I couldn't said it better myself. ![]() |
Page 1 of 1 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |