It is currently Wed Sep 16, 2026 2:43 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 70 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject: Re: Update of selection bevel
PostPosted: Wed Feb 05, 2014 5:53 pm  (#61) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
Eris if that is dd's script you are referring to, I think it is a py file so you have to have python installed.

_________________
Image


Top
 Post subject: Re: Update of selection bevel
PostPosted: Wed Feb 05, 2014 6:07 pm  (#62) 
Offline
GimpChat Member
User avatar

Joined: Mar 23, 2012
Posts: 7388
Location: Göteborg at last!
Yeah, I didn't realise it wasn't installed until I tried another python file and that didn't work either.


Top
 Post subject: Re: Update of selection bevel
PostPosted: Wed Feb 05, 2014 7:08 pm  (#63) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
There is a good tutorial by rod how to install python Aris.

_________________
Image


Top
 Post subject: Re: Update of selection bevel
PostPosted: Thu Feb 06, 2014 1:41 am  (#64) 
Offline
GimpChat Member

Joined: Feb 05, 2014
Posts: 5
Thanks!

If it helps, I'm using Gimp 2.8.6, the standard build that comes with Ubuntu 13.10.


Top
 Post subject: Re: Update of selection bevel
PostPosted: Thu Feb 06, 2014 12:48 pm  (#65) 
Offline
GimpChat Member
User avatar

Joined: Mar 23, 2012
Posts: 7388
Location: Göteborg at last!
molly wrote:
There is a good tutorial by rod how to install python Aris.

Thanks Molly. I've got PC's package with instructions. I've done it twice before so it should be easy enough. :)


Top
 Post subject: Re: Update of selection bevel
PostPosted: Thu Feb 06, 2014 1:01 pm  (#66) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
yes I found it easy to follow, but then again if you had 2.8 it would be included. :teeth

_________________
Image


Top
 Post subject: Re: Update of selection bevel
PostPosted: Thu Feb 06, 2014 1:10 pm  (#67) 
Offline
GimpChat Member

Joined: Feb 05, 2014
Posts: 5
I'm working on my batch script now and noticed a pretty serious bug when running the plugin in non-interactive mode:
  File "/home/benr/.gimp-2.8/plug-ins/bevel2_3.py", line 141, in __init__
    fxlayer = self.makeLayer(img, drawable, lmode, upb, innerb, width, height, feather, shape, prenoise, preblur, azimuth, elevation, depth, postblur, opacity, gloss, ialphab )
NameError: global name 'feather' is not defined
batch command experienced an execution error:
Error: ( : 1) Procedure execution of python-fu-bevel failed

As indicated by the backtrace, the problem is that line 141 includes a "feather" variable that's not defined. It looks to me like there have been updates to the arguments that self.makeLayer accepts and this line was not updated as well.

So I fixed line 141 like so:
fxlayer = self.makeLayer(img, drawable, lmode, upb, innerb, width, height, shape, prenoise, azimuth, elevation, depth, postblur, opacity, gloss, ialphab )

That at least gets me past there. Now I'm trying to troubleshoot this failure:
/usr/lib/gimp/2.0/plug-ins/emboss: fatal error: Floating point exception
GIMP-Error: Calling error for procedure 'plug-in-emboss':
Procedure 'plug-in-emboss' returned no return values

[I had to cut out some portions of the backtraces to get phpBB to accept this post since I'm a new user]


Top
 Post subject: Re: Update of selection bevel
PostPosted: Thu Feb 06, 2014 1:22 pm  (#68) 
Offline
GimpChat Member
User avatar

Joined: Apr 07, 2010
Posts: 14182
one more post, then you can post the rest.

_________________
Image


Top
 Post subject: Re: Update of selection bevel
PostPosted: Thu Feb 06, 2014 1:38 pm  (#69) 
Offline
GimpChat Member

Joined: Feb 05, 2014
Posts: 5
Success! The problem I encountered with the floating point exception was passing "0" for depth. I found the correct default in the source.

I decided to just implement the hack in script-fu of resizing the image, selecting, bevelling, and cropping. If anyone's interested, here's the script (this is my first time ever writing Scheme BTW):
(define (batch-bevel pattern)
  (let* ((filelist (cadr (file-glob pattern 1))))
    (while (not (null? filelist))
      (let* ((filename (car filelist))
        (image (car (gimp-file-load RUN-NONINTERACTIVE
                     filename filename)))
        (drawable (car (gimp-image-get-active-layer image)))
        (width (car (gimp-image-width image)))
        (height (car (gimp-image-height image))))
        (gimp-image-resize image 438 334 10 10)
        (gimp-layer-resize-to-image-size drawable)
        (gimp-image-select-rectangle image
                 CHANNEL-OP-REPLACE
                 10
                 10
                 width
                 height)
        (python-fu-bevel RUN-NONINTERACTIVE
               image
               drawable
               SOFTLIGHT-MODE
               1
               1
               2
               2
               0
               0
               135
               30
               20
               3
               80
               0
               0)
        (set! drawable (car (gimp-image-flatten image)))
        (gimp-image-crop image
               width
               height
               10
               10)
        (gimp-file-save RUN-NONINTERACTIVE image drawable filename filename)
        (gimp-image-delete image))
      (set! filelist (cdr filelist)))))

The only problem is that I couldn't figure out how to do arithmetic, so the "438" and "334" are hardcoded dimensions where they should look something like (+ (width 20)) and (+ (height 20)), but that produces an "illegal function" error.


Top
 Post subject: Re: Update of selection bevel
PostPosted: Fri Feb 07, 2014 3:56 am  (#70) 
Offline
Script Coder

Joined: Apr 10, 2011
Posts: 532
divestoclimb, thanks a lot for reporting this. I've lately been busy with other software projects (non-GIMP related), but as soon as I have time I'll release a bugfix.

The bevel not working on fullsize image is unfortunately something that's caused by the way gaussian blur works in GIMP: it will not blur the edges of the image, and that's not something I can fix at this point. Resizing the image is a good workaround, it's what I do when I need to do full-page bevels. However, I might consider adding this workaround to the plugin, if I can figure out a good way to find out when the entire page is selected. Will have to look into that.


Top
Post new topic Reply to topic  [ 70 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group