Skip to content

Blender 4.4: Python API & Text Editor

Breaking Changes

Blender-based Python Classes Construction

Python-defined classes based on Blender types (like Operator, PropertyGroup, etc.) that define their own __new__/__init__ constructors must now call the parent's matching function, and pass on generic positional and keyword arguments:

import bpy
class AwesomeRaytracer(bpy.types.RenderEngine):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        ...

Paint

  • paint.brush and paint.eraser_brush are now read-only properties. (9e8c037375)

GPU

  • When drawing with POLYLINE_FLAT_COLOR, POLYLINE_SMOOTH_COLOR or POLYLINE_UNIFORM_COLOR or when drawing wide lines (line width greater than 1) using FLAT_COLOR, SMOOTH_COLOR or UNIFORM_COLOR, the following rules now apply:

    • The pos attribute must use F32 format FLOAT fetch type.
    • The color attribute must use F32 format with FLOAT fetch type or use U8 with 4 components and INT_TO_FLOAT_UNIT for fetch mode.
    • Each attribute needs to be 4 byte aligned.
    • Primitive type needs to be GPU_PRIM_LINES, GPU_PRIM_LINE_STRIP or GPU_PRIM_LINE_LOOP.
    • If drawing using an index buffer, it must contain no primitive restart index.

Grease Pencil

  • The influence vertex group was removed from the Texture Mapping modifier (c452d5d9e8)

Sequencer

  • The bpy.types.Sequence and all related types got renamed to bpy.types.Strip. See the full list here.
  • Text strip align_x and align_y were renamed to anchor_x and anchor_y. Property alignment_x does proper alignment now. (77a5478c0f)

Additions

Grease Pencil

The Grease Pencil Python API got some new functionality. See the changes here.

Curves

  • New Curves.reorder_curves(new_indices=[...]) to reorder curves. (a265b591be)
  • New Curves.set_types() to change curve types (5db88ff2e3).

Nodes

  • New Node.color_tag property, which returns an enum item corresponding to the node color tag (Texture, Vector, Output, etc...) (6cd33510c3)
  • New bl_use_group_interface property on custom node trees that allows disabling some built-in UI for node groups (ebfbc7757b).

Blender as a Python Module

The bpy package on pypi now optionally provides access to VFX libraries used by Blender. (PR#133082)

While most are available as separate packages on pypi, they may not have the same version or build options as Blender. This can lead to errors and crashes when interchanging data with Blender.

import bpy

# Add Blender bundled VFX libraries to sys.path.
bpy.utils.expose_bundled_modules()

# Import the library you need.
import pxr
import MaterialX
import OpenImageIO
import PyOpenColorIO
import pyopenvdb