Logo Blender Agents Version Migrator

Blender Agents Version Migrator

Tổ chức
Impertio-Studio
blender-agents-version-migrator

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.

Tổng quan

Nhà phát hànhImpertio-Studio
Kho mãBlender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package
Tên kỹ năngblender-agents-version-migrator
Sao
44
Bản fork
5
Tệp đi kèm
3
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 3 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Impertio-Studio công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Blender Agents Version Migrator trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/blender/agents/blender-agents-version-migrator
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package.git /tmp/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package
mkdir -p .claude/skills
cp -r /tmp/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/skills/blender/agents/blender-agents-version-migrator .claude/skills/blender-agents-version-migrator
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Blender Agents Version Migrator trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Blender Agents Version Migrator ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Blender Agents Version Migrator với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Blender Agent: Version Migrator

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:


1. Quick Reference: Migration Paths

Supported Migration Paths

FromToComplexityKey Changes
3.x4.0HIGHContext overrides, mesh attributes, node interface, bone collections
4.04.1MEDIUMAuto-smooth removal, light probe renames, displacement method move
4.14.2MEDIUMExtension manifest, EEVEE rename, static IDProperties
4.24.3HIGHGrease Pencil rewrite, AttributeGroup split, EEVEE property removal
4.34.4MEDIUMsuper().init required, Sequence→Strip, Slotted Actions
4.44.5LOWMinor deprecations only
4.x5.0HIGHBGL removal, compositor change, slotted actions mandatory
5.05.1LOWPython 3.13, VSE property renames (deprecated)
3.x5.xCRITICALALL of the above — execute sequentially

Migration Execution Order

For a 3.x → 5.x migration, ALWAYS apply changes in this exact order:

  1. 3.x → 4.0 changes
  2. 4.0 → 4.1 changes
  3. 4.1 → 4.2 changes
  4. 4.2 → 4.3 changes
  5. 4.3 → 4.4 changes
  6. 4.4 → 5.0 changes
  7. 5.0 → 5.1 changes

NEVER skip intermediate versions. Each version removes APIs deprecated in prior versions.


2. Migration Agent Process

When migrating Blender Python code, follow these steps in order:

Step 1: Identify Source and Target Versions

python
# 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

Step 2: Scan for Affected APIs

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.

Step 3: Apply Changes Per Version Transition

Apply changes from the relevant migration checklists below. Process ONE version transition at a time.

Step 4: Update Metadata

  • Replace bl_info with blender_manifest.toml if targeting 4.2+
  • Update minimum version requirements
  • Update any version checks in the code

Step 5: Validate

  • Search for ANY remaining references to removed APIs
  • Verify all import statements reference available modules
  • Check that gpu.state is restored at end of draw callbacks
  • Confirm super().__init__(*args, **kwargs) in all Blender type subclasses (4.4+)

3. Find-and-Replace Tables

3.x → 4.0 Replacements

