python scripts not working (2.3.8/linux)

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

 



when trying the pygimp->sphere.py, I get an error message

PDB calling error for procedure 'gimp-context-set-foreground':
Argument 'foreground' (#1, type GimpRGB) out of bounds
(validation changed '<not transformable to string>'

I tracked this down to this: gimpmodule.c:
pygimp_set_foreground(PyObject *self, PyObject* args) {
GimpRGB colour;
...
gimp_rgb_set_uchar(&colour, r, g, b);
gimp_context_set_background(&colour);
...
}

it looks like the "colour" is not correctly initialized
(the "a" member is not initialized)
adding a " gimp_context_get_background(&colour);"
before makes pygimp work again...

I wonder what the best way to fix this would be:

bzero(colour)
memset(&colour, 0, sizeof(colour));
colour->a = 0; // in gimp_rgb_set_uchar()

-- lode


_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[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