Reference/Release Notes/3.3/Python API

Python API & Text Editor

Bundled Python

Text Editor

Background Jobs

New possibilities to get the status of rendering & baking jobs in Python (rBf4456a4d):

  • New function, which takes "RENDER", "RENDER_PREVIEW", or "OBJECT_BAKE" as job_type parameter. It returns a boolean to indicate whether a job of that type is currently running. It is intentional that only a subset of all of Blender's job types are supported here. That way, those "hidden" jobs are kept as they are currently: an internal detail of Blender, rather than a public, reliable part of the API. In the future, the list of supported job types can be expanded on a case-by-case basis, when there is a clear and testable use case.
  • New app handlers object_bake_pre, object_bake_complete, object_bake_canceled that signal respecively that an object baking job has started, completed, or was cancelled.
  • Expose events type_prev & value_prev members (2580d2bab5).

Other Additions

  • bpy.props.StringProperty supports a search & search_options arguments to support showing candidates when editing string properties. (3f3d82cfe9)
  • XR: Expose OpenXR user paths in XR event data (XrEventData.user_path/user_path_other) (23be3294ff).
  • ID Management: Add utility functions for getting a list of IDs referenced by a given one. (26d375467b) Here's an example use case:
from bpy_extras.id_map_utils import get_id_reference_map, get_all_referenced_ids

def suffix_dependents(object: bpy.types.Object, recursive=True, suffix: str):
    """Append suffix the names of datablocks used by an object, including itself."""
    ref_map = get_id_reference_map()
    if recursive:
        # Get all IDs referenced by a Blender Object: Its Mesh, Shape Key, Materials, Textures, Node Graphs, etc.
        datablocks = get_all_referenced_ids(collection, ref_map)
        # Get only directly referenced IDs: Its Mesh and any IDs referenced via Custom Properties.
        datablocks = ref_map[object]

    datablocks.add(object) # The object itself is not already included.
    for db in datablocks: += suffix
  • Add VSE API function to select displayed meta strip. (6b35d9e6fb)

Other Changes

  • The blend_render_info module now supports reading Z-standard compressed blend files. (b3101abcce).

Breaking Changes

  • SoundSequence.pitch is replaced with speed_factor property. This property is available also for other non-effect strips to control their playback speed.