Logo: Porting To Blender 5

Porting To Blender 5

Communautéit
TMHSDigital
porting-to-blender-5

Port an add-on or script from Blender 3.x/4.x to 5.x (5.2 LTS) while keeping 4.5 LTS working: a triage recipe that runs the code headless on the target version and maps each traceback to its fix, and one table of every break the pack covers (bgl, action.fcurves, use_auto_smooth, Principled sockets, sequences, context dicts, ID properties, compositor node_tree, Grease Pencil, NodesModifier inputs, EEVEE id, use_nodes, bl_info) linking to the skill, rule or example that owns it. Use when the user asks to port, upgrade or update an add-on for Blender 5, or hits AttributeError, KeyError, TypeError or ModuleNotFoundError right after updating Blender.

Iwwersiicht

EditeurTMHSDigital
RepositoryBlender-Developer-Tools
Skill-Nummporting-to-blender-5
Stären
20
Forks
5
Matgeliwwert Dateien
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    TMHSDigital huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Porting To Blender 5 an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/porting-to-blender-5
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/TMHSDigital/Blender-Developer-Tools.git /tmp/Blender-Developer-Tools
mkdir -p .claude/skills
cp -r /tmp/Blender-Developer-Tools/skills/porting-to-blender-5 .claude/skills/porting-to-blender-5
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Porting To Blender 5 an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Porting To Blender 5 automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Porting To Blender 5 net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Porting to Blender 5

Trigger

Use this skill when the user:

  • Asks to "port", "upgrade", "update" or "make compatible" an add-on or script for Blender 5.x
  • Gets AttributeError, KeyError, TypeError or ModuleNotFoundError from code that worked on an older Blender
  • Wants one codebase that runs on both 4.5 LTS and 5.2 LTS

This skill is an index. Each row points at the skill, rule or runnable example that owns the fix, with the version facts measured there. Load the linked skill for the details; do not port from this table alone.

Triage: let the target version tell you what broke

  1. Run it headless on the target version with tracebacks turned into a failing exit code:

    bash
    blender --background --factory-startup --python-exit-code 1 --python my_script.py --

    For an add-on, run a script that imports the package and calls register(). An import-time break (bgl) never gets as far as your operators. See headless-batch-scripting.

  2. Read the first traceback, fix it, run again. Breaks hide behind each other: an add-on that dies importing bgl has not reached its action.fcurves call yet.

  3. Map the error to the table below by the attribute or key it names.

  4. Re-run on 4.5 LTS if you still support it. Several fixes need a version branch (rows marked branch). Branch on the bpy.app.version tuple, never on version_string (see the version-branch-skeleton.py snippet).

  5. Grep for the silent ones. Some breaks raise nothing: they quietly do the wrong thing (rows marked silent). Search the codebase for those patterns even if every run is green. tools/bpy_lint.py (stdlib, python tools/bpy_lint.py <add-on dir>) flags every pattern the rules name, with the owning skill.

The breaks the pack covers

Old codeChanged inWhat happens on 5.xFixOwner
import bgl, bgl.glEnable, bgl.glLineWidthremoved 5.0ModuleNotFoundError; the add-on never registersgpu.state, POLYLINE_* shaders, gpu_extras.batchgpu-drawing-and-overlays, rule no-bgl
from_builtin('3D_UNIFORM_COLOR') and other 2D_/3D_ shader namesgone (rejected on 5.2.1)ValueErrorUNIFORM_COLOR, SMOOTH_COLOR, ...gpu-drawing-and-overlays
blf.size(font_id, size, dpi)4.0TypeErrorblf.size(font_id, size)gpu-drawing-and-overlays
action.fcurves, action.groupsremoved 5.0 (slotted model since 4.4)AttributeErrorchannelbag per slot; branch: action_ensure_channelbag_for_slot is 5.0+ onlyslotted-actions-animation, turntable, rule no-legacy-action-fcurves
mesh.use_auto_smooth, auto_smooth_angle, calc_normals_split()removed 4.1AttributeErrorset_sharp_from_angle, corner_normalsrule no-removed-normals-api, snippet set-sharp-from-angle.py, mesh-normals-after-41
bsdf.inputs["Emission"], ["Specular"], ["Clearcoat"], ["Subsurface"], ["Transmission"]renamed 4.0 (Principled v2)KeyError: ... key "Emission" not foundEmission Color, Specular IOR Level, Coat Weight, ...procedural-materials-and-shaders, rule principled-v2-socket-names
group.inputs.new(...) on a node groupremoved 4.0AttributeErrorgroup.interface.new_socket(...)procedural-materials-and-shaders, geometry-nodes-python
scene.render.engine = 'BLENDER_EEVEE_NEXT'id changed 5.0TypeError (enum)branch: 'BLENDER_EEVEE' on 5.0+, 'BLENDER_EEVEE_NEXT' on 4.2–4.5procedural-materials-and-shaders, rule branch-eevee-engine-id
mat.use_nodes = True (also worlds, lights)deprecated 5.0, removed in 6.0DeprecationWarning; node tree exists anywaybranch: only on < (5, 0, 0)procedural-materials-and-shaders
scene.node_tree (compositor)removed 5.0AttributeErrorbranch: a compositor node group on scene.compositing_node_groupcompositor-glare
sequence_editor.sequencesremoved 5.0AttributeError.strips (already on 4.5)vse-python, rule no-legacy-vse-sequences
new_effect(..., frame_end=...)changed 5.0TypeErrorbranch: length= on 5.0+vse-python
scene["my_prop"], "my_prop" in scene.keys() for a registered bpy.props property5.0KeyError, or silent: keys() no longer lists itattribute access, property_unset, is_property_set (no branch needed)custom-properties, cross-version-property-delete
mod["Socket_1"] = value on a NODES modifierremoved 5.2TypeError: ... id properties not supportedbranch: the 5.2 RNA input propertiesgeometry-nodes-python, gn-modifier-inputs, rule no-nodes-modifier-idprop-inputs
bpy.data.grease_pencils holding legacy GPencil, grease_pencils_v35.0 (GPv3 takes the name)silent wrong type on 4.5, AttributeError on 5.xbranch: grease_pencils_v3 on 4.5, grease_pencils on 5.xgrease-pencil-rosette
bpy.ops.x.y(context_dict, ...), bpy.context.copy() overrideremoved 4.0TypeErrorwith bpy.context.temp_override(...)rule prefer-temp-override-over-context-copy
bl_info only, no blender_manifest.tomlExtensions Platform 4.2not installable as an extension (validate: manifest not found)add a manifest; keep bl_info beside it if pre-4.2 mattersbl-info-migration, addon-register-lifecycle
hard-coded add-on module name in preferences.addons["my_addon"]extensions 4.2KeyError: the module is bl_ext.<repo>.my_addon__package__extension-runtime-and-packaging
COLOR strip transform scale after a resolution change5.2silent: width/height are baked from the scene resolutionbranch: set width/height on 5.2+vse-python
evaluated_get(dg).data.name != obj.data.name as an "is evaluated" test5.2silent: names are equal on 5.2track where the mesh came from, not its nameeval-mesh-datablock-name
GPU drawing under --backgroundnew in 5.2SystemError on 5.1 and older5.2+: gpu.init() firstgpu-offscreen-draw

