Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Concatenate a layer name with fixed text and variables
#1
Question 
Hi all,

I'm learning Python as I go along in the Gimp. Can somebody get me going on this one please?

I have a few variables loaded with figures. (blur is for example 10 and contrast 0.15). I would like to set a layer name, so that later I can save the layer with a filename based on the layer name.

But how do I combine fixed text and variables? It must be something like this, but how exactly?

Code:
pdb.gimp_item_set_name(new_layer, "Blur "+{blur}+"contrast "+{contrast})

I would like the layer name to be "Blur 10 contrast 0.15".

I also tried with "&" but that didn't work either. Nor did it without the "{}".

Am I close? Thanks!  Smile
Reply


Messages In This Thread
Concatenate a layer name with fixed text and variables - by tkemmere - 02-11-2023, 05:24 PM

Forum Jump: