Reference/Release Notes/3.6/Python API
< Reference | Release Notes | 3.6
Python API & Text Editor
Custom Script Directories
Multiple script directory paths can now be configured in the Preferences (File Paths section). Each of these directories supports the regular script directory layout with a startup file (or files?), add-ons, modules and presets. (ba25023d22)
Compatibility notes:
bpy.types.PreferencesFilePaths.script_directoryis deprecated. The directories are exposed inbpy.types.script_directoriesnow.bpy.utils.script_path_prefis removed, usebpy.utils.script_paths_prefinstead.
Blender Handlers
- Added
bpy.app.handlers(save_post_fail,load_post_fail), so the*_prehandles will always call a*_posthandler, even on failure (46be42f6b1). - File load handlers (
save_{pre/post/post_fail},load_{pre/post/post_fail}) now accept a filepath argument so the file being loaded or saved is known (46be42f6b1)
Internal Mesh Format
The mesh data structure refactoring from earlier releases has continued in 3.6. See the similar sections in the 3.4 and 3.5 release notes.
- The vertex and edge indices stored for mesh face corners (
MeshLoop/MLoop) are now stored as separate attributes, named.corner_vertand.corner_edge(16fbadde36). - Mesh faces (polygons) are now stored with a single integer internally, rather than the
MPolytype.- This means that the order of faces is always consistent with the order of face corners (loops).
- The
MeshPolygon.loop_totalproperty is no longer editable. Instead the size of each face should be changed with the next face'sloop_startproperty.
- Mesh edges are now stored in a generic attribute named
.edge_verts(2a4323c2f5).- A new 2D integer vector attribute type is added to store edge data (988f23cec3).
- UV seams are now stored as a generic attribute, accessible with the
.uv_seamname on the edge domain (cccf91ff83). - The smooth/sharp status for faces is now stored as a generic attribute with the
sharp_facename (5876573e14).- In some cases, meshes are now smooth by default (when created from scratch, without
from_pydata).- To simplify getting the previous behavior, new API functions
Mesh.shade_flat()andMesh.shade_smooth()have been added (ee352c968f).
- To simplify getting the previous behavior, new API functions
- In some cases, meshes are now smooth by default (when created from scratch, without
Other Changes
- New
bpy_extras.node_utils.connect_sockets()function to allow creating links between virtual sockets (grayed out sockets in Group Input and Group Output nodes) (81815681d0). - New
action_tweak_storageproperty inAnimData, which exposes the temporary storage used to stash the main action when tweaking an NLA clip (997ad50b49).