Page MenuHome

Blender 3.0 (Python API deprecation, updates)
Confirmed, NormalPublicDESIGN

Description

This task is intended to track breaking changes to be made for Blender 3.0

  • Remove deform argument from BMesh.from_object (already listed as deprecated).
  • Remove active_base (bpy.context.active_base)

    All other access to the Base structure was removed, it seems this was left in by accident. None of the scripts or add-ons distributed with Blender use this.
  • Remove IDPropertyGroup.iteritems

    Rename the current iteritems method to items.

    This was a hang-over from Python 2.x which used both methods for dictionary types, now defaulting to the iterable version in Python 3.0.
  • Remove deprecated wiki_url handling from add-on's bl_info in favor of doc_url.

Open Topics:

  • T80730: BGL deprecation (the GPU module needs to be further developed before a decision is made).
  • Use keyword only arguments in the C/API, to avoid breaking scripts when changing arguments.

    This change has already been applied to the RNA API, however some manual argument parsing doesn't use this.

    see PyArg_ParseTupleAndKeywords (use regex "\"[^\n\|]\|[^\$][^\n]*\"," to find these cases).

Event Timeline

I would definitively also include the keyword-only change in 3.0...

Suggestion for possible 3.0 change:

BMesh operators bmesh.ops.duplicate and bmesh.ops.split both have an unimplemented parameter, 'dest', which is meant to provide the option to duplicate or split a section of mesh into another destination bmesh.

Either the destination mesh argument should be implemented (which would be my preferred outcome) or removed since right now it provides no benefit at best and serves to create confusion at worst (especially since the API docs don't mention they aren't implemented, I only discovered it myself recently while writing an addon).