Page MenuHome

2.93 beta breaks bpy.ops.mesh.primitive_grid_add
Closed, ResolvedPublicTO DO

Description

System Information
Operating system: Windows 10 Pro
Graphics card: GeForce MX250 (most probably irrelevant)

Blender Version
Broken: blender-2.93.0-06888a8970b7-windows64 (i.a. beta), as found on the splash screen)
Worked: blender-2.92.0-windows64 and before

Short description of error

The fix from https://developer.blender.org/T86168 breaks the bpy.ops.mesh.primitive_grid_add API. That change doesn't just affect the UI. So any Addon using that API now needs to make different calls depending on the blender version.

Exact steps for others to reproduce the error

Create a grid on blender up to 2.92.0 by running the following code in the Scripting workspace

import bpy
bpy.ops.mesh.primitive_grid_add(
            x_subdivisions=2,
            y_subdivisions=2,
        )

This creates a grid with a single face and no subdivisions.

1

Run the very same code on blender 2.93 beta

This now creates a grid with four faces and one subdivision each. Similar for larger number of subdivisions.

12
34

I certainly understand the motivation for this fix, but the API change might have been overlooked. I noticed it because it breaks one of my addons I was going to test with the beta.

Event Timeline

Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "To Do".

Dont think this will be considered a bug.

Besides the terminology issues already discussed in T86168 / rB4d3cdb32d399, this should be documented as a change in the release notes though:

https://wiki.blender.org/wiki/Reference/Release_Notes/2.93/Modeling
https://wiki.blender.org/wiki/Reference/Release_Notes/2.93/Python_API

@Pratik Borhade (PratikPB2123) : could you add this there?

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Thu, Apr 22, 10:35 AM

It's not about the terminology in the UI, but about an API change, which breaks Addons using that API.

It's not about the terminology in the UI, but about an API change, which breaks Addons using that API.

Yeah, I know, but I dont think API is guaranteed to stay the same forever? (it should be documented though for sure)