[Gimp-developer] Python-fu GIMP Layer "parent" property error

2014-06-18 Thread Seldom Needy
As stated at http://www.gimp.org/bugs/ I'm supposed to mention issues
here before throwing them into the tracker so here goes.

Working on a plugin that does some layer manipulation and kept
encountering the error:
AttributeError: 'gimp.Layer' object has no attribute 'layers'
when trying to access the layer structure in a tree-like fashion to
find "sibling" layers in the same grouplayer/layergroup. After being
puzzled, I found the issue, which seems to essentially be that the
"parent" attribute of a layer automatically "upcasts" to gimp.Layer,
rather than yielding a gimp.GroupLayer, as I think should be expected.

The behavior can be reproduced as follows from Python console in GIMP 2.8.8:
>>> image = gimp.image_list()[0]
>>> image.layers[0].layers[0].parent.layers # again with the result:
AttributeError: 'gimp.Layer' object has no attribute 'layers'

Assuming an image's layer-structure is similar to:
[root image]
+GROUPLAYER ZERO
++LAYER ZERO OF ZERO
+GROUPLAYER ONE
++LAYER ZERO OF ONE
++LAYER ONE OF ONE
+LAYER BACKGROUND

>From the console we have a hint as to why this is.
>>> image.layers[0]

>>> image.layers[0].layers[0].parent # should return the same layer as above 
>>> but gives


I haven't seen this on the bugtracker nor was I able to find
discussion about it on the listserv archive. I assume it is a
platform-independent bug. Can anyone confirm that? I develop on
Windows XP at present.

Workarounds for this bug exist I'm not in love with them (inelegant).
Regardless, a sketch of what might work without using globals:

def get_all_layers(parent):
"""-> list. recursively get all layers from either an image, or a GroupLayer
Proceeds depth-first.
"""
container=[]
for layer in parent.layers:
container.append(layer)
if hasattr(layer,"layers"):
container.extend( get_all_layers(layer) )
return container

def get_parent(child):
if hasattr(child,"parent"):
for layer in get_all_layers(child.image):
if layer.name==child.parent.name: return layer
#^ layer will have the proper data-type of
gimp.GroupLayer, so return it.
#^.. We do this because child.parent yields a gimp.Layer,
which is undesired.
else:
return child.image # if we're already top-level, parent must
just be the image.

Cheers
- Seldom
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


[Gimp-developer] Cyclic layer-group error when moving linked layers

2014-08-29 Thread Seldom Needy
I'll need someone else to confirm this in the recent builds to see if it's
still there, but in GIMP 2.8.8, I've found a small issue (tested on Windows
XP).

Using the following arrangement of layers and parent-layers (GroupLayers),
users can make the processor chug, and may experience unexpected behavior.
Below, the prefix (X) means unlinked, and (L) will mean linked.

__[root image]
(X)+BIG GROUP
(L)++LITTLE GROUP
(L)+++LITTLE LAYER ONE
(L)+++LITTLE LAYER TWO
(L)+++LITTLE LAYER THREE
(X)++BIG BACKGROUND LAYER
(X)+ROOT BACKGROUND LAYER

Upon using the move-tool on any "grabbable" pixel of a linked layer (via
move's "Pick a Layer or Guide" option), and trying to drag in some
direction, the linked layers will drift apart or reset to arbitrary
positions, independent of eachother.

This is contrary to the way that linked layers should behave, and
ostensibly uses unnecessary processing as well, as program stability and
responsiveness seems to decrease as this action is performed. This is
probably an artifact from before GroupLayer was an option, back when all
layers in link-mode could be handled uniformly.

To resolve this issue, I imagine checking for *contained-by* and
*contains *relationships,
and doing more work when the user sets or unsets the "link" option for
layers would solve the problem. If this operation takes noticeable time, it
could be done first either when a transformation involving the linked
layers occurs, or when the dockable Layers-pane looses focus following a
period of link-toggling by the user there. It might remain stored until a
delete or link-settings change occurs again.

Regards
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] Cyclic layer-group error when moving linked layers

2014-09-02 Thread Seldom Needy
On Fri, Aug 29, 2014 at 1:22 PM, Seldom Needy  wrote:
> I'll need someone else to confirm this in the recent builds to see if it's
> still there, but in GIMP 2.8.8, I've found a small issue (tested on Windows
> XP).
>
> Using the following arrangement of layers and parent-layers (GroupLayers),
> users can make the processor chug, and may experience unexpected behavior.
> Below, the prefix (X) means unlinked, and (L) will mean linked.
>
> __[root image]
> (X)+BIG GROUP
> (L)++LITTLE GROUP
> (L)+++LITTLE LAYER ONE
> (L)+++LITTLE LAYER TWO
> (L)+++LITTLE LAYER THREE
> (X)++BIG BACKGROUND LAYER
> (X)+ROOT BACKGROUND LAYER
>
> Upon using the move-tool on any "grabbable" pixel of a linked layer (via
> move's "Pick a Layer or Guide" option), and trying to drag in some
> direction, the linked layers will drift apart or reset to arbitrary
> positions, independent of eachother.
>
> This is contrary to the way that linked layers should behave, and ostensibly
> uses unnecessary processing as well, as program stability and responsiveness
> seems to decrease as this action is performed. This is probably an artifact
> from before GroupLayer was an option, back when all layers in link-mode
> could be handled uniformly.
>
> To resolve this issue, I imagine checking for contained-by and contains
> relationships, and doing more work when the user sets or unsets the "link"
> option for layers would solve the problem. If this operation takes
> noticeable time, it could be done first either when a transformation
> involving the linked layers occurs, or when the dockable Layers-pane looses
> focus following a period of link-toggling by the user there. It might remain
> stored until a delete or link-settings change occurs again.
>
> Regards

For the record, I've added this to the tracker via at
https://bugzilla.gnome.org/show_bug.cgi?id=735906
Report includes a file which should allow the error to be recreated.
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] Gimp just shows up as gray rectangle with rulers around

2014-09-10 Thread Seldom Needy
>
> Message: 2
> Date: Tue, 9 Sep 2014 21:17:30 -0700
> From: YUMIKO 
> To: "gimp-developer-list@gnome.org" 
> Subject: [Gimp-developer] Gimp just shows up as gray rectangle with
> rulers  around
> Message-ID: 
> Content-Type: text/plain; charset="iso-8859-1"
>
> HI\I am a mac user and my os is o mavarick.I downloaded gimp and opened it
> up to find the gray rectangle with gimp logo in the middle and rulers
> around.There are no bottuns to edit photos at all, nothing.
> Can you help me?
> Yumiko
>
> **
>

I'm not tremendously familiar with the shortcuts and interface as they
exist on Mac systems. If you've already tried uninstalling and reinstalling
and are getting the same behavior, it might be that you've got some odd
settings making their way into your configuration initially, and you just
need to overwrite them.

This may fail if the menubar is hidden, but on Windows, F10 raises the File
menu, after which it should be possible to navigate over with arrow keys
(or mouse?) and re-open any dialogs which have been hidden (Window menu's
dropdown). If it gives you a Recently Closed list, then great... if not,
then Layers, Channels, Paths, Tools, and Toolbox dialogs are the most
commonly used.

Right-clicking will give the same options as the top menubar, for me, even
with no image open.

The Tab key hides all dialogs except for the main window, so try tapping
that to see what happens.

Most View settings, such as Hide/unhide Menubar are disabled until you are
editing a piece, so you may ⌘O or ⌘N to open an existing piece or create a
new one after specifying dimensions.

If you're getting any response from keyboard shortcuts, the user settings
for your install are probably just weird, but should save on exit if you
change it to a layout you like.

If no shortcuts or menus are working, you may have a bad install,
program-conflicts, registry-issues, missing dependencies, etc. Let us know
the symptoms.
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


[Gimp-developer] Someone is using the gimp name and icon in the apple App Store.

2014-09-20 Thread Seldom Needy
On Sat, Sep 20, 2014 at 8:00 AM, 
wrote:

> Send gimp-developer-list mailing list submissions to
> gimp-developer-list@gnome.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mail.gnome.org/mailman/listinfo/gimp-developer-list
> or, via email, send a message with subject or body 'help' to
> gimp-developer-list-requ...@gnome.org
>
> You can reach the person managing the list at
> gimp-developer-list-ow...@gnome.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gimp-developer-list digest..."
>
>
> Today's Topics:
>
>1.  Someone is using the gimp name and icon in the   apple App
>   Store. (Graig Smith)
>2. Re:  Someone is using the gimp name and icon in the apple App
>   Store. (Michael Schumacher)
>
>
> --
>
> Message: 1
> Date: Thu, 18 Sep 2014 21:03:35 -0500
> From: Graig Smith 
> To: "gimp-developer-list@gnome.org" 
> Subject: [Gimp-developer] Someone is using the gimp name and icon in
> the apple App Store.
> Message-ID: <8640501e-4ffd-4dba-bed9-f00c432c5...@me.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Just thought you might want to know. Someone is using the icon and gimp
> name in an app on the App Store.
>
> Awesome GIMP Photo Editor Pro by Amit Chaudhary
> https://appsto.re/us/UvugT.i
>
>
> -- next part --
>
>
>
> --
>
> Message: 2
> Date: Fri, 19 Sep 2014 23:04:17 +0200
> From: Michael Schumacher 
> To: gimp-developer-list@gnome.org
> Subject: Re: [Gimp-developer] Someone is using the gimp name and icon
> in the apple App Store.
> Message-ID: <541c9a51.1040...@gmx.de>
> Content-Type: text/plain; charset=windows-1252
>
> On 19.09.2014 04:03, Graig Smith wrote:
> > Just thought you might want to know. Someone is using the icon and gimp
> name in an app on the App Store.
> >
> > Awesome GIMP Photo Editor Pro by Amit Chaudhary
> > https://appsto.re/us/UvugT.i
>
> Yeah, this was ongoing for some time. After I started to lose faith in
> Apple's common sense, they finally sent this today:
>
> "We have removed the app listed below from the App Store.  Please allow
> some time for our systems to refresh.  We trust that this resolves your
> concerns."
>
>
> --
> Regards,
> Michael
> GPG: 96A8 B38A 728A 577D 724D 60E5 F855 53EC B36D 4CDD
>
>
> --
>
> Subject: Digest Footer
>
> ___
> gimp-developer-list mailing list
> gimp-developer-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gimp-developer-list
>
>
> --
>
> End of gimp-developer-list Digest, Vol 36, Issue 18
> ***
>
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] Someone is using the gimp name and icon in the apple App Store

2014-09-20 Thread Seldom Needy
>> From: Graig Smith 
>> To: "gimp-developer-list@gnome.org" 
>> Subject: [Gimp-developer] Someone is using the gimp name and icon in
>> the apple App Store.
>> Message-ID: <8640501e-4ffd-4dba-bed9-f00c432c5...@me.com>
>> Content-Type: text/plain; charset="us-ascii"
>>
>> Just thought you might want to know. Someone is using the icon and gimp name 
>> in >an app on the App Store.
>>
>> Awesome GIMP Photo Editor Pro by Amit Chaudhary
>> https://appsto.re/us/UvugT.i

> From: Michael Schumacher 
> To: gimp-developer-list@gnome.org
> Subject: Re: [Gimp-developer] Someone is using the gimp name and icon
> in the apple App Store.
> Message-ID: <541c9a51.1040...@gmx.de>
> Content-Type: text/plain; charset=windows-1252
>
> Yeah, this was ongoing for some time. After I started to lose faith in
> Apple's common sense, they finally sent this today:
>
> "We have removed the app listed below from the App Store.  Please allow
> some time for our systems to refresh.  We trust that this resolves your
> concerns."
>
>
> --
> Regards,
> Michael

