I am writing a script for applying a particle system on Blender. In the options I want to set a solid primitive cube as the duplicate object, however I can't figure out how to do it without creating a cube in the scene first. Is there a way to do this or must I create the cube as well? If so, I want to be able to delete it after applying the transformation. This is the code I have that does not work:
settings.dupli_object = bpy.data.objects.get("Cube")
If there is no "Cube" to reference in blender's database, what would the syntax be for creating it with the name "Cube" and then deleting it after the transformation is applied?