Reference/Release Notes/2.80/Python API/Modules

= Blender 2.80: Helper Modules =

Various helper Python API modules have been added, removed or changed.

Shader Node Import / Export
With the removal of Blender Internal, all materials are now node based. However shaders found in external files usually have a fixed set of parameters. To ease import and export of such shaders  was added, replacing the earlier.

Differences compared to the earlier system:


 * Both import and export are supported, instead of only import.
 * Based on Principled BSDF, instead of a custom shader setup.
 * Custom shader setups not using the Principled BSDF are ignored, and default values are exported instead.
 * Value conversion and clamping is left to each IO add-on.
 * Based on accessors to support:
 * Lazy creation of only the required nodes and links on first access.
 * Write checking to avoid modification when exporting shaders.

Example code:

For a more complex code example, see bundled addons like the OBJ or the FBX importers/exporters. Import this free OBJ cat model gives a shader setup like this:



Noise and Metric Enumerators
Enumerators in 2.7x were implemented as module level constants. These have been changed to string enumerators:

2.7x

2.8x

Noise Type Naming
When transitioning to string enumerators, the following changes apply:

Orientation Helper
The  type generator (used to create a base class with custom orientation defaults, and common properties that are used by the axis helpers in code) has been removed. Instead, a more pythonic  decorator has been added.

2.7x:

2.8x:

Removed Modules

 * The extensions_framework module was removed.