2
$\begingroup$

I'm using bpy.

By copying Cube repeatedly, I get Cube.001 to Cube.999, and then Cube.1000 to Cube.9999, and then Cube.10000 to Cube.99999, etc.

Is there a way to change the name format of copied objects with bpy, so that I can get Cube.00001 to Cube.99999?

The motivation is that objects in bpy.data.objects[] are ordered by names. With Cube.001 to Cube.999, the indexes are the suffixes. However, when I get Cube.1000, it is inserted between Cube.100 and Cube.101 and the indexes of Cube.101 to Cube.999 are all offset by 1.

$\endgroup$
1
  • 1
    $\begingroup$ How are you copying them? Why not rename on copy? Re motivationt an object named "Bozo" will also muck up indices? $\endgroup$
    – batFINGER
    Feb 10, 2021 at 15:20

0

You must log in to answer this question.

Browse other questions tagged .