Python plugin dev: getting picked color from gimpui.PickButton.color-picked event callback?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



My goal is to write behavior where a click on my special pick button will

1. Modify layer visibility
2. Run the normal pick tool
3. Do something with the picked color

I'm trying to do this as a Python plugin so I'm trying to implement this
using `gimpui.PickButton` and adding event callbacks for `clicked` and
`color-picked`. I'm using `pydoc gimpui` as a reference.

Unfortunately the Python API apparently has obscured the color data
structure that gets passed to the `color-picked` event callback. It passes
it as a `gobject.gpointer` which is just an intractable pointer (see
http://developer.gimp.org/api/2.0/libgimpwidgets/GimpPickButton.html#GimpPickButton-color-pickedand
https://developer.gnome.org/glib/2.37/glib-Basic-Types.html#gpointer). I
don't know of any way to pull out the triple double union in Python.

A simpler solution would be to simply "activate" the standard color picker,
but I can't figure out how to do that with the API available. I would
appreciate any help and/or ideas on this.

Thanks!

Viet
_______________________________________________
gimp-developer-list mailing list
List address:    gimp-developer-list@xxxxxxxxx
List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list
List archives:   https://mail.gnome.org/archives/gimp-developer-list




[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux