# I don't understand how to access the "bone\_tree" structure.

**URL:** <https://forums.unrealengine.com/t/i-dont-understand-how-to-access-the-bone-tree-structure/2117833>\
**Category:** Programming & Scripting\
**Tags:** Python, Script, unreal-engine, Scripting, question\
**Created:** [November 12, 2024, 1:35pm UTC](https://forums.unrealengine.com/t/i-dont-understand-how-to-access-the-bone-tree-structure/2117833 "2024-11-12T13:35:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![low\_203](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@low\_203](https://forums.unrealengine.com/u/low_203)\
**Post date:** [November 12, 2024, 1:35pm UTC](https://forums.unrealengine.com/t/i-dont-understand-how-to-access-the-bone-tree-structure/2117833/1 "2024-11-12T13:35:10Z")

</div>

class unreal.Skeleton(outer=None, name=‘None’)  
**Editor Properties:** (see get\_editor\_property/set\_editor\_property)

- `bone_tree` (Array(BoneNode)): [Read-Only] Bone Tree: Skeleton bone tree - each contains name and parent index\*

I got the structure from the above python API, but the output result is access to memory.  
How can I output bone names and indexes to the UE log?

* * *

```auto
import unreal

# Load the skeleton asset
skeleton = unreal.EditorAssetLibrary.load_asset('/Game/MyStuff/mesh/test/test_Skeleton')

if skeleton:
    # Get the bone_tree property
    bone_tree = skeleton.get_editor_property("bone_tree")

    # If bone_tree is a list or array, loop through each element (likely a BoneNode)
    for bone_node in bone_tree:
        # Output information about the BoneNode in text form
        # Assuming bone_node has a property like 'bone_name', access it and print it
        if hasattr(bone_node, 'bone_name'):
            print(f"Bone Name: {bone_node.bone_name}")
        else:
            # If no 'bone_name' property, just print the bone_node itself
            print(bone_node)

```

```auto
#excute result

<Struct 'BoneNode' (0x0000060479A00960) {}>
<Struct 'BoneNode' (0x0000060479A052A0) {}>
<Struct 'BoneNode' (0x0000060479A04DA0) {}>
<Struct 'BoneNode' (0x0000060479A096C0) {}>
<Struct 'BoneNode' (0x0000060479A04380) {}>
<Struct 'BoneNode' (0x0000060479A08240) {}>
<Struct 'BoneNode' (0x0000060479A0CFE0) {}>
<Struct 'BoneNode' (0x0000060479A028E0) {}>
<Struct 'BoneNode' (0x0000060479A00F20) {}>
<Struct 'BoneNode' (0x0000060479A0F320) {}>
<Struct 'BoneNode' (0x0000060479A06620) {}>
<Struct 'BoneNode' (0x0000060479A092C0) {}>
<Struct 'BoneNode' (0x0000060479A010E0) {}>
<Struct 'BoneNode' (0x0000060479A07D80) {}>
<Struct 'BoneNode' (0x0000060479A04940) {}>
<Struct 'BoneNode' (0x0000060479A0A1C0) {}>
<Struct 'BoneNode' (0x0000060479A0CF00) {}>
<Struct 'BoneNode' (0x0000060479A01C20) {}>
<Struct 'BoneNode' (0x0000060479A0FB20) {}>
<Struct 'BoneNode' (0x0000060479A0D3C0) {}>
<Struct 'BoneNode' (0x0000060479A06A40) {}>
<Struct 'BoneNode' (0x0000060479A0DE60) {}>
<Struct 'BoneNode' (0x0000060479A06FA0) {}>
<Struct 'BoneNode' (0x0000060479A05760) {}>
<Struct 'BoneNode' (0x0000060479A0C080) {}>
<Struct 'BoneNode' (0x0000060479A005A0) {}>
<Struct 'BoneNode' (0x0000060479A0E4C0) {}>
<Struct 'BoneNode' (0x0000060479A01580) {}>
<Struct 'BoneNode' (0x0000060479A05EA0) {}>
<Struct 'BoneNode' (0x0000060479A00C20) {}>
<Struct 'BoneNode' (0x0000060479A09920) {}>
<Struct 'BoneNode' (0x0000060479A095A0) {}>
<Struct 'BoneNode' (0x0000060479A00DE0) {}>
<Struct 'BoneNode' (0x0000060479A01560) {}>
<Struct 'BoneNode' (0x0000060479A0A860) {}>

```
