[Gimp-developer] Python plugin dev: getting picked color from gimpui.PickButton.color-picked event callback?
- From: Viet Nguyen <vietjtnguyen gmail com>
- To: gimp-developer-list gnome org
- Subject: [Gimp-developer] Python plugin dev: getting picked color from gimpui.PickButton.color-picked event callback?
- Date: Wed, 5 Feb 2014 15:20:19 -0800
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]