blender-syntax-materials

Generate version-safe Blender Python code for PBR materials with Principled BSDF node trees.

30|4|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package --skill blender-syntax-materials-impertio-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: blender-syntax-materials
Source: https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/blender/syntax/blender-syntax-materials
Command: npx skills add https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package --skill blender-syntax-materials-impertio-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Prevents Blender material and shader-code from breaking across Blender version upgrades by enforcing correct Principled BSDF socket names, EEVEE transparency APIs, UV handling, image loading reuse, and texture color-space settings.

Core Features & Use Cases

  • Version-safe Principled BSDF input mapping: Applies correct socket names for Blender 3.x vs 4.0+ (e.g., renamed inputs like "Subsurface" → "Subsurface Weight") and avoids KeyError failures.
  • Robust material node-tree workflows: Supports creating materials, enabling nodes, building complete node trees, linking BSDF to Material Output, and assigning/organizing material slots.
  • Correct texture + UV + rendering configuration: Enforces per-loop UV access, loads images with check_existing=True to avoid duplicates, and sets 'sRGB' vs 'Non-Color' correctly (e.g., normals/roughness/metallic).
  • EEVEE transparency safety across versions: Chooses mat.blend_method for Blender ≤4.1 and mat.surface_render_method for Blender 4.2+, avoiding removed-property crashes.

Quick Start

Use blender-syntax-materials to generate Blender Python code that creates a Principled BSDF material with diffuse, normal, and roughness textures assigned to the active object across Blender 3.x/4.x/5.x.

Frequently Asked Questions about blender-syntax-materials

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Blender Python code for PBR materials without breaking across version upgrades?

To generate version-safe Blender Python code for PBR materials, enforce correct Principled BSDF socket names and EEVEE transparency APIs. This prevents KeyError failures and removed-property crashes when upgrading between Blender 3.x, 4.x, and 5.x.

Why does my Blender 4.x script crash with a KeyError on the Principled BSDF node?

Blender 4.x renamed Principled BSDF inputs, causing KeyErrors in older scripts. Map socket names correctly, such as changing "Subsurface" to "Subsurface Weight", to ensure your shader code runs without breaking across Blender versions.

How do I set EEVEE transparency in Blender 4.2 Python scripts without crashing?

To set EEVEE transparency safely in Blender 4.2+, use the `mat.surface_render_method` property instead of `mat.blend_method`. The `blend_method` was removed in 4.2, so using it causes crashes in newer Blender versions.

What is the correct way to load and connect textures to a shader graph in Blender Python?

The correct way to load and connect textures in Blender Python is to use `check_existing=True` to avoid duplicate images, set colorspace to 'Non-Color' for data textures like normals, and access UV data per-loop to properly wire textures into the shader graph.

Can I use this approach to build shader nodes from scratch for both Cycles and EEVEE?

Yes, you can build shader graphs from scratch for both Cycles and EEVEE by creating materials, enabling nodes, linking Principled BSDF to Material Output, and configuring version-safe rendering properties and transparency APIs across Blender 3.x/4.x/5.x.

What's the best way to handle texture colorspace settings for normal and roughness maps in Blender Python?

The best way to handle texture colorspace for normal, roughness, or metallic maps is to set the image colorspace to 'Non-Color' instead of 'sRGB', ensuring accurate PBR material rendering and correct data interpretation in your shader graph.