Blender 4.2: Python API & Text Editor¶
Extensions¶
Extensions are add-ons, themes, and potentially anything else that can extend Blender’s native functionality (e.g. key maps, assets). An extension is an archive (.zip) containing the files and a manifest with metadata such as license, copyright, permissions, useful links, etc.
- Announcement.
- User manual.
- Initial commit (c4a0bbb1f4).
Text Editor¶
- Support for GLSL syntax highlighting (462c144f41)
Additions¶
bpy.utils
Module¶
- The
EXTENSIONS
option has been removed frombpy.utils.user_resource()
(6bfc8612bf). - Add
bpy.utils.register_cli_command
&unregister_cli_command
so scripts can define their own command line functionality via (-c
,--command
). (9372e0dfe0)
Animation¶
rna_struct.keyframe_insert()
now has a new, optional keyword argumentkeytype
to set the key type (1315991ecb). This makes it possible to set the new key's type directly. Example:bpy.context.object.keyframe_insert("location", keytype='JITTER')
.
Breaking changes¶
bpy.utils
Module¶
- The
AUTOSAVE
option has been removed frombpy.utils.user_resource()
(6bfc8612bf).
Render Settings¶
- Motion Blur settings have been de-duplicated between Cycles and EEVEE and moved to
bpy.types.RenderSettings
. (74b8f99b43)scene.cycles.motion_blur_position
->scene.render.motion_blur_position
scene.eevee.use_motion_blur
->scene.render.user_motion_blur
scene.eevee.motion_blur_position
->scene.render.motion_blur_position
scene.eevee.motion_blur_shutter
->scene.render.motion_blur_shutter
- Light cast shadow setting have been de-duplicated between Cycles and EEVEE and moved to
bpy.types.Light
. (1036d9bdb2)light.cycles.cast_shadow
->light.use_shadow
Nodes¶
- Unused
parent
argument removed from theNodeTreeInterface.new_panel
function for creating node group panels. (#118792) - Some node properties have been renamed to fix name collisions
(deb332601c):
- Compositor Box/Ellipse Mask node:
width
->mask_width
(same forheight
) - Shader AOV Output node:
name
->aov_name
- Geometry Color node:
color
->value
- Compositor Box/Ellipse Mask node:
Image Object Operators¶
- The "add image object" operator has been deduplicated and unified into one operator:
object.empty_image_add
. (013cd3d1ba)
Previously there were two operators to add image empties (object.load_reference_image
andobject.load_background_image
) with a separate operator for dropping (object.drop_named_image
). - The "add/remove background image from camera" operator has been renamed to clarify that this is
only for the camera object (013cd3d1ba):
view3d.background_image_add
->view3d.camera_background_image_add
.view3d.background_image_remove
->view3d.camera_background_image_remove
.
Layout Panels¶
- Added support for "layout panels" in popups (support for "operator dialogs", "redo popups" & popovers). (aa03646a74, 02681bd44d)