Reference/Release Notes/3.3/Python API
Python API & Text Editor
New possibilities to get the status of rendering & baking jobs in Python (rBf4456a4d):
bpy.app.is_job_running(job_type)function, which takes
job_typeparameter. 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_canceledthat signal respecively that an object baking job has started, completed, or was cancelled.
search_optionsarguments to support showing candidates when editing string properties. (3f3d82cfe9)
- XR: Expose OpenXR user paths in XR event data (
- 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) else: # 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: db.name += suffix
- Add VSE API function to select displayed meta strip. (6b35d9e6fb)
mathutils.Matrix.is_identityread-only attribute to check for an identity matrix. (133d398120)
FCurveKeyframePoints.clear()to delete all keyframe points of an FCurve (rB4812eda3).
- Add Event
blend_render_infomodule now supports reading Z-standard compressed blend files. (b3101abcce).
- The API for adding context menu entries has changed. Instead of manually registering
WM_MT_button_context, draw functions should be appended to
UI_MT_button_context_menu, which is registered by Blender itself. The old API is still available for compatibility, but is deprecated and will be removed in a future release, therefore addons should update to the new API. (8a799b00f8)
### Old API ### class WM_MT_button_context(Menu): bl_label = "Unused" def draw(self, context): layout = self.layout layout.separator() layout.operator("some.operator") def register(): bpy.utils.register_class(WM_MT_button_context) def unregister(): bpy.utils.unregister_class(WM_MT_button_context) ### New API ### # Important! `UI_MT_button_context_menu` *must not* be manually registered. def draw_menu(self, context): layout = self.layout layout.separator() layout.operator("some.operator") def register(): bpy.types.UI_MT_button_context_menu.append(draw_menu) def unregister(): bpy.types.UI_MT_button_context_menu.remove(draw_menu)