Post Reply 

Script-fu: How to create new, addressable layer using gimp-floating-sel-to-layer

Aug 30, 2017, 14:55
Post: #1
Script-fu: How to create new, addressable layer using gimp-floating-sel-to-layer
Hi!

I'm working for the first time with script-fu. I have an image from which I want to cut several parts and past them subsequently as new layers. Afterwards I'd like to manipulate those newly pasted layers but I cannot address them. I tried it in the following way
Code:
(gimp-rect-select IMAGE 360 0 730 145 2 0 0)
(gimp-edit-cut LAYER1)
(set! VARIABLE1 (car ( gimp-edit-paste LAYER2 0 ) ) )
(set! title ( car (gimp-floating-sel-to-layer VARIABLE1 ) ) )

but when I call a function like
Code:
(gimp-layer-scale LAYER2 1245 1113 0 )

I get an error message saying that LAYER2 is not a valid input parameter.

Another strange thing that's happening, is that upon repeating the code block above, say 4 times to cut and paste different regions off LAYER1, the creation of the new layers works well up to the 3rd one. On the contrary the creation of the last layer gives just an empty layer instead of the area that should be cut from LAYER1. If I add an additional dummy layer the 4th layer is fine since now the dummy layer became the weird one,.

Can somebody explain to me what's going on and what I'm doing wrong?

I put the original and complete code in the attachment.


Attached File(s)
.scm  slabbands-fu.scm (Size: 3.23 KB / Downloads: 9)
Find all posts by this user
Quote this message in a reply
Aug 30, 2017, 20:12
Post: #2
RE: Script-fu: How to create new, addressable layer using gimp-floating-sel-to-layer
THIS FORUM IS DEAD, NOBODY WILL ANSWER QUESTIONS
If you want your questions answered, got to:

https://gimp-forum.net

Same folks, new forum.

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Aug 31, 2017, 14:32
Post: #3
RE: Script-fu: How to create new, addressable layer using gimp-floating-sel-to-layer
Thanks! I reposted it over there.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  plugin save for web in Gimp 2.9.6 Dkk 1 191 Oct 19, 2017 09:02
Last Post: paynekj
  Request for script chlebna 1 171 Sep 13, 2017 09:35
Last Post: ythgilb
  Request for script - Guillotine + Watermark sunslick 1 229 Sep 4, 2017 08:51
Last Post: ythgilb
  How to modify this script-fu? Zakary81 1 195 Aug 23, 2017 12:48
Last Post: paynekj
  Late binding / COM for opening an image into GIMP? i73 2 196 Aug 4, 2017 17:39
Last Post: i73

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS