On a note to my previous idea of linking such a script to Blender3D:
If it is not possible for a script to be both a GIMP plugina a
blender script, anyway, a Bldenr Python Script can comunicate with a
GIMP plugin script via sockets or TCP with very little effort. The
major nuisance I see in this aproach is taht AFAIK blender takes full
screen for it, so I do not know you could keep a GIMP window open
over Blender for painting.
Gimp-developer mailing list