Full Byte Developer.

How Blender works inside: DNA, RNA, depsgraph

DNA stores .blend structs, RNA exposes properties to UI and Python, and the depsgraph evaluates copies for viewports.

Published here , updated · 7 sources

Blender is a large interactive 3D program. Its public core docs split three jobs that game and tool developers recognize in spirit: durable file layout (DNA), rich runtime access (RNA), and dependency-aware evaluation (depsgraph) [1] [2] [3]. This page stays on those Blender docs. Related systems teaching style: Computer Enhance [5]. CPU loop primer: how a CPU runs an instruction.

Quick start (under a minute)

Open Blender, switch to the Scripting workspace, and run in the Python console:

python
import bpy
mesh = bpy.data.meshes[0]
mesh.vertices[0].co

You should get a vector value without manually parsing a .blend file [2]. That path is RNA: typed properties with metadata, not raw struct pointer arithmetic in your script.

DNA: what lands in a .blend file

DNA describes the C structs stored in .blend files in a reproducible, forward- and backward-compatible way [1]. At build time, makesdna parses headers under source/blender/makesdna/ and emits Structure DNA (SDNA). Saving embeds SDNA beside the binary blobs so the file can describe itself when structs change later [1].

Anything that must persist in a .blend needs a DNA definition so makesdna can see it [1]. DNA is low-level and sensitive to padding, pointer size, and endianness [1]. Application code outside Blender should treat .blend as opaque unless you intentionally work with Blender's format libraries.

RNA: properties the UI and Python see

RNA defines structured data with metadata and runtime behavior for UI labels, ranges, callbacks, animation, library overrides, and much of bpy [2]. makesrna turns those definitions into static runtime tables [2].

Example from the docs' framing: Python such as bpy.data.meshes["Cube"].vertices[0].co rides RNA descriptions of what those properties are and how to read them [2]. RNA began wrapping DNA and now also covers structures that are not DNA-backed [2]. The UI button you click and the f-curve you keyframe both consult RNA paths.

Depsgraph: update only what changed

The dependency graph's job is to update scene data after a change as efficiently as possible: nodes are entities, edges are relations (for example parenting) [3]. It owns dynamic updates (f-curves), not one-shot edit operators like a mesh subdivide [3].

Important design points from the depsgraph docs [3]:

IdeaMeaning
DNA from fileSmall persistent representation; no runtime fields on DNA
Generated dataEvaluation (modifiers, constraints) runs on a copy
No write-back to originalsResults live on the depsgraph; engines consume generated data
Window ownershipInteractive depsgraphs are owned per window/workspace context

That copy-on-write evaluation is why two viewports can show different simplification or animation states without fighting over one mutable ID [3].

How the three layers stack (teaching picture)

Renderers read evaluated meshes and transforms. They should not rewrite the DNA original when a subdivision surface toggles [3]. The UI you click ultimately schedules depsgraph work, not direct DNA pointer edits on every frame [2] [3].

Worked example: RNA path you can type

With the default Cube scene (Blender 4.x, 2026-12-03), the Python console often prints:

text
Vector((-1.0, -1.0, -1.0))

for the first vertex after mesh.vertices[0].co [2]. Changing the value through RNA updates the mesh through Blender's operators and tagging system, which schedules depsgraph refresh. Saving persists DNA, not the transient GPU buffer.

A one-line bpy sanity check for object count:

python
len(bpy.data.objects)

observed:

text
3

(cube, light, camera in the default startup file). Counts change when you add empties or collections; the pattern is the same.

Build-time tools: makesdna and makesrna

Developers rebuilding Blender run code generation steps that normal users never touch [1] [2]. makesdna emits struct layout tables used for I/O. makesrna emits property definitions consumed at runtime. If a field is missing from DNA, it will not round-trip in .blend files even if Python could fake a dict on the side [1].

Undo stacks sit mostly above DNA on the user action side: operators record steps that mutate IDs, then depsgraph refresh picks up the new state [3]. Crashes during evaluation are different from crashes during save; the file on disk may still be intact even when a viewport draw failed.

Do not map this to Unreal or Unity

Unreal and Unity also separate assets from evaluated scene graphs. Blender's public names are DNA, RNA, and depsgraph [4]. Do not claim they share implementation. Use Blender docs when teaching Blender.

Casey Muratori's Computer Enhance is useful adjacent reading for how CPUs chew through tight loops once your evaluated mesh lands in a draw or trace call [5]. It does not document Blender internals.

Linked libraries and addons still talk RNA paths when they expose panels; a broken RNA registration shows up as missing properties in the UI even when the DNA blob on disk is fine [2]. That split is why a corrupt preference file can blank an addon without touching your project .blend.

More reader questions

Can I script Blender without learning DNA? For daily bpy work, yes [2]. DNA matters when you debug file versions, write C patches, or estimate .blend size on disk [1].

Why can two viewports disagree? Separate depsgraph instances per window context evaluate copies with different overrides or simplification [3].

When two viewports disagree, blame evaluation copies first, not a corrupt .blend. The depsgraph can hold per-window state while DNA on disk stays smaller than the expanded runtime graph [3].

Where people go wrong

Editing evaluated mesh data in Python and expecting a magical save. Some writes go through operators that update originals; others touch evaluated copies only. When in doubt, use documented bpy APIs and save, then reopen [2] [3].

RNA paths are a stable UI contract; DNA may pack fields differently [1] [2].

Docs note per-window ownership; editors and render settings can diverge [3].

Treating .blend as JSON. It is binary blobs plus SDNA [1]. Version control text diffs are poor fits without special tools.

Expecting modifiers to run backwards into DNA on every frame. Evaluation is copy-on-write; originals stay small [3].

Open one .blend, toggle a modifier, and watch the depsgraph force a re-eval before you chase a render farm. Cycles path tracing sits next door in how Blender Cycles renders; hardware choice language is CPU vs GPU vs NPU vs TPU.

Send this to the friend who treats Blender as a black box before reading DNA and RNA.

Illustration of a dense solid cube lattice on the left, a pegged path into a hub with cyan links, then glowing wireframe cubes, ending at a larger solid output cube, no people and no readable UI text.
Stored mesh data evaluates through a hub into wireframe copies, then a final solid.

Keep this guide

By Full Byte Developer

Filed under Dev explainers, Science

Questions about this guide

What is DNA in Blender?

Blender developer docs describe DNA as the low-level C structs and enums that define persistent .blend data. makesdna builds SDNA so each file carries a description of its structs for compatibility.

What is RNA for?

RNA adds high-level properties, metadata, callbacks, and reflection used by the UI, animation, overrides, and much of the Python bpy API. makesrna generates the runtime tables.

Does the depsgraph edit the original .blend data in place?

Developer docs say evaluation runs on a copy of DNA data (generated data). Results stay on the depsgraph so original IDs are not mutated by viewport or render evaluation.

Is this the same as a game engine frame loop?

Related idea, different product. Game engines also separate authored data from runtime evaluation. Blender's public docs name DNA, RNA, and depsgraph specifically.

What is SDNA?

Structure DNA embedded in .blend files listing struct layouts so Blender can read older files after struct fields change [1].

Sources

Next in this stack