In my script I want to create new text data-block using bpy.ops.text.new
, but I don’t see any way to specify the name of the data-block it creates. I also don’t see a way to get the name of the newly created data-block (e.g. Text
, Text.001
).
I can of course write a quick loop to find the data-block named Text | Text.NNN
where NNN
is the highest three-digit natural number. But this seems clumsy. Am I missing something?