/blender-bim-sverchok:blender-agents-version-migratorfrom Blender por código, BIM (Bonsai e IfcOpenShell) y Sverchok
Use when migrating, porting, or upgrading Blender Python scripts and addons across major versions (3.x to 4.x to 5.x). Provides a systematic migration process covering API renames, removed functions, changed parameters, extension system migration, BGL to GPU module conversion, and bone collection migration. Prevents incomplete migrations that compile but fail at runtime. Keywords: migration, porting, upgrade, version, 3.x to 4.x, 4.x to 5.x, API rename, bgl to gpu, extension migration, bl_info to manifest, bone collection, script stopped working after update, upgrade addon to new Blender.
Ships in Blender por código, BIM (Bonsai e IfcOpenShell) y Sverchok. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Systematic migration process for Blender Python code across major versions. This agent skill activates when migrating, porting, updating, or upgrading Blender Python scripts or addons between versions 3.x, 4.x, and 5.x.
Dependencies:
| From | To | Complexity | Key Changes |
|---|---|---|---|
| 3.x | 4.0 | HIGH | Context overrides, mesh attributes, node interface, bone collections |
| 4.0 | 4.1 | MEDIUM | Auto-smooth removal, light probe renames, displacement method move |
| 4.1 | 4.2 | MEDIUM | Extension manifest, EEVEE rename, static IDProperties |
| 4.2 | 4.3 | HIGH | Grease Pencil rewrite, AttributeGroup split, EEVEE property removal |
| 4.3 | 4.4 | MEDIUM | super().init required, Sequence→Strip, Slotted Actions |
| 4.4 | 4.5 | LOW | Minor deprecations only |
| 4.x | 5.0 | HIGH | BGL removal, compositor change, slotted actions mandatory |
| 5.0 | 5.1 | LOW | Python 3.13, VSE property renames (deprecated) |
| 3.x | 5.x | CRITICAL | ALL of the above — execute sequentially |
For a 3.x → 5.x migration, ALWAYS apply changes in this exact order:
NEVER skip intermediate versions. Each version removes APIs deprecated in prior versions.
When migrating Blender Python code, follow these steps in order:
# Determine current version compatibility from code signals
# Check for these indicators:
# - bl_info dict → 3.x / 4.0 / 4.1 addon
# - blender_manifest.toml → 4.2+ extension
# - import bgl → pre-5.0 code
# - context override dicts on bpy.ops → pre-4.0 code
# - mesh.use_auto_smooth → pre-4.1 code
# - NodeTree.inputs.new() → pre-4.0 code
Search the codebase for ALL patterns listed in the Find-and-Replace Tables (Section 3). Mark each occurrence with the version transition that affects it.
Apply changes from the relevant migration checklists below. Process ONE version transition at a time.
bl_info with blender_manifest.toml if targeting 4.2+import statements reference available modulesgpu.state is restored at end of draw callbackssuper().__init__(*args, **kwargs) in all Blender type subclasses (4.4+)| Find | Replace With | Category |
|---|---|---|
bpy.ops.*.call(override_dict, (dict as first arg) | with bpy.context.temp_override(**kwargs): | Context |
mesh.edges[i].bevel_weight | mesh.attributes.get("bevel_weight_edge").data[i].value | Mesh |
mesh.edges[i].crease | mesh.attributes.get("crease_edge").data[i].value | Mesh |
obj.face_maps | Integer face attributes | Mesh |
mesh.calc_normals() | Remove call (auto-calculated) | Mesh |
bone.layers[i] | bone.collections | Armature |
pose.bone_groups | Bone collections with colors | Armature |
NodeTree.inputs.new(type, name) | NodeTree.interface.new_socket(name=name, in_out='INPUT', socket_type=type) | Nodes |
NodeTree.outputs.new(type, name) | NodeTree.interface.new_socket(name=name, in_out='OUTPUT', socket_type=type) | Nodes |
node.inputs["Subsurface"] | node.inputs["Subsurface Weight"] | Shader |
node.inputs["Specular"] | node.inputs["Specular IOR Level"] | Shader |
node.inputs["Transmission"] | node.inputs["Transmission Weight"] | Shader |
gpu.shader.from_builtin('3D_UNIFORM_COLOR') | gpu.shader.from_builtin('POLYLINE_UNIFORM_COLOR') | GPU |
gpu.shader.from_builtin('3D_FLAT_COLOR') | gpu.shader.from_builtin('POLYLINE_FLAT_COLOR') | GPU |
bpy.ops.import_scene.obj( | bpy.ops.wm.obj_import( | IO |
bpy.ops.export_scene.obj( | bpy.ops.wm.obj_export( | IO |
filename= (in IO operators) | filepath= | IO |
| Find | Replace With | Category |
|---|---|---|
mesh.use_auto_smooth = True | Remove (always active) | Mesh |
mesh.auto_smooth_angle | Use "Smooth by Angle" modifier | Mesh |
mesh.calc_normals_split() | Remove (use mesh.corner_normals) | Mesh |
mesh.create_normals_split() | Remove | Mesh |
mesh.free_normals_split() | Remove | Mesh |
probe.type == 'CUBEMAP' | probe.type == 'SPHERE' | Light Probe |
probe.type == 'PLANAR' | probe.type == 'PLANE' | Light Probe |
probe.type == 'GRID' | probe.type == 'VOLUME' | Light Probe |
mat.cycles.displacement_method | mat.displacement_method | Material |
SUBSAMPLING_3x3 | BOX | Sequencer |
| Find | Replace With | Category |
|---|---|---|
bl_info = { (if targeting 4.2+) | blender_manifest.toml file | Extension |
BLENDER_EEVEE (render engine) | BLENDER_EEVEE_NEXT | Render |
scene.cycles.motion_blur_position | scene.render.motion_blur_position | Render |
scene.eevee.use_motion_blur | scene.render.use_motion_blur | Render |
object.load_reference_image | object.empty_image_add | Object |
| Find | Replace With | Category |
|---|---|---|
bpy.types.AttributeGroup | AttributeGroupMesh / AttributeGroupPointCloud / etc. | Attributes |
scene.eevee.use_ssr | Remove (engine-internal) | EEVEE |
scene.eevee.use_bloom | Remove (engine-internal) | EEVEE |
scene.eevee.* (40+ legacy props) | Remove or check 4.3 release notes | EEVEE |
| ALL Grease Pencil API calls | Complete rewrite required | Grease Pencil |
| Find | Replace With | Category |
|---|---|---|
class MyOp(bpy.types.Operator): (no super init) | Add super().__init__(*args, **kwargs) | Classes |
bpy.types.Sequence | bpy.types.Strip | VSE |
action.fcurves.new( (for new code) | Slotted Actions API | Animation |
paint.brush (write access) | Read-only; use brush asset system | Paint |
| Find | Replace With | Category |
|---|---|---|
import bgl | import gpu | Drawing |
bgl.glEnable(bgl.GL_BLEND) | gpu.state.blend_set('ALPHA') | Drawing |
bgl.glDisable(bgl.GL_BLEND) | gpu.state.blend_set('NONE') | Drawing |
bgl.glLineWidth(w) | gpu.state.line_width_set(w) | Drawing |
bgl.glEnable(bgl.GL_DEPTH_TEST) | gpu.state.depth_test_set('LESS_EQUAL') | Drawing |
bgl.glDisable(bgl.GL_DEPTH_TEST) | gpu.state.depth_test_set('NONE') | Drawing |
bgl.glPointSize(s) | gpu.state.point_size_set(s) | Drawing |
bgl.glDepthMask(GL_TRUE) | gpu.state.depth_mask_set(True) | Drawing |
image.gl_load() / image.bindcode | gpu.texture.from_image(image) | Drawing |
gpu.types.GPUShader() | gpu.shader.create_from_info() | Drawing |
scene['cycles'] | scene.cycles.property_name (attribute access) | Properties |
scene.node_tree (compositor) | scene.compositing_node_group | Compositor |
scene.use_nodes (compositor) | Remove (always active) | Compositor |
brush.sculpt_tool | brush.sculpt_brush_type | Sculpt |
strip.end_frame (VSE) | strip.length | VSE |
action.fcurves (legacy) | Slotted Actions channelbag API | Animation |
BLENDER_EEVEE_NEXT | BLENDER_EEVEE (reverted) | Render |
| Find | Replace With | Category |
|---|---|---|
sculpt.sample_color | paint.sample_color | Sculpt |
frame_final_duration | duration (deprecated, removed in 6.0) | VSE |
frame_final_start | left_handle (deprecated, removed in 6.0) | VSE |
frame_final_end | right_handle (deprecated, removed in 6.0) | VSE |
MIGRATION STRATEGY DECISION
│
├── Target SINGLE Blender version?
│ └── YES → Clean migration: remove ALL legacy code, use target API only
│
├── Target VERSION RANGE (e.g., 3.x + 4.x)?
│ ├── Range spans 3.x and 4.0+ ?
│ │ └── YES → Use version-safe wrappers with bpy.app.version checks
│ ├── Range spans 4.x and 5.0+ ?
│ │ └── YES → Use version-safe wrappers; NEVER import bgl at module level
│ └── Range within single major (e.g., 4.0–4.4)?
│ └── Use hasattr() feature detection for minor version differences
│
└── Target LATEST only (drop legacy)?
└── Clean migration: target version API only, no compatibility code
ALWAYS use compatibility shims when:
NEVER use compatibility shims when:
# compat.py: Version-safe compatibility layer
import bpy
BLENDER_4 = bpy.app.version >= (4, 0, 0)
BLENDER_41 = bpy.app.version >= (4, 1, 0)
BLENDER_42 = bpy.app.version >= (4, 2, 0)
BLENDER_43 = bpy.app.version >= (4, 3, 0)
BLENDER_44 = bpy.app.version >= (4, 4, 0)
BLENDER_5 = bpy.app.version >= (5, 0, 0)
BLENDER_51 = bpy.app.version >= (5, 1, 0)
def apply_modifier(obj, modifier_name):
if BLENDER_4:
with bpy.context.temp_override(object=obj, active_object=obj):
bpy.ops.object.modifier_apply(modifier=modifier_name)
else:
override = {"object": obj, "active_object": obj}
bpy.ops.object.modifier_apply(override, modifier=modifier_name)
# NEVER import bgl at module level in multi-version addons
import gpu
# For addons targeting 3.x–4.x (before 5.0 removal):
try:
import bgl
HAS_BGL = True
except ImportError:
HAS_BGL = False # Blender 5.0+
# ALWAYS use gpu module for new code regardless of version
The EEVEE render engine identifier changed across versions. ALWAYS use this lookup:
| Blender Version | EEVEE Identifier |
|---|---|
| 3.x | BLENDER_EEVEE |
| 4.0 – 4.1 | BLENDER_EEVEE |
| 4.2 – 4.x | BLENDER_EEVEE_NEXT |
| 5.0+ | BLENDER_EEVEE |
def get_eevee_identifier():
if bpy.app.version >= (5, 0, 0):
return 'BLENDER_EEVEE'
elif bpy.app.version >= (4, 2, 0):
return 'BLENDER_EEVEE_NEXT'
else:
return 'BLENDER_EEVEE'
When migrating from legacy addon to extension system:
blender_manifest.toml in addon rootbl_info dict from __init__.pyblender_version_min = "4.2.0" (or target minimum)id matching the package directory nametagline (max 64 chars, no trailing punctuation)type = "add-on" or type = "theme"[permissions] → network = "Reason for access"license = ["SPDX:GPL-3.0-or-later"] (or appropriate SPDX)import bgl in code targeting Blender 5.0+ — the module is REMOVED.gpu.state to defaults at the end of every draw callback.bpy.ops in Blender 4.0+ — use context.temp_override().super().__init__(*args, **kwargs) to Blender type subclasses in 4.4+.DeprecationWarning — it hides migration signals.try/except AttributeError as a version check — use bpy.app.version or hasattr().POLYLINE_UNIFORM_COLOR shader uniforms: viewportSize and lineWidth.PointerProperty in 4.3+.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub lagzgabrielmuller-dot/kit-ingenieria-3d --plugin blender-bim-sverchok73 skills in this plugin
/aec-agents-workflow-orchestratorUse when a task spans multiple AEC technologies (Blender, IfcOpenShell, Bonsai, Sverchok) and you need to decide which tool handles which step, or when orchestrating multi-step BIM pipelines such as IFC creation to visualization to authoring. Prevents the common mistake of mixing IfcStore.get_file() with ifcopenshell.open() in the same context, or calling Bonsai operators outside a Bonsai-loaded session. Provides decision trees for technology selection, workflow sequencing, and bridge patterns between tools. Keywords: cross-technology, workflow orchestration, BIM pipeline, technology selection, Blender IfcOpenShell Bonsai integration, multi-step AEC, bridge pattern, which tool should I use, combine Blender and IFC, multi-tool workflow, how to connect tools.
/aec-core-bim-workflowsUse when implementing end-to-end BIM workflows that combine IfcOpenShell, Bonsai, and Blender -- such as IFC creation from scratch, model enrichment, validation pipelines, geometry extraction, or batch processing of building models. Prevents the common mistake of skipping unit and context setup before creating geometry, or directly modifying IFC attributes instead of using ifcopenshell.api.run(). Covers property set management across tools, spatial hierarchy patterns, and version compatibility for IFC2X3/IFC4/IFC4X3. Keywords: BIM workflow, IFC creation, model validation, property extraction, batch processing, spatial hierarchy, cross-technology, IfcOpenShell Bonsai Blender, pset management, how to create IFC model, step by step BIM, get properties from IFC.
Other plugins' skills for the same job