05-17-2023, 09:17 PM
In script-fu you can use (gimp-image-set-active-layer image active-layer), in Python pdb.gimp_image_set_active_layer(image, active_layer), but the active_layer attribute of a gimp.Image object is writable: image.active_layer=image.layers[1].
However the "active layer" is a human user thing. All the functions that apply to a layer take an explicit layer parameter so there is little point in changing the active layer. The only thing I would use this for is to change the active layer before returning control to the user, assuming it is not what the user would expect.
However the "active layer" is a human user thing. All the functions that apply to a layer take an explicit layer parameter so there is little point in changing the active layer. The only thing I would use this for is to change the active layer before returning control to the user, assuming it is not what the user would expect.