0
$\begingroup$

With the following minimal example:

test.py:

import bpy

bpy.ops.mesh.primitive_plane_add(size=1,
                                 location=(0, 0, 0))

Calling blender on the command gives:

$ blender --python test.py --background
Traceback (most recent call last):
  File "/home/here/test.py", line 4, in <module>
    location=(0, 0, 0))
  File "/usr/share/blender/scripts/modules/bpy/ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties: : keyword "size" unrecognized

Blender quit
$ blender -v
Blender 2.79 (sub 0)

Am I missing something ? Should I report this as a bug ?

$\endgroup$

1 Answer 1

3
$\begingroup$

The size argument doesn't exist for this operator in Blender 2.79, it's called radius.

Blender 2.79:

import bpy

bpy.ops.mesh.primitive_plane_add(radius=1, location=(0, 0, 0))

Blender 2.80:

import bpy

bpy.ops.mesh.primitive_plane_add(size=1, location=(0, 0, 0))

The following links take you to the documentation of the function in Blender 2.80 and Blender 2.79.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .