Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Layer Group set active
#2
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.
Reply


Messages In This Thread
Layer Group set active - by david - 05-17-2023, 08:36 PM
RE: Layer Group set active - by Ofnuts - 05-17-2023, 09:17 PM
RE: Layer Group set active - by teapot - 05-17-2023, 11:21 PM
RE: Layer Group set active - by david - 05-18-2023, 08:31 AM
RE: Layer Group set active - by Ofnuts - 05-18-2023, 09:47 AM

Forum Jump: