# gdevsarvesh/foliageflow architecture

> Architecture diagram of the GitHub repository gdevsarvesh/foliageflow, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gdevsarvesh/foliageflow
- Repository: https://github.com/gdevsarvesh/foliageflow

## Overview

FoliageFlow is a Godot editor plugin for painting or erasing foliage instances on a user-provided MultiMeshInstance3D. The documented workflow is to add a FoliageFlow node, assign its target, use the 3D editor tools, and save; the transforms remain in the target MultiMesh. Source excerpts were unavailable, so the graph includes only relationships stated in the README and does not infer how the plugin and inspector scripts connect internally.

Main entry points: [`addons/FoliageFlow/FoliageFlow.gd`](https://github.com/gdevsarvesh/foliageflow/blob/main/addons/FoliageFlow/FoliageFlow.gd) (FoliageFlow node), [`addons/FoliageFlow/plugin.gd`](https://github.com/gdevsarvesh/foliageflow/blob/main/addons/FoliageFlow/plugin.gd) (Plugin entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_editor["Editor integration"]
  node_plugin["Plugin entry<br/>[plugin.gd]"]
  node_inspector_plugin["Inspector plugin"]
  node_inspector_panel["Inspector panel"]
  node_inspector_scene["Inspector panel scene"]
end

subgraph group_foliage["Foliage editing"]
  node_flow["FoliageFlow node<br/>[FoliageFlow.gd]"]
end

subgraph group_scene["Scene data"]
  node_target["MultiMeshInstance3D"]
  node_multimesh[("Target MultiMesh")]
end

node_user(("Godot user"))
node_editor["Godot editor"]

node_user -->|"enables plugin"| node_plugin
node_user -->|"adds node"| node_flow
node_user -->|"sets target"| node_target
node_user -->|"uses paint tools"| node_editor
node_flow -->|"paints or erases"| node_target
node_target -->|"stores transforms"| node_multimesh
node_multimesh -->|"persists instances"| node_target

click node_plugin "https://github.com/gdevsarvesh/foliageflow/blob/main/addons/FoliageFlow/plugin.gd"
click node_inspector_plugin "https://github.com/gdevsarvesh/foliageflow/blob/main/addons/FoliageFlow/foliage_flow_inspector_plugin.gd"
click node_inspector_panel "https://github.com/gdevsarvesh/foliageflow/blob/main/addons/FoliageFlow/foliage_flow_inspector_panel.gd"
click node_inspector_scene "https://github.com/gdevsarvesh/foliageflow/blob/main/addons/FoliageFlow/foliage_flow_inspector_panel.tscn"
click node_flow "https://github.com/gdevsarvesh/foliageflow/blob/main/addons/FoliageFlow/FoliageFlow.gd"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plugin,node_inspector_plugin,node_inspector_panel,node_inspector_scene,node_user toneBlue
class node_flow toneAmber
class node_target,node_multimesh toneMint
class node_editor toneIndigo
```

## Components

### Editor integration

- [Plugin entry](https://github.com/gdevsarvesh/foliageflow/blob/main/addons/FoliageFlow/plugin.gd): `addons/FoliageFlow/plugin.gd`
- [Inspector plugin](https://github.com/gdevsarvesh/foliageflow/blob/main/addons/FoliageFlow/foliage_flow_inspector_plugin.gd): `addons/FoliageFlow/foliage_flow_inspector_plugin.gd`
- [Inspector panel](https://github.com/gdevsarvesh/foliageflow/blob/main/addons/FoliageFlow/foliage_flow_inspector_panel.gd): `addons/FoliageFlow/foliage_flow_inspector_panel.gd`
- [Inspector panel scene](https://github.com/gdevsarvesh/foliageflow/blob/main/addons/FoliageFlow/foliage_flow_inspector_panel.tscn): `addons/FoliageFlow/foliage_flow_inspector_panel.tscn`

### Foliage editing

- [FoliageFlow node](https://github.com/gdevsarvesh/foliageflow/blob/main/addons/FoliageFlow/FoliageFlow.gd): `addons/FoliageFlow/FoliageFlow.gd`

### Scene data

- **MultiMeshInstance3D**
- **Target MultiMesh**

### Other components

- **Godot user**
- **Godot editor**

## Connections

- Godot user → Plugin entry: enables plugin (evidence: `README.md`)
- Godot user → FoliageFlow node: adds node (evidence: `README.md`)
- Godot user → MultiMeshInstance3D: sets target (evidence: `README.md`)
- Godot user → Godot editor: uses paint tools (evidence: `README.md`)
- FoliageFlow node → MultiMeshInstance3D: paints or erases (evidence: `README.md`)
- MultiMeshInstance3D → Target MultiMesh: stores transforms (evidence: `README.md`)
- Target MultiMesh → MultiMeshInstance3D: persists instances (evidence: `README.md`)