FindReplace WithCategory
bpy.ops.*.call(override_dict, (dict as first arg)with bpy.context.temp_override(**kwargs):Context
mesh.edges[i].bevel_weightmesh.attributes.get("bevel_weight_edge").data[i].valueMesh
mesh.edges[i].creasemesh.attributes.get("crease_edge").data[i].valueMesh
obj.face_mapsInteger face attributesMesh
mesh.calc_normals()Remove call (auto-calculated)Mesh
bone.layers[i]bone.collectionsArmature
pose.bone_groupsBone collections with colorsArmature
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

4.0 → 4.1 Replacements

FindReplace WithCategory
mesh.use_auto_smooth = TrueRemove (always active)Mesh
mesh.auto_smooth_angleUse "Smooth by Angle" modifierMesh
mesh.calc_normals_split()Remove (use mesh.corner_normals)Mesh
mesh.create_normals_split()RemoveMesh
mesh.free_normals_split()RemoveMesh
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_methodmat.displacement_methodMaterial
SUBSAMPLING_3x3BOXSequencer

4.1 → 4.2 Replacements

FindReplace WithCategory
bl_info = { (if targeting 4.2+)blender_manifest.toml fileExtension
BLENDER_EEVEE (render engine)BLENDER_EEVEE_NEXTRender
scene.cycles.motion_blur_positionscene.render.motion_blur_positionRender
scene.eevee.use_motion_blurscene.render.use_motion_blurRender
object.load_reference_imageobject.empty_image_addObject

4.2 → 4.3 Replacements

FindReplace WithCategory
bpy.types.AttributeGroupAttributeGroupMesh / AttributeGroupPointCloud / etc.Attributes
scene.eevee.use_ssrRemove (engine-internal)EEVEE
scene.eevee.use_bloomRemove (engine-internal)EEVEE
scene.eevee.* (40+ legacy props)Remove or check 4.3 release notesEEVEE
ALL Grease Pencil API callsComplete rewrite requiredGrease Pencil

4.3 → 4.4 Replacements

FindReplace WithCategory
class MyOp(bpy.types.Operator): (no super init)Add super().__init__(*args, **kwargs)Classes
bpy.types.Sequencebpy.types.StripVSE
action.fcurves.new( (for new code)Slotted Actions APIAnimation
paint.brush (write access)Read-only; use brush asset systemPaint

4.x → 5.0 Replacements

FindReplace WithCategory
import bglimport gpuDrawing
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.bindcodegpu.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_groupCompositor
scene.use_nodes (compositor)Remove (always active)Compositor
brush.sculpt_toolbrush.sculpt_brush_typeSculpt
strip.end_frame (VSE)strip.lengthVSE
action.fcurves (legacy)Slotted Actions channelbag APIAnimation
BLENDER_EEVEE_NEXTBLENDER_EEVEE (reverted)Render

5.0 → 5.1 Replacements

FindReplace WithCategory
sculpt.sample_colorpaint.sample_colorSculpt
frame_final_durationduration (deprecated, removed in 6.0)VSE
frame_final_startleft_handle (deprecated, removed in 6.0)VSE
frame_final_endright_handle (deprecated, removed in 6.0)VSE

4. Decision Tree: Compatibility Shims vs Clean Migration

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

When to Use Compatibility Shims

ALWAYS use compatibility shims when:

  • The addon targets 2+ major Blender versions simultaneously
  • The addon is distributed to users on different Blender versions

NEVER use compatibility shims when:

  • The migration targets a single Blender version
  • The code is an internal tool pinned to one Blender version

Compatibility Module Pattern

python
# 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)

Conditional Import Pattern for BGL → gpu

python
# 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

5. EEVEE Identifier Migration

The EEVEE render engine identifier changed across versions. ALWAYS use this lookup:

Blender VersionEEVEE Identifier
3.xBLENDER_EEVEE
4.0 – 4.1BLENDER_EEVEE
4.2 – 4.xBLENDER_EEVEE_NEXT
5.0+BLENDER_EEVEE
python
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'

6. Extension System Migration (4.2+)

When migrating from legacy addon to extension system:

  1. Create blender_manifest.toml in addon root
  2. Remove bl_info dict from __init__.py
  3. Set blender_version_min = "4.2.0" (or target minimum)
  4. Add id matching the package directory name
  5. Add tagline (max 64 chars, no trailing punctuation)
  6. Add type = "add-on" or type = "theme"
  7. Add network permissions if addon accesses internet: [permissions] → network = "Reason for access"
  8. Add license = ["SPDX:GPL-3.0-or-later"] (or appropriate SPDX)

7. Critical Migration Rules

  1. NEVER use import bgl in code targeting Blender 5.0+ — the module is REMOVED.
  2. ALWAYS restore gpu.state to defaults at the end of every draw callback.
  3. NEVER pass a dict as the first argument to bpy.ops in Blender 4.0+ — use context.temp_override().
  4. ALWAYS add super().__init__(*args, **kwargs) to Blender type subclasses in 4.4+.
  5. NEVER suppress DeprecationWarning — it hides migration signals.
  6. NEVER use try/except AttributeError as a version check — use bpy.app.version or hasattr().
  7. ALWAYS set POLYLINE_UNIFORM_COLOR shader uniforms: viewportSize and lineWidth.
  8. ALWAYS migrate Grease Pencil code completely when targeting 4.3+ — partial migration breaks.
  9. NEVER assign embedded IDs to PointerProperty in 4.3+.
  10. ALWAYS check the deprecation timeline in blender-errors-version before using any API.

8. Reference Links

Official Documentation

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Blender Agents Version Migrator làm được gì?

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.

Vì sao nên dùng Blender Agents Version Migrator trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Blender Agents Version Migrator là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Blender Agents Version Migrator trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/blender/agents/blender-agents-version-migrator. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Blender Agents Version Migrator?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Blender Agents Version Migrator với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Blender Agents Version Migrator với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Blender Agents Version Migrator có miễn phí không?

Có. Kỹ năng này được Impertio-Studio phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