2.93 beta breaks bpy.ops.mesh.primitive_grid_add #87700

Closed
opened 2021-04-22 10:12:57 +02:00 by Wolfgang Strobl · 9 comments

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.

1 2
3 4

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.

**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. | 1 | 2 | | -- | -- | | 3 | 4 | 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.

Added subscriber: @ws01

Added subscriber: @ws01
Member

Added subscribers: @PratikPB2123, @lichtwerk

Added subscribers: @PratikPB2123, @lichtwerk
Pratik Borhade was assigned by Philipp Oeser 2021-04-22 10:34:51 +02:00
Member

Dont think this will be considered a bug.

Besides the terminology issues already discussed in blender/blender#86168 / blender/blender@4d3cdb32d3, 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

@PratikPB2123 : could you add this there?

Dont think this will be considered a bug. Besides the terminology issues already discussed in blender/blender#86168 / blender/blender@4d3cdb32d3, 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 @PratikPB2123 : could you add this there?
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

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.
Member

In #87700#1150290, @ws01 wrote:
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)

> In #87700#1150290, @ws01 wrote: > 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)
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Member

The API breakage is intentional I added it to the release notes: https://wiki.blender.org/wiki/Reference/Release_Notes/2.93/Python_API#Other_changes

The API breakage is intentional I added it to the release notes: https://wiki.blender.org/wiki/Reference/Release_Notes/2.93/Python_API#Other_changes
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-manual#87700
No description provided.