Primitive_uv_sphere_add - keyword "size" unrecognized


I was just working through Dr. Sybren Stüvel’s excelleant tutorials,

And running this command in the console:

>>> bpy.ops.mesh.primitive_uv_sphere_add(size=1, location=(1,2,3))

Got the responses:

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "G:\PortableAps\PortableApps\BlenderPortable\App\Blender64\2.92\scripts\modules\bpy\", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties: : keyword "size" unrecognized

I had a look at the current Blender Python API and size is still listed as valid.

Running leaving size out and using location= dah dah works fine.

This also work fine…

Is this an undocumented change or are there notes elsewhere please?


Blender Version:
2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: 02948a2cab44,
type: Release
build date: 2021-02-25, 09:31:14

binary path: ‘G:\PortableAps\PortableApps\BlenderPortable\App\Blender64\2.92\python\bin\python.EXE’
version: Python 3.7.7

From within the Python Console just type the part until the “(” and then press the “Tab” key for autocomplete to reveal the rest.

Thanks for that.

So as your image shows, has size been removed since the tutorial I mention was written?

The current full API is back online now after the hack.

So in the tutorials you just have to expect that things may have changed a bit then.


1 Like