Sign up now! · Forgot password?
RSS/Atom feed identi.ca Twitter

How to get color tag of layer in python plugin script?

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

10 of 10 messages available
Toggle history

Please log in to manage your subscriptions.

How to get color tag of layer in python plugin script? John Tapsell 22 Feb 02:16
  How to get color tag of layer in python plugin script? Carol Spears 22 Feb 02:32
   How to get color tag of layer in python plugin script? John Tapsell 22 Feb 02:36
   How to get color tag of layer in python plugin script? John Tapsell 22 Feb 02:38
    How to get color tag of layer in python plugin script? Partha Bagchi 22 Feb 02:53
     How to get color tag of layer in python plugin script? Carol Spears 22 Feb 03:18
      How to get color tag of layer in python plugin script? John Tapsell 23 Feb 00:37
       How to get color tag of layer in python plugin script? Carol Spears 23 Feb 01:57
        How to get color tag of layer in python plugin script? John Tapsell 23 Feb 04:06
         How to get color tag of layer in python plugin script? Carol Spears 23 Feb 20:36
John Tapsell
2018-02-22 02:16:20 UTC (10 months ago)

How to get color tag of layer in python plugin script?

Hi,

How can I get the color tag of a layer in a python plugin script please?

John

Carol Spears
2018-02-22 02:32:04 UTC (10 months ago)

How to get color tag of layer in python plugin script?

On Wed, Feb 21, 2018 at 9:16 PM, John Tapsell wrote:

Hi,

How can I get the color tag of a layer in a python plugin script please?

Not sure what you mean by "color tag" but the color picker can be invoked with:
color = pdb.gimp_image_pick_color(image, drawable, x, y, sample_merged, sample_average, average_radius)

carol

John Tapsell
2018-02-22 02:36:58 UTC (10 months ago)

How to get color tag of layer in python plugin script?

For each layer you can assign a 'color tag' in the properties dialog. They don't affect the image, but artists use them to mark layers.

On 22 Feb 2018 11:32 am, "Carol Spears" wrote:

On Wed, Feb 21, 2018 at 9:16 PM, John Tapsell wrote:

Hi,

How can I get the color tag of a layer in a python plugin script please?

Not sure what you mean by "color tag" but the color picker can be invoked with:
color = pdb.gimp_image_pick_color(image, drawable, x, y, sample_merged, sample_average, average_radius)

carol

John Tapsell
2018-02-22 02:38:43 UTC (10 months ago)

How to get color tag of layer in python plugin script?

Here's a screenshot :

https://goo.gl/images/FE4f5M

On 22 Feb 2018 11:32 am, "Carol Spears" wrote:

On Wed, Feb 21, 2018 at 9:16 PM, John Tapsell wrote:

Hi,

How can I get the color tag of a layer in a python plugin script please?

Not sure what you mean by "color tag" but the color picker can be invoked with:
color = pdb.gimp_image_pick_color(image, drawable, x, y, sample_merged, sample_average, average_radius)

carol

Partha Bagchi
2018-02-22 02:53:52 UTC (10 months ago)

How to get color tag of layer in python plugin script?

According to ./libgimp/gimpitem_pdb.c:879, gimp_item_get_color_tag gets the color tag of the specified item.

Does that help?

On Wed, Feb 21, 2018 at 9:38 PM, John Tapsell wrote:

Here's a screenshot :

https://goo.gl/images/FE4f5M

On 22 Feb 2018 11:32 am, "Carol Spears" wrote:

On Wed, Feb 21, 2018 at 9:16 PM, John Tapsell

wrote:

Hi,

How can I get the color tag of a layer in a python plugin script

please?

Not sure what you mean by "color tag" but the color picker can be invoked with:
color = pdb.gimp_image_pick_color(image, drawable, x, y, sample_merged, sample_average, average_radius)

carol

_______________________________________________ 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

Carol Spears
2018-02-22 03:18:14 UTC (10 months ago)

How to get color tag of layer in python plugin script?

On Wed, Feb 21, 2018 at 9:53 PM, Partha Bagchi wrote:

According to ./libgimp/gimpitem_pdb.c:879, gimp_item_get_color_tag gets the color tag of the specified item.

Does that help?

color_tag = pdb.gimp_item_get_color_tag(item)

I noticed that the layers dialog got really large. Thanks for the pointer!

carol

>> 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
>>
>
>
John Tapsell
2018-02-23 00:37:03 UTC (10 months ago)

How to get color tag of layer in python plugin script?

Thanks! It would be cool if it was a property on the layer itself in python, and if there was a version that returned the actual colour name instead of a number. (there isn't, right?)

On 22 Feb 2018 12:18, "Carol Spears" wrote:

On Wed, Feb 21, 2018 at 9:53 PM, Partha Bagchi wrote:

According to ./libgimp/gimpitem_pdb.c:879, gimp_item_get_color_tag gets the color tag of the specified item.

Does that help?

color_tag = pdb.gimp_item_get_color_tag(item)

I noticed that the layers dialog got really large. Thanks for the pointer!

carol

_______________________________________________

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

Carol Spears
2018-02-23 01:57:47 UTC (10 months ago)

How to get color tag of layer in python plugin script?

On Thu, Feb 22, 2018 at 7:37 PM, John Tapsell wrote:

Thanks! It would be cool if it was a property on the layer itself in python, and if there was a version that returned the actual colour name instead of a number. (there isn't, right?)

/Filers/Python Fu/Console has a browser button that gives a

searchable list of what can be done. I suggest that you search for "tag".

carol

John Tapsell
2018-02-23 04:06:22 UTC (10 months ago)

How to get color tag of layer in python plugin script?

On 23 Feb 2018 10:57, "Carol Spears" wrote:

On Thu, Feb 22, 2018 at 7:37 PM, John Tapsell wrote:

Thanks! It would be cool if it was a property on the layer itself in python, and if there was a version that returned the actual colour name instead of a number. (there isn't, right?)

/Filers/Python Fu/Console has a browser button that gives a

searchable list of what can be done. I suggest that you search for "tag".

Thanks - I don't see anything other than the get and set function, so I think this confirms that there is no method for getting the color tag as a string. This is something that needs to be converted manually I think.

Carol Spears
2018-02-23 20:36:21 UTC (10 months ago)

How to get color tag of layer in python plugin script?

On Thu, Feb 22, 2018 at 11:06 PM, John Tapsell wrote:

On 23 Feb 2018 10:57, "Carol Spears" wrote:

On Thu, Feb 22, 2018 at 7:37 PM, John Tapsell wrote:

Thanks! It would be cool if it was a property on the layer itself in python, and if there was a version that returned the actual colour name instead of a number. (there isn't, right?)

/Filers/Python Fu/Console has a browser button that gives a

searchable list of what can be done. I suggest that you search for "tag".

Thanks - I don't see anything other than the get and set function, so I think this confirms that there is no method for getting the color tag as a string. This is something that needs to be converted manually I think.

I was pleased to find that the new Layers Dialog is not just a pretty face....

carol