1

I want to create a plane and manipulate it further down the line. To store this object in a variable my code currently looks like that:

     bpy.ops.mesh.primitive_plane_add(enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(1,1,1))
     plane = bpy.data.objects["Plane"]

Which is jank as hell since it references the Plane by name. Say the script ran already or the user already added an object called plane, this code does not work.

How do I fix this?

quest-12
  • 143
  • 4

0 Answers0