[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FA3FS51ZT11TFAH34AF2MV":3,"skill-same:01M7FA3FS51ZT11TFAH34AF2MV":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":13,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":33,"install":34,"resources":47},"01M7FA3FS51ZT11TFAH34AF2MV","blender-syntax-data",null,"Use when managing Blender data blocks -- collections, linked libraries, library overrides, or the asset system. Prevents the common mistake of not handling fake users when removing data blocks, or using append when link+override is needed. Covers bpy.data collections, BlendDataLibraries, library overrides, asset system, and data transfer between files. Keywords: bpy.data, collections, library overrides, linked library, asset system, append, link, fake user, data block, BlendDataLibraries, organize objects, link from other file, asset browser.","lagzgabrielmuller-dot\u002Fkit-ingenieria-3d","lagzgabrielmuller-dot","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F333339260?v=4","01M7F985KYC0XB2XZ97B5YWH4C","01M7F985MHK8N2NVE4VAR5WBWS",0,"MIT","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-data\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: blender-syntax-data\ndescription: >\n  Use when managing Blender data blocks -- collections, linked libraries, library overrides,\n  or the asset system. Prevents the common mistake of not handling fake users when removing\n  data blocks, or using append when link+override is needed. Covers bpy.data collections,\n  BlendDataLibraries, library overrides, asset system, and data transfer between files.\n  Keywords: bpy.data, collections, library overrides, linked library, asset system, append, link, fake user, data block, BlendDataLibraries, organize objects, link from other file, asset browser.\nlicense: MIT\ncompatibility: \"Designed for Claude Code. Requires Blender 3.x\u002F4.x\u002F5.x with Python.\"\nmetadata:\n  author: OpenAEC-Foundation\n  version: \"1.0\"\n---\n\n# blender-syntax-data\n\n## Quick Reference\n\n### Scope\n\nThis skill covers Blender data management:\n- **Collections**: hierarchy, visibility, object membership\n- **Library linking\u002Fappending**: `bpy.data.libraries.load()`\n- **Library overrides**: local editable copies of linked data (4.0+)\n- **Asset system**: marking, metadata, catalogs, `AssetRepresentation`\n- **Data blocks**: creation, removal, fake users, orphan cleanup\n- **Data transfer**: moving data between .blend files\n\n### Critical Warnings\n\n**NEVER** rename `scene.collection` — the root Scene Collection is read-only for name and cannot be deleted.\n\n**NEVER** use proxies in Blender 4.0+ — proxies were completely removed. Use library overrides instead.\n\n**NEVER** use `context.asset_file_handle` in Blender 5.0+ — it was removed. Use `context.asset` (`AssetRepresentation`) instead.\n\n**NEVER** assume `bpy.data.libraries.load()` defaults to linking — the default is `link=False` (append). ALWAYS set `link=True` explicitly when linking.\n\n**NEVER** automate asset catalogs via `bpy.ops.asset.catalog_new()` when you need specific names or UUIDs — the operator provides no parameter control. Edit `blender_assets.cats.txt` directly instead.\n\n**ALWAYS** check that returned data blocks are not `None` after `libraries.load()` — missing names silently return `None`.\n\n**ALWAYS** call `bpy.data.meshes.remove()` (or equivalent) to delete data blocks — Python `del` only removes the reference, not the data block.\n\n---\n\n## Decision Tree: Which Data Operation?\n\n```\nNeed to organize objects in scene?\n├── Group objects visually → Collection (§1)\n├── Control per-view-layer visibility → LayerCollection (§1)\n└── Control render\u002Fviewport visibility → Collection properties (§1)\n\nNeed data from another .blend file?\n├── Read-only reference that stays synced → Link (§2, link=True)\n├── Full local editable copy → Append (§2, link=False)\n└── Editable copy that tracks source → Library Override (§3)\n\nNeed to manage assets?\n├── Mark data block as asset → asset_mark() (§4)\n├── Set metadata (tags, description) → AssetMetaData (§4)\n├── Organize into catalogs → blender_assets.cats.txt (§4)\n└── Access active asset in UI → context.asset (4.0+) (§4)\n\nNeed to manage data block lifecycle?\n├── Create new data block → bpy.data.\u003Ccollection>.new() (§5)\n├── Prevent orphan cleanup → use_fake_user = True (§5)\n├── Remove data block → bpy.data.\u003Ccollection>.remove() (§5)\n└── Clean all orphans → bpy.ops.outliner.orphans_purge() (§5)\n```\n\n---\n\n## §1 Collections\n\nCollections organize objects in a tree hierarchy. Every scene has exactly one root `scene.collection` (the \"Scene Collection\").\n\n### Create and Nest Collections\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\nimport bpy\n\n# Create a collection\nbuilding_col = bpy.data.collections.new(\"Building_A\")\nbpy.context.scene.collection.children.link(building_col)\n\n# Nest collections\nfloors_col = bpy.data.collections.new(\"Floors\")\nbuilding_col.children.link(floors_col)\n```\n\n### Object Membership\n\nObjects can exist in multiple collections simultaneously. ALWAYS unlink from the source collection if you want exclusive membership.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\nobj = bpy.data.objects[\"Wall_01\"]\nwalls_col.objects.link(obj)                        # Add to target\nbpy.context.scene.collection.objects.unlink(obj)   # Remove from source\n```\n\n### Collection Visibility\n\nTwo independent visibility systems exist:\n\n| Property | Scope | Effect |\n|----------|-------|--------|\n| `collection.hide_viewport` | Global | Hidden in ALL viewports |\n| `collection.hide_render` | Global | Hidden in ALL renders |\n| `layer_collection.exclude` | Per view layer | Completely excluded from evaluation |\n| `layer_collection.hide_viewport` | Per view layer | Hidden in viewport only |\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: per-view-layer visibility\nview_layer = bpy.context.view_layer\nlayer_col = view_layer.layer_collection.children[\"Building_A\"]\nlayer_col.exclude = True        # Exclude from this view layer entirely\nlayer_col.hide_viewport = True  # Hide in viewport, keep in evaluation\n```\n\n### Traverse Collection Tree\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\ndef walk_collection_tree(collection, depth=0):\n    print(\"  \" * depth + collection.name)\n    for child in collection.children:\n        walk_collection_tree(child, depth + 1)\n    for obj in collection.objects:\n        print(\"  \" * (depth + 1) + f\"[{obj.type}] {obj.name}\")\n\nwalk_collection_tree(bpy.context.scene.collection)\n```\n\n### Find LayerCollection by Name\n\n`view_layer.layer_collection` mirrors the collection hierarchy but is NOT indexed by name at the top level. Recursive search is required.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\ndef find_layer_collection(layer_col, name):\n    if layer_col.name == name:\n        return layer_col\n    for child in layer_col.children:\n        result = find_layer_collection(child, name)\n        if result:\n            return result\n    return None\n\nlc = find_layer_collection(bpy.context.view_layer.layer_collection, \"Building_A\")\n```\n\n---\n\n## §2 Library Linking and Appending\n\n### bpy.data.libraries.load(): Recommended Method\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: Link (read-only reference)\nfilepath = \"\u002Fpath\u002Fto\u002Flibrary.blend\"\n\nwith bpy.data.libraries.load(filepath, link=True) as (data_src, data_dst):\n    # data_src.\u003Ctype> lists available names (strings)\n    # data_dst.\u003Ctype> accepts list of names to load\n    data_dst.collections = [\"BuildingModule_A\"]\n\n# ALWAYS check for None: missing names return None\nfor col in data_dst.collections:\n    if col is not None:\n        bpy.context.scene.collection.children.link(col)\n```\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: Append (full local copy)\nwith bpy.data.libraries.load(filepath, link=False) as (data_src, data_dst):\n    data_dst.objects = [\"Column_Type_A\"]\n    data_dst.materials = [\"Concrete_Exposed\"]\n\nfor obj in data_dst.objects:\n    if obj is not None:\n        bpy.context.collection.objects.link(obj)\n```\n\n### Operator Method (Alternative)\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: link via operator\nbpy.ops.wm.link(\n    filepath=filepath + \"\u002FCollection\u002FBuildingModule_A\",\n    directory=filepath + \"\u002FCollection\u002F\",\n    filename=\"BuildingModule_A\"\n)\n\n# Append via operator\nbpy.ops.wm.append(\n    filepath=filepath + \"\u002FObject\u002FColumn_Type_A\",\n    directory=filepath + \"\u002FObject\u002F\",\n    filename=\"Column_Type_A\"\n)\n```\n\n### Key Parameters for libraries.load()\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `filepath` | str | required | Path to .blend file |\n| `link` | bool | `False` | `True` = link (read-only), `False` = append (local copy) |\n| `relative` | bool | `False` | Store path as relative |\n| `assets_only` | bool | `False` | Only load data blocks marked as assets |\n\n### Available Data Types in libraries.load()\n\nAccess via `data_src.\u003Ctype>` and `data_dst.\u003Ctype>`:\n`actions`, `armatures`, `brushes`, `cameras`, `collections`, `curves`, `fonts`, `grease_pencils`, `images`, `lattices`, `lights`, `linestyles`, `masks`, `materials`, `meshes`, `metaballs`, `movieclips`, `node_groups`, `objects`, `paint_curves`, `palettes`, `particles`, `scenes`, `sounds`, `speakers`, `texts`, `textures`, `volumes`, `worlds`, `workspaces`\n\n---\n\n## §3 Library Overrides (4.0+)\n\nLibrary overrides replace proxies (removed in 4.0). They create local editable copies of linked data that track the source — non-overridden properties sync automatically when the source updates.\n\n### Create Override\n\n```python\n# Blender 4.0+: create library override from linked object\nimport bpy\n\n# Step 1: Link data\nwith bpy.data.libraries.load(\"\u002Fpath\u002Fto\u002Flibrary.blend\", link=True) as (data_src, data_dst):\n    data_dst.collections = [\"LinkedBuilding\"]\n\nfor col in data_dst.collections:\n    if col is not None:\n        bpy.context.scene.collection.children.link(col)\n\n# Step 2: Select linked object and create override\nlinked_obj = bpy.data.objects[\"LinkedBuilding\"]\nbpy.context.view_layer.objects.active = linked_obj\nlinked_obj.select_set(True)\n\n# Creates local override: object is now editable\nbpy.ops.object.make_override_library()\n```\n\n### Inspect Overrides\n\n```python\n# Blender 4.0+\nobj = bpy.data.objects[\"LinkedBuilding\"]\nif obj.override_library:\n    ovr = obj.override_library\n    print(f\"Source: {ovr.reference.name}\")\n    print(f\"Is system override: {ovr.is_system_override}\")\n    for prop in ovr.properties:\n        print(f\"  Overridden path: {prop.rna_path}\")\n        for op in prop.operations:\n            print(f\"    Operation: {op.operation}\")\n```\n\n### Override Properties\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `obj.override_library` | `IDOverrideLibrary` or `None` | Override data (None if not an override) |\n| `.reference` | `ID` | The linked data block being overridden |\n| `.is_system_override` | `bool` | True if auto-generated (not user-created) |\n| `.is_in_hierarchy` | `bool` | True if part of hierarchy override |\n| `.hierarchy_root` | `ID` | Root of the override hierarchy |\n| `.properties` | collection | Overridden properties list |\n\n### Resync Overrides\n\n```python\n# Blender 4.0+: resync after source library changes\nbpy.ops.object.override_library_resync()\n```\n\n---\n\n## §4 Asset System\n\n### Mark and Configure Assets\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: mark any ID data block as asset\nimport bpy\n\nobj = bpy.data.objects[\"Column_Type_A\"]\nobj.asset_mark()\n\n# Access metadata\nmeta = obj.asset_data  # bpy.types.AssetMetaData\nmeta.description = \"Reinforced concrete column, 300x300mm\"\nmeta.author = \"AEC Library\"\nmeta.license = \"CC-BY-4.0\"\nmeta.copyright = \"2024 AEC Corp\"\n\n# Tags\nmeta.tags.new(\"concrete\", skip_if_exists=True)\nmeta.tags.new(\"structural\", skip_if_exists=True)\n\n# Catalog assignment (requires UUID)\nmeta.catalog_id = \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n\n# Generate preview\nbpy.ops.ed.lib_id_generate_preview(asset_id=obj.name)\n\n# Clear asset status\nobj.asset_clear()\n```\n\n### Asset Context Access (Version-Critical)\n\n| Version | Access Pattern | Notes |\n|---------|---------------|-------|\n| Blender 3.x | `context.asset_file_handle` | `AssetHandle` — REMOVED in 5.0 |\n| Blender 4.0+ | `context.asset` | `AssetRepresentation` — use this |\n| Blender 5.0+ | `context.asset` | `AssetRepresentation` only — `asset_file_handle` gone |\n\n```python\n# Blender 4.0+: access active asset in asset browser\nasset = bpy.context.asset  # AssetRepresentation or None\nif asset:\n    print(asset.name)\n    print(asset.full_library_path)\n    meta = asset.metadata  # AssetMetaData\n```\n\n### Asset Catalogs\n\nCatalog management has NO direct data API. Two approaches:\n\n```python\n# Approach 1: Operators (limited: no name\u002FUUID control)\nbpy.ops.asset.catalog_new()\nbpy.ops.asset.catalog_delete()\nbpy.ops.asset.catalogs_save()\n```\n\n```python\n# Approach 2: Direct file edit (RECOMMENDED for automation)\n# File: \u003Casset_library_path>\u002Fblender_assets.cats.txt\n# Format: UUID:path\u002Fto\u002Fcatalog:Simple Name\n# Example line: a1b2c3d4-e5f6-7890-abcd-ef1234567890:Structural\u002FColumns:Columns\n```\n\n---\n\n## §5 Data Block Lifecycle\n\n### Create Data Blocks\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\nmesh = bpy.data.meshes.new(\"MyMesh\")\nobj = bpy.data.objects.new(\"MyObject\", mesh)\nmat = bpy.data.materials.new(\"MyMaterial\")\n\n# REQUIRED: link object to a collection to make it visible\nbpy.context.collection.objects.link(obj)\n```\n\n### Fake Users: Prevent Orphan Cleanup\n\nData blocks with zero users are removed on file save. Use `use_fake_user` to prevent this.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\nmat = bpy.data.materials.new(\"Template_Material\")\nmat.use_fake_user = True  # Survives save even with zero real users\n\n# Check user count\nprint(mat.users)           # Number of real users\nprint(mat.use_fake_user)   # True if fake user is set\n```\n\n### Remove Data Blocks\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\n# Remove specific data block\nbpy.data.meshes.remove(mesh)\nbpy.data.objects.remove(obj)\nbpy.data.materials.remove(mat)\n\n# Purge ALL orphaned data blocks\nbpy.ops.outliner.orphans_purge(do_local_ids=True, do_linked_ids=True, do_recursive=True)\n```\n\n### Batch Data Block Operations\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: iterate and filter data blocks\nfor mat in bpy.data.materials:\n    if mat.users == 0 and not mat.use_fake_user:\n        bpy.data.materials.remove(mat)\n\n# SAFER: collect first, then remove (avoids iterator invalidation)\norphans = [m for m in bpy.data.materials if m.users == 0 and not m.use_fake_user]\nfor mat in orphans:\n    bpy.data.materials.remove(mat)\n```\n\n### Write Data to External File\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: save specific data blocks to a new .blend\ndata_blocks = {bpy.data.objects[\"Column_A\"], bpy.data.materials[\"Concrete\"]}\nbpy.data.libraries.write(\"\u002Fpath\u002Fto\u002Foutput.blend\", data_blocks)\n\n# With options\nbpy.data.libraries.write(\n    \"\u002Fpath\u002Fto\u002Foutput.blend\",\n    data_blocks,\n    path_remap=\"RELATIVE\",  # \"NONE\", \"RELATIVE\", \"RELATIVE_ALL\", \"STRIP\"\n    fake_user=False,\n    compress=True\n)\n```\n\n---\n\n## §6 Version Migration Summary\n\n| Feature | Blender 3.x | Blender 4.0+ | Blender 5.0+ |\n|---------|-------------|--------------|--------------|\n| Object proxies | Available (deprecated) | REMOVED | REMOVED |\n| Library overrides | Available | REQUIRED (replaces proxies) | REQUIRED |\n| `context.asset_file_handle` | Available | Deprecated | REMOVED |\n| `context.asset` | Not available | Available | REQUIRED |\n| `AssetHandle` type | Available | Deprecated | REMOVED |\n| `AssetRepresentation` | Not available | Available | REQUIRED |\n| `context.active_file` (asset shelf) | N\u002FA | Available | REMOVED |\n\n---\n\n## Reference Links\n\n- [references\u002Fmethods.md](references\u002Fmethods.md) — Complete API signatures for collections, libraries, assets, overrides\n- [references\u002Fexamples.md](references\u002Fexamples.md) — Working code examples for all data management operations\n- [references\u002Fanti-patterns.md](references\u002Fanti-patterns.md) — What NOT to do with data management\n\n### Official Sources\n\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.Collection.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.BlendDataLibraries.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.AssetMetaData.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.IDOverrideLibrary.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.ops.asset.html\n- https:\u002F\u002Fdeveloper.blender.org\u002Fdocs\u002Frelease_notes\u002F4.0\u002Fpython_api\u002F\n- https:\u002F\u002Fdeveloper.blender.org\u002Fdocs\u002Frelease_notes\u002F5.0\u002Fpython_api\u002F\n","# blender-syntax-data\n\n## Quick Reference\n\n### Scope\n\nThis skill covers Blender data management:\n- **Collections**: hierarchy, visibility, object membership\n- **Library linking\u002Fappending**: `bpy.data.libraries.load()`\n- **Library overrides**: local editable copies of linked data (4.0+)\n- **Asset system**: marking, metadata, catalogs, `AssetRepresentation`\n- **Data blocks**: creation, removal, fake users, orphan cleanup\n- **Data transfer**: moving data between .blend files\n\n### Critical Warnings\n\n**NEVER** rename `scene.collection` — the root Scene Collection is read-only for name and cannot be deleted.\n\n**NEVER** use proxies in Blender 4.0+ — proxies were completely removed. Use library overrides instead.\n\n**NEVER** use `context.asset_file_handle` in Blender 5.0+ — it was removed. Use `context.asset` (`AssetRepresentation`) instead.\n\n**NEVER** assume `bpy.data.libraries.load()` defaults to linking — the default is `link=False` (append). ALWAYS set `link=True` explicitly when linking.\n\n**NEVER** automate asset catalogs via `bpy.ops.asset.catalog_new()` when you need specific names or UUIDs — the operator provides no parameter control. Edit `blender_assets.cats.txt` directly instead.\n\n**ALWAYS** check that returned data blocks are not `None` after `libraries.load()` — missing names silently return `None`.\n\n**ALWAYS** call `bpy.data.meshes.remove()` (or equivalent) to delete data blocks — Python `del` only removes the reference, not the data block.\n\n---\n\n## Decision Tree: Which Data Operation?\n\n```\nNeed to organize objects in scene?\n├── Group objects visually → Collection (§1)\n├── Control per-view-layer visibility → LayerCollection (§1)\n└── Control render\u002Fviewport visibility → Collection properties (§1)\n\nNeed data from another .blend file?\n├── Read-only reference that stays synced → Link (§2, link=True)\n├── Full local editable copy → Append (§2, link=False)\n└── Editable copy that tracks source → Library Override (§3)\n\nNeed to manage assets?\n├── Mark data block as asset → asset_mark() (§4)\n├── Set metadata (tags, description) → AssetMetaData (§4)\n├── Organize into catalogs → blender_assets.cats.txt (§4)\n└── Access active asset in UI → context.asset (4.0+) (§4)\n\nNeed to manage data block lifecycle?\n├── Create new data block → bpy.data.\u003Ccollection>.new() (§5)\n├── Prevent orphan cleanup → use_fake_user = True (§5)\n├── Remove data block → bpy.data.\u003Ccollection>.remove() (§5)\n└── Clean all orphans → bpy.ops.outliner.orphans_purge() (§5)\n```\n\n---\n\n## §1 Collections\n\nCollections organize objects in a tree hierarchy. Every scene has exactly one root `scene.collection` (the \"Scene Collection\").\n\n### Create and Nest Collections\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\nimport bpy\n\n# Create a collection\nbuilding_col = bpy.data.collections.new(\"Building_A\")\nbpy.context.scene.collection.children.link(building_col)\n\n# Nest collections\nfloors_col = bpy.data.collections.new(\"Floors\")\nbuilding_col.children.link(floors_col)\n```\n\n### Object Membership\n\nObjects can exist in multiple collections simultaneously. ALWAYS unlink from the source collection if you want exclusive membership.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\nobj = bpy.data.objects[\"Wall_01\"]\nwalls_col.objects.link(obj)                        # Add to target\nbpy.context.scene.collection.objects.unlink(obj)   # Remove from source\n```\n\n### Collection Visibility\n\nTwo independent visibility systems exist:\n\n| Property | Scope | Effect |\n|----------|-------|--------|\n| `collection.hide_viewport` | Global | Hidden in ALL viewports |\n| `collection.hide_render` | Global | Hidden in ALL renders |\n| `layer_collection.exclude` | Per view layer | Completely excluded from evaluation |\n| `layer_collection.hide_viewport` | Per view layer | Hidden in viewport only |\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: per-view-layer visibility\nview_layer = bpy.context.view_layer\nlayer_col = view_layer.layer_collection.children[\"Building_A\"]\nlayer_col.exclude = True        # Exclude from this view layer entirely\nlayer_col.hide_viewport = True  # Hide in viewport, keep in evaluation\n```\n\n### Traverse Collection Tree\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\ndef walk_collection_tree(collection, depth=0):\n    print(\"  \" * depth + collection.name)\n    for child in collection.children:\n        walk_collection_tree(child, depth + 1)\n    for obj in collection.objects:\n        print(\"  \" * (depth + 1) + f\"[{obj.type}] {obj.name}\")\n\nwalk_collection_tree(bpy.context.scene.collection)\n```\n\n### Find LayerCollection by Name\n\n`view_layer.layer_collection` mirrors the collection hierarchy but is NOT indexed by name at the top level. Recursive search is required.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\ndef find_layer_collection(layer_col, name):\n    if layer_col.name == name:\n        return layer_col\n    for child in layer_col.children:\n        result = find_layer_collection(child, name)\n        if result:\n            return result\n    return None\n\nlc = find_layer_collection(bpy.context.view_layer.layer_collection, \"Building_A\")\n```\n\n---\n\n## §2 Library Linking and Appending\n\n### bpy.data.libraries.load(): Recommended Method\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: Link (read-only reference)\nfilepath = \"\u002Fpath\u002Fto\u002Flibrary.blend\"\n\nwith bpy.data.libraries.load(filepath, link=True) as (data_src, data_dst):\n    # data_src.\u003Ctype> lists available names (strings)\n    # data_dst.\u003Ctype> accepts list of names to load\n    data_dst.collections = [\"BuildingModule_A\"]\n\n# ALWAYS check for None: missing names return None\nfor col in data_dst.collections:\n    if col is not None:\n        bpy.context.scene.collection.children.link(col)\n```\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: Append (full local copy)\nwith bpy.data.libraries.load(filepath, link=False) as (data_src, data_dst):\n    data_dst.objects = [\"Column_Type_A\"]\n    data_dst.materials = [\"Concrete_Exposed\"]\n\nfor obj in data_dst.objects:\n    if obj is not None:\n        bpy.context.collection.objects.link(obj)\n```\n\n### Operator Method (Alternative)\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: link via operator\nbpy.ops.wm.link(\n    filepath=filepath + \"\u002FCollection\u002FBuildingModule_A\",\n    directory=filepath + \"\u002FCollection\u002F\",\n    filename=\"BuildingModule_A\"\n)\n\n# Append via operator\nbpy.ops.wm.append(\n    filepath=filepath + \"\u002FObject\u002FColumn_Type_A\",\n    directory=filepath + \"\u002FObject\u002F\",\n    filename=\"Column_Type_A\"\n)\n```\n\n### Key Parameters for libraries.load()\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `filepath` | str | required | Path to .blend file |\n| `link` | bool | `False` | `True` = link (read-only), `False` = append (local copy) |\n| `relative` | bool | `False` | Store path as relative |\n| `assets_only` | bool | `False` | Only load data blocks marked as assets |\n\n### Available Data Types in libraries.load()\n\nAccess via `data_src.\u003Ctype>` and `data_dst.\u003Ctype>`:\n`actions`, `armatures`, `brushes`, `cameras`, `collections`, `curves`, `fonts`, `grease_pencils`, `images`, `lattices`, `lights`, `linestyles`, `masks`, `materials`, `meshes`, `metaballs`, `movieclips`, `node_groups`, `objects`, `paint_curves`, `palettes`, `particles`, `scenes`, `sounds`, `speakers`, `texts`, `textures`, `volumes`, `worlds`, `workspaces`\n\n---\n\n## §3 Library Overrides (4.0+)\n\nLibrary overrides replace proxies (removed in 4.0). They create local editable copies of linked data that track the source — non-overridden properties sync automatically when the source updates.\n\n### Create Override\n\n```python\n# Blender 4.0+: create library override from linked object\nimport bpy\n\n# Step 1: Link data\nwith bpy.data.libraries.load(\"\u002Fpath\u002Fto\u002Flibrary.blend\", link=True) as (data_src, data_dst):\n    data_dst.collections = [\"LinkedBuilding\"]\n\nfor col in data_dst.collections:\n    if col is not None:\n        bpy.context.scene.collection.children.link(col)\n\n# Step 2: Select linked object and create override\nlinked_obj = bpy.data.objects[\"LinkedBuilding\"]\nbpy.context.view_layer.objects.active = linked_obj\nlinked_obj.select_set(True)\n\n# Creates local override: object is now editable\nbpy.ops.object.make_override_library()\n```\n\n### Inspect Overrides\n\n```python\n# Blender 4.0+\nobj = bpy.data.objects[\"LinkedBuilding\"]\nif obj.override_library:\n    ovr = obj.override_library\n    print(f\"Source: {ovr.reference.name}\")\n    print(f\"Is system override: {ovr.is_system_override}\")\n    for prop in ovr.properties:\n        print(f\"  Overridden path: {prop.rna_path}\")\n        for op in prop.operations:\n            print(f\"    Operation: {op.operation}\")\n```\n\n### Override Properties\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `obj.override_library` | `IDOverrideLibrary` or `None` | Override data (None if not an override) |\n| `.reference` | `ID` | The linked data block being overridden |\n| `.is_system_override` | `bool` | True if auto-generated (not user-created) |\n| `.is_in_hierarchy` | `bool` | True if part of hierarchy override |\n| `.hierarchy_root` | `ID` | Root of the override hierarchy |\n| `.properties` | collection | Overridden properties list |\n\n### Resync Overrides\n\n```python\n# Blender 4.0+: resync after source library changes\nbpy.ops.object.override_library_resync()\n```\n\n---\n\n## §4 Asset System\n\n### Mark and Configure Assets\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: mark any ID data block as asset\nimport bpy\n\nobj = bpy.data.objects[\"Column_Type_A\"]\nobj.asset_mark()\n\n# Access metadata\nmeta = obj.asset_data  # bpy.types.AssetMetaData\nmeta.description = \"Reinforced concrete column, 300x300mm\"\nmeta.author = \"AEC Library\"\nmeta.license = \"CC-BY-4.0\"\nmeta.copyright = \"2024 AEC Corp\"\n\n# Tags\nmeta.tags.new(\"concrete\", skip_if_exists=True)\nmeta.tags.new(\"structural\", skip_if_exists=True)\n\n# Catalog assignment (requires UUID)\nmeta.catalog_id = \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n\n# Generate preview\nbpy.ops.ed.lib_id_generate_preview(asset_id=obj.name)\n\n# Clear asset status\nobj.asset_clear()\n```\n\n### Asset Context Access (Version-Critical)\n\n| Version | Access Pattern | Notes |\n|---------|---------------|-------|\n| Blender 3.x | `context.asset_file_handle` | `AssetHandle` — REMOVED in 5.0 |\n| Blender 4.0+ | `context.asset` | `AssetRepresentation` — use this |\n| Blender 5.0+ | `context.asset` | `AssetRepresentation` only — `asset_file_handle` gone |\n\n```python\n# Blender 4.0+: access active asset in asset browser\nasset = bpy.context.asset  # AssetRepresentation or None\nif asset:\n    print(asset.name)\n    print(asset.full_library_path)\n    meta = asset.metadata  # AssetMetaData\n```\n\n### Asset Catalogs\n\nCatalog management has NO direct data API. Two approaches:\n\n```python\n# Approach 1: Operators (limited: no name\u002FUUID control)\nbpy.ops.asset.catalog_new()\nbpy.ops.asset.catalog_delete()\nbpy.ops.asset.catalogs_save()\n```\n\n```python\n# Approach 2: Direct file edit (RECOMMENDED for automation)\n# File: \u003Casset_library_path>\u002Fblender_assets.cats.txt\n# Format: UUID:path\u002Fto\u002Fcatalog:Simple Name\n# Example line: a1b2c3d4-e5f6-7890-abcd-ef1234567890:Structural\u002FColumns:Columns\n```\n\n---\n\n## §5 Data Block Lifecycle\n\n### Create Data Blocks\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\nmesh = bpy.data.meshes.new(\"MyMesh\")\nobj = bpy.data.objects.new(\"MyObject\", mesh)\nmat = bpy.data.materials.new(\"MyMaterial\")\n\n# REQUIRED: link object to a collection to make it visible\nbpy.context.collection.objects.link(obj)\n```\n\n### Fake Users: Prevent Orphan Cleanup\n\nData blocks with zero users are removed on file save. Use `use_fake_user` to prevent this.\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\nmat = bpy.data.materials.new(\"Template_Material\")\nmat.use_fake_user = True  # Survives save even with zero real users\n\n# Check user count\nprint(mat.users)           # Number of real users\nprint(mat.use_fake_user)   # True if fake user is set\n```\n\n### Remove Data Blocks\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x\n# Remove specific data block\nbpy.data.meshes.remove(mesh)\nbpy.data.objects.remove(obj)\nbpy.data.materials.remove(mat)\n\n# Purge ALL orphaned data blocks\nbpy.ops.outliner.orphans_purge(do_local_ids=True, do_linked_ids=True, do_recursive=True)\n```\n\n### Batch Data Block Operations\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: iterate and filter data blocks\nfor mat in bpy.data.materials:\n    if mat.users == 0 and not mat.use_fake_user:\n        bpy.data.materials.remove(mat)\n\n# SAFER: collect first, then remove (avoids iterator invalidation)\norphans = [m for m in bpy.data.materials if m.users == 0 and not m.use_fake_user]\nfor mat in orphans:\n    bpy.data.materials.remove(mat)\n```\n\n### Write Data to External File\n\n```python\n# Blender 3.x\u002F4.x\u002F5.x: save specific data blocks to a new .blend\ndata_blocks = {bpy.data.objects[\"Column_A\"], bpy.data.materials[\"Concrete\"]}\nbpy.data.libraries.write(\"\u002Fpath\u002Fto\u002Foutput.blend\", data_blocks)\n\n# With options\nbpy.data.libraries.write(\n    \"\u002Fpath\u002Fto\u002Foutput.blend\",\n    data_blocks,\n    path_remap=\"RELATIVE\",  # \"NONE\", \"RELATIVE\", \"RELATIVE_ALL\", \"STRIP\"\n    fake_user=False,\n    compress=True\n)\n```\n\n---\n\n## §6 Version Migration Summary\n\n| Feature | Blender 3.x | Blender 4.0+ | Blender 5.0+ |\n|---------|-------------|--------------|--------------|\n| Object proxies | Available (deprecated) | REMOVED | REMOVED |\n| Library overrides | Available | REQUIRED (replaces proxies) | REQUIRED |\n| `context.asset_file_handle` | Available | Deprecated | REMOVED |\n| `context.asset` | Not available | Available | REQUIRED |\n| `AssetHandle` type | Available | Deprecated | REMOVED |\n| `AssetRepresentation` | Not available | Available | REQUIRED |\n| `context.active_file` (asset shelf) | N\u002FA | Available | REMOVED |\n\n---\n\n## Reference Links\n\n- [references\u002Fmethods.md](references\u002Fmethods.md) — Complete API signatures for collections, libraries, assets, overrides\n- [references\u002Fexamples.md](references\u002Fexamples.md) — Working code examples for all data management operations\n- [references\u002Fanti-patterns.md](references\u002Fanti-patterns.md) — What NOT to do with data management\n\n### Official Sources\n\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.Collection.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.BlendDataLibraries.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.AssetMetaData.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.types.IDOverrideLibrary.html\n- https:\u002F\u002Fdocs.blender.org\u002Fapi\u002Fcurrent\u002Fbpy.ops.asset.html\n- https:\u002F\u002Fdeveloper.blender.org\u002Fdocs\u002Frelease_notes\u002F4.0\u002Fpython_api\u002F\n- https:\u002F\u002Fdeveloper.blender.org\u002Fdocs\u002Frelease_notes\u002F5.0\u002Fpython_api\u002F\n",{"name":5,"license":14,"metadata":23,"description":26,"compatibility":27},{"author":24,"version":25},"OpenAEC-Foundation","1.0","Use when managing Blender data blocks -- collections, linked libraries, library overrides, or the asset system. Prevents the common mistake of not handling fake users when removing data blocks, or using append when link+override is needed. Covers bpy.data collections, BlendDataLibraries, library overrides, asset system, and data transfer between files. Keywords: bpy.data, collections, library overrides, linked library, asset system, append, link, fake user, data block, BlendDataLibraries, organize objects, link from other file, asset browser.\n","Designed for Claude Code. Requires Blender 3.x\u002F4.x\u002F5.x with Python.","main","9bb7acf0c2ec4f44373969cb14e55af3c9a8385f","plugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-data","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot","2026-11-09 13:26:47",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill blender-syntax-data",{"tool":40,"command":41},"bunx","bunx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill blender-syntax-data",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lagzgabrielmuller-dot\u002Fkit-ingenieria-3d --skill blender-syntax-data","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-data\u002FSKILL.md",true,[48,54,58],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"references\u002Fanti-patterns.md","REFERENCE","参考文档",11885,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-data\u002Freferences\u002Fanti-patterns.md",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fexamples.md",16219,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-data\u002Freferences\u002Fexamples.md",{"path":59,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fmethods.md",12364,"https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fblender-bim-sverchok\u002Fskills\u002Fblender\u002Fsyntax\u002Fblender-syntax-data\u002Freferences\u002Fmethods.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":67,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":18},"01M7FBFSZ93YM463CGS91D0TZG","manimce-best-practices","Trigger when: (1) User mentions \"manim\" or \"Manim Community\" or \"ManimCE\", (2) Code contains `from manim import *`, (3) User runs `manim` CLI commands, (4) Working with Scene, MathTex, Create(), or ManimCE-specific classes.\n\nBest practices for Manim Community Edition - the community-maintained Python animation engine. Covers Scene structure, animations, LaTeX\u002FMathTex, 3D with ThreeDScene, camera control, styling, and CLI usage.\n\nNOT for ManimGL\u002F3b1b version (which uses `manimlib` imports and `manimgl` CLI).","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fmanim-animaciones\u002Fskills\u002Fmanimce-best-practices\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fmanim-animaciones\u002Fskills\u002Fmanimce-best-practices\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":18},"01M7FB2K59HNNXS9WKHAMWHC3C","drawio","Create, edit, replicate, import, and export draw.io diagrams with an offline YAML-first workflow: architecture, network topologies, flowcharts, UML\u002FER, org charts, Mermaid\u002FCSV conversion, existing .drawio bundles, style presets, themes, and non-publication formula diagrams. For publication figures (paper, thesis, IEEE, camera-ready) use drawio-academic-skills instead.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fdiagramas-y-documentos\u002Fskills\u002Fdrawio\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M7FB2BWX7GWK9H2X8BGCYDDD","drawio-academic-skills","Publication-figure overlay for draw.io. Use instead of drawio whenever the diagram is for a paper, thesis, dissertation, journal, conference, IEEE\u002FACM submission, manuscript, camera-ready, Word\u002FLaTeX figure, or other publication. Applies venue, figure-type, color, caption\u002Flegend, formula, and paper-readability gates for architecture, workflow, roadmap, network-topology, and replicated paper figures.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fdiagramas-y-documentos\u002Fskills\u002Fdrawio-academic-skills\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7FB22JESEAV8T15DJT3D444","uncertainty-and-units","Tracks physical units and propagates measurement uncertainty in scientific calculations using pint and uncertainties. Use for unit conversion and dimensional checking, GUM uncertainty budgets, Type A and Type B evaluation, coverage factors and expanded uncertainty, Monte Carlo propagation, significant-figure and plus-minus reporting, error propagation through curve fits, CODATA constants, auditing Python code for stripped units or broken uncertainty propagation, and order-of-magnitude plausibility checks using dimensionless groups (Reynolds, Peclet, Damkohler, Knudsen, Biot, Womersley), characteristic scales such as diffusion time or Debye length, and observed magnitude ranges. Trigger on \"is this number physically reasonable\", \"sanity check these units\", \"what regime is this flow in\", or a result that looks off by orders of magnitude.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Funcertainty-and-units\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M7FB1ANRSG28R335FDY9SA3R","statistical-analysis","Guided statistical analysis for research data - test selection, assumption checking, effect sizes, power analysis, Bayesian alternatives, and APA-formatted reporting. Use whenever a user wants to compare groups, test a hypothesis, analyze experimental or survey data, check statistical assumptions, compute required sample sizes, or write up results - even if they never name a specific test. Covers t-tests, ANOVA, chi-square, correlation, regression, non-parametric and Bayesian methods. For low-level model APIs, see the statsmodels and pymc skills.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Fstatistical-analysis\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":18},"01M7FB15KRA9D7JCPH4P9T6XJY","simpy","Builds, inspects, tests, and analyzes bounded process-based discrete-event simulations with SimPy. Use for event scheduling, resource queues, interrupts, monitoring, independent replications, warm-up, and reproducible output analysis.","https:\u002F\u002Fgithub.com\u002Flagzgabrielmuller-dot\u002Fkit-ingenieria-3d\u002Fblob\u002Fmain\u002Fplugins\u002Fciencia-y-calculo\u002Fskills\u002Fsimpy\u002FSKILL.md",[],[]]