I take it it wasn't a *FREE* app, is that right? (Or even really
anything to do with GIMP...) Otherwise even a semi-featured port of
GIMP as a mobile application for iOS wouldn't be so bad.
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


[Gimp-developer] Placing grid on half-pixels using the offset

2014-10-07 Thread Seldom Needy
Is there a strong reason for fractional offsets (even +0.5) in the
grid-configuration dialog being prevented? I'm working on a layout at
present and I've noticed this limitation...

Due to the snapping behavior of brushes, it's sometimes helpful to be able
to draw/erase/smear/etc along the *middle* of a pixel if -- say -- I'm
working with a border or divider-set which is 5 pixels wide. If I can have
the pixel immediately under the cursor be centered where the middle pixel
will be, I neatly get the remaining four pixels of the current tool's
height/width symmetrically on either side... Otherwise I have to rely on
rounding-behavior or constantly doing an additional transformation after
each change in this part of the work.

Other than having to change one field from "int" to "float", is there a
good reason not to add this tweak for those who want it? By default, it
would not be available unless someone specifically input a fraction into
the grid-settings anyway.
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] Test images and test suite

2014-11-12 Thread Seldom Needy
> http://www.pixl.dk/download/ (first link)
> I'm not sure how that [license] would relate to a project like GIMP, and it 
> appears we'd need a German speaker to even ask.

For the record (if I'm not sorely mistaken), that's Dansk/Danish up
there at the top (not German). Just so nobody too-swiftly goes barking
up the right tree in the wrong language.
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


[Gimp-developer] Exporting Keyboard shortcuts (key bindings/accelerators)

2015-02-11 Thread Seldom Needy
I run GIMP on both work and home computers, and depending on the task at
hand, this sometimes leads me to come up with a better key-configuration
which I'd like to keep using across all installs of GIMP which I have.

Anyways, forgive me if this question has been asked before, but aside from
just running GIMP from a flash drive...

I was wondering about the operation of importing and exporting keyboard
shortcuts for GIMP. In other open-source softwares (say Blender or Komodo)
this is relatively simple either from within the program or just via
copying some stuff from application folders or /opt. As far as I'm aware
for gimp though, this isn't built-in, nor are there extensions for doing
it, so failing that, where precisely are these records stored? (Feel free
to list all of them if you'd like, but the machines in question for me are
all Win7 and Win8.)

Thanks!
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list


Re: [Gimp-developer] Exporting Keyboard shortcuts (key bindings/accelerators)

2015-02-11 Thread Seldom Needy
On Wed, Feb 11, 2015 at 1:47 PM, Chris Mohler  wrote:
>
> On Wed, Feb 11, 2015 at 2:13 PM, Seldom Needy  wrote:
> > I was wondering about the operation of importing and exporting keyboard
> > shortcuts for GIMP. In
>
> See the note at the very bottom of this page:
> http://docs.gimp.org/en/gimp-concepts-shortcuts.html
>
> Basically, you should be able to copy the menurc file from one machine
> to the other.
>
> Chris

>From the linked article:

"Custom Keyboard shortcuts are stored in one of Gimp's hidden
directory (/home/[username]/.gimp-2.8/menurc) under Linux, and
C:\Documents and Settings\[Username]\.gimp-2.8\menurc under Windows
XP. It is a simple text file that you can transport from one computer
to another."

As stated, I was looking to port keyboard customizations in Windows 7
and 8, which are not explicitly documented (unlike XP). But, having
searched my hard drive with the hint, I found a menurc in the location
C:\Program Files\GIMP 2_8\etc\gimp\2.0\menurc

I imagine it's the same arrangement, barring that the paths are a bit
different. I will go ahead and test that theory tomorrow. Especially
if it works, the gimp.org docs should be updated to reflect that
information after such time. I'm not sure if the docs are maintained
community wiki-style or not, I can at least put in a bug-report about
it if need be.

Thanks.
___
gimp-developer-list mailing list
List address:gimp-developer-list@gnome.org
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list