The dual-version shim

Keep one code path and branch only where the table says branch:

python
import bpy

IS_5 = bpy.app.version >= (5, 0, 0)

if IS_5:
    from bpy_extras.anim_utils import action_ensure_channelbag_for_slot

def eevee_id():
    return "BLENDER_EEVEE" if IS_5 else "BLENDER_EEVEE_NEXT"

def strips(se):
    return se.strips  # present on 4.5 too: no branch needed

Prefer the replacement that works on both versions when one exists (.strips, attribute access for properties, temp_override, corner_normals, gpu.state). Branch only for real splits. Never probe with hasattr(action, "slots") to tell 4.5 from 5.x: slots exists on both. The version-branch-skeleton.py snippet has the pattern: snippets/version-branch-skeleton.py.

Common AI mistakes

MistakeInstead
Fixing only the first traceback and declaring the port doneRe-run until clean, then grep for the silent rows
try: import bgl fallbacks kept "for 4.5"gpu works on 4.5 too; delete bgl entirely
Branching on bpy.app.version_stringCompare the bpy.app.version tuple
Porting by renaming attributes from memoryLoad the owning skill; several renames also changed types (Specular Tint is now a color)
Dropping 4.5 support by accidentRun the smoke on both LTS lines before calling it done

Runnable examples

Each example runs headless, asserts the contract, and exits non-zero when it breaks. Run one with blender --background --python <script> --; pass a falsifier flag to watch the check fail.

  • compositor-glare: Bloom where it actually lives — a compositor Glare (Fog Glow) node fed by Render Layers. Falsify: --threshold-high (exit 4).
  • cross-version-property-delete: Custom ID properties are removed with del, not property_unset. Falsify: --skip-delete (exit 7).
  • eval-mesh-datablock-name: Pathology witness for the 5.2 change in Object.evaluated_get(depsgraph).data.name. Falsify: --assume-distinct-names (exit 6).
  • gpu-offscreen-draw: Check-only witness for drawing with the gpu module, the replacement for the bgl module that 5.x removed. Blender 5.2+. Falsify: --skip-blend (exit 5).
  • grease-pencil-rosette: Grease Pencil v3's attribute-based API — layer → frames.new(1).drawing → add_strokes → per-point position/radius/opacity/vertex_color — drawing five nested neon rose curves. Falsify: --open-strokes (exit 5).
  • mesh-normals-after-41: Check-only witness for the normals API that replaced auto smooth in Blender 4.1, on 4.5 LTS and 5.x alike. Falsify: --legacy-api (exit 3).

Snippets

Short standalone patterns to copy. Each one runs in CI on 5.2 and 4.5 with a check and a falsifier.

Heefeg gestallte Froen

Wat mécht de KI-Skill Porting To Blender 5?

Port an add-on or script from Blender 3.x/4.x to 5.x (5.2 LTS) while keeping 4.5 LTS working: a triage recipe that runs the code headless on the target version and maps each traceback to its fix, and one table of every break the pack covers (bgl, action.fcurves, use_auto_smooth, Principled sockets, sequences, context dicts, ID properties, compositor node_tree, Grease Pencil, NodesModifier inputs, EEVEE id, use_nodes, bl_info) linking to the skill, rule or example that owns it. Use when the user asks to port, upgrade or update an add-on for Blender 5, or hits AttributeError, KeyError, TypeEr...

Firwat Porting To Blender 5 op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Porting To Blender 5 besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Porting To Blender 5 an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/TMHSDigital/Blender-Developer-Tools/tree/main/skills/porting-to-blender-5 an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Porting To Blender 5 benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Porting To Blender 5 benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Porting To Blender 5 domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Porting To Blender 5 gratis?

TMHSDigital huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