Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion build/Stride.Tests.Simple.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"..\\sources\\editor\\Stride.Core.Assets.Editor.Tests\\Stride.Core.Assets.Editor.Tests.csproj",
"..\\sources\\editor\\Stride.GameStudio.Tests\\Stride.GameStudio.Tests.csproj",
"..\\sources\\presentation\\Stride.Core.Presentation.Quantum.Tests\\Stride.Core.Presentation.Quantum.Tests.csproj",
"..\\sources\\presentation\\Stride.Core.Presentation.Tests\\Stride.Core.Presentation.Tests.csproj",
"..\\sources\\presentation\\Stride.Core.Presentation.Wpf.Tests\\Stride.Core.Presentation.Wpf.Tests.csproj",
"..\\sources\\presentation\\Stride.Core.Quantum.Tests\\Stride.Core.Quantum.Tests.csproj",
"..\\sources\\shaders\\Stride.Shaders.Tests\\Stride.Shaders.Tests.csproj",
"..\\sources\\tools\\Stride.Templates.Tests\\Stride.Templates.Tests.csproj"
Expand Down
27 changes: 18 additions & 9 deletions build/Stride.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -152,29 +152,38 @@
</Folder>
<Folder Name="/50-Presentation/">
<Project Path="../sources/editor/Stride.Core.MostRecentlyUsedFiles/Stride.Core.MostRecentlyUsedFiles.shproj" />
<Project Path="../sources/presentation/Stride.Core.Presentation.Dialogs/Stride.Core.Presentation.Dialogs.csproj" />
<Project Path="../sources/presentation/Stride.Core.Presentation.Graph/Stride.Core.Presentation.Graph.csproj" />
<Project Path="../sources/presentation/Stride.Core.Presentation.Quantum/Stride.Core.Presentation.Quantum.csproj" />
<Project Path="../sources/presentation/Stride.Core.Presentation.Wpf/Stride.Core.Presentation.Wpf.csproj" />
<Project Path="../sources/presentation/Stride.Core.Presentation/Stride.Core.Presentation.csproj" />
<Project Path="../sources/presentation/Stride.Core.Quantum/Stride.Core.Quantum.csproj" />
<Project Path="../sources/presentation/Stride.Core.Translation.Presentation/Stride.Core.Translation.Presentation.csproj" />
</Folder>
<Folder Name="/50-Presentation/Avalonia/">
<Project Path="../sources/presentation/Stride.Core.Presentation.Avalonia/Stride.Core.Presentation.Avalonia.csproj" />
</Folder>
<Folder Name="/50-Presentation/Wpf/">
<Project Path="../sources/presentation/Stride.Core.Presentation.Wpf.Dialogs/Stride.Core.Presentation.Wpf.Dialogs.csproj" />
<Project Path="../sources/presentation/Stride.Core.Presentation.Wpf.Graph/Stride.Core.Presentation.Wpf.Graph.csproj" />
<Project Path="../sources/presentation/Stride.Core.Presentation.Wpf/Stride.Core.Presentation.Wpf.csproj" />
<Project Path="../sources/presentation/Stride.Core.Translation.Presentation.Wpf/Stride.Core.Translation.Presentation.Wpf.csproj" />
</Folder>
<Folder Name="/51-Presentation.Tests/">
<Project Path="../sources/presentation/Stride.Core.Presentation.Quantum.Tests/Stride.Core.Presentation.Quantum.Tests.csproj" />
<Project Path="../sources/presentation/Stride.Core.Presentation.Tests/Stride.Core.Presentation.Tests.csproj" />
<Project Path="../sources/presentation/Stride.Core.Quantum.Tests/Stride.Core.Quantum.Tests.csproj" />
</Folder>
<Folder Name="/51-Presentation.Tests/Wpf/">
<Project Path="../sources/presentation/Stride.Core.Presentation.Wpf.Tests/Stride.Core.Presentation.Wpf.Tests.csproj" />
</Folder>
<Folder Name="/60-Editor/">
<Project Path="../sources/editor/Stride.Assets.Presentation/Stride.Assets.Presentation.csproj" />
<Project Path="../sources/editor/Stride.Core.Assets.Editor/Stride.Core.Assets.Editor.csproj" />
<Project Path="../sources/crashreport/Stride.CrashReport/Stride.CrashReport.csproj" />
<Project Path="../sources/crashreport/Stride.CrashReporter/Stride.CrashReporter.csproj" />
<Project Path="../sources/crashreport/Stride.CrashReport.TestProbe/Stride.CrashReport.TestProbe.csproj" />
<Project Path="../sources/editor/Stride.Editor/Stride.Editor.csproj" />
<Project Path="../sources/editor/Stride.GameStudio/Stride.GameStudio.csproj" DefaultStartup="true" />
<Project Path="../sources/engine/Stride.Debugger/Stride.Debugger.csproj" />
</Folder>
<Folder Name="/60-Editor/Wpf/">
<Project Path="../sources/editor/Stride.Assets.Presentation.Wpf/Stride.Assets.Presentation.Wpf.csproj" />
<Project Path="../sources/editor/Stride.Core.Assets.Editor.Wpf/Stride.Core.Assets.Editor.Wpf.csproj" />
<Project Path="../sources/editor/Stride.Editor.Wpf/Stride.Editor.Wpf.csproj" />
<Project Path="../sources/editor/Stride.GameStudio/Stride.GameStudio.csproj" DefaultStartup="true" />
</Folder>
<Folder Name="/61-Editor.Tests/">
<Project Path="../sources/crashreport/Stride.CrashReport.Tests/Stride.CrashReport.Tests.csproj" />
<Project Path="../sources/editor/Stride.Core.Assets.Editor.Tests/Stride.Core.Assets.Editor.Tests.csproj" />
Expand Down
8 changes: 4 additions & 4 deletions docs/asset-system/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ flowchart LR
| Runtime type | `DataContract`-decorated class | Engine feature assembly (e.g. `Stride.Graphics`) | `sources/engine/` |
| Asset class | `Asset` subclass | `Stride.Assets` or feature assembly (e.g. `Stride.Assets.Models`) | `sources/engine/` |
| Compiler | `AssetCompilerBase` subclass | Same assembly as the asset class | `sources/engine/` (same folder as asset class) |
| Editor Tier 2 | `AssetViewModel<T>` subclass | `Stride.Assets.Presentation` | `sources/editor/Stride.Assets.Presentation/ViewModel/` |
| Editor Tier 3 VM | `AssetEditorViewModel` subclass | `Stride.Assets.Presentation` | `sources/editor/Stride.Assets.Presentation/AssetEditors/` |
| Editor Tier 3 View | `IEditorView` XAML control | `Stride.Assets.Presentation` | `sources/editor/Stride.Assets.Presentation/AssetEditors/` |
| Template | `.sdtpl` YAML file | `Stride.Assets.Presentation` | `sources/editor/Stride.Assets.Presentation/Templates/Assets/` |
| Editor Tier 2 | `AssetViewModel<T>` subclass | `Stride.Assets.Presentation.Wpf` | `sources/editor/Stride.Assets.Presentation.Wpf/ViewModel/` |
| Editor Tier 3 VM | `AssetEditorViewModel` subclass | `Stride.Assets.Presentation.Wpf` | `sources/editor/Stride.Assets.Presentation.Wpf/AssetEditors/` |
| Editor Tier 3 View | `IEditorView` XAML control | `Stride.Assets.Presentation.Wpf` | `sources/editor/Stride.Assets.Presentation.Wpf/AssetEditors/` |
| Template | `.sdtpl` YAML file | `Stride.Assets.Presentation.Wpf` | `sources/editor/Stride.Assets.Presentation.Wpf/Templates/Assets/` |

## Choose a Base Class for the Asset

Expand Down
2 changes: 1 addition & 1 deletion docs/asset-system/editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Keep the ViewModel thin — business logic belongs in the asset class itself, no

### Assembly Placement

`Stride.Assets.Presentation` (`sources/editor/Stride.Assets.Presentation/`). This assembly is editor-only and must not be referenced by runtime or compiler assemblies.
`Stride.Assets.Presentation.Wpf` (`sources/editor/Stride.Assets.Presentation.Wpf/`). This assembly is editor-only and must not be referenced by runtime or compiler assemblies.

## Tier 3: Full Custom Editor

Expand Down
4 changes: 2 additions & 2 deletions docs/asset-system/registration.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ Field reference:
- **`AssetTypeName`** — the simple class name of the `Asset` subclass. Namespace is not required and is ignored.
- **`Scope`** — always `Asset` for standard asset templates.
- **`Group`** — the menu group in GameStudio's Add Asset dialog. Existing groups (exact strings): `Animation`, `Font`, `Material`, `Media`, `Miscellaneous`, `Model`, `Physics`, `Physics-Bepu`, `Scene`, `Script`, `Sprite`, `Texture`, `UI`. Use an existing group or introduce a new one.
- **`Order`** — controls sort position within the group. Inspect existing `.sdtpl` files in `sources/editor/Stride.Assets.Presentation/Templates/Assets/` for reference values.
- **`Order`** — controls sort position within the group. Inspect existing `.sdtpl` files in `sources/editor/Stride.Assets.Presentation.Wpf/Templates/Assets/` for reference values.

Place the `.sdtpl` file in:

```
sources/editor/Stride.Assets.Presentation/Templates/Assets/%%Group%%/%%AssetName%%.sdtpl
sources/editor/Stride.Assets.Presentation.Wpf/Templates/Assets/%%Group%%/%%AssetName%%.sdtpl
```

The directory name under `Assets/` does not have to match the `Group` string exactly — the directory is just for organisation. The file is embedded automatically via the wildcard include already present in `Stride.Assets.Presentation.csproj` — no manual `.csproj` edit is needed for engine assets.
Expand Down
2 changes: 1 addition & 1 deletion docs/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Stride's editor is built on a ViewModel layer that sits above Quantum and the as
flowchart TD
A["ITransactionStack + Operation<br/>Stride.Core.Design · Stride.Core.Transactions<br/>sources/core/Stride.Core.Design/Transactions/<br/>Shared interface and base type — each consumer creates its own instance"]
B["IUndoRedoService<br/>Stride.Core.Presentation<br/>sources/presentation/Stride.Core.Presentation/Services/<br/>Wraps stack with naming, dirtiable sync, and save-point tracking"]
C["SelectionService<br/>Stride.Core.Assets.Editor<br/>sources/editor/Stride.Core.Assets.Editor/Services/<br/>Separate unbounded stack; records selection snapshots"]
C["SelectionService<br/>Stride.Core.Assets.Editor.Wpf<br/>sources/editor/Stride.Core.Assets.Editor.Wpf/Services/<br/>Separate unbounded stack; records selection snapshots"]

A -. "uses" .-> B
A -. "uses" .-> C
Expand Down
6 changes: 3 additions & 3 deletions docs/editor/custom-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,6 @@ private async Task DoSomethingAsync()

| File | Path |
|---|---|
| `%%AssetName%%EditorViewModel.cs` | `sources/editor/Stride.Assets.Presentation/AssetEditors/%%EditorName%%/ViewModels/` |
| `%%AssetName%%EditorView.xaml` | `sources/editor/Stride.Assets.Presentation/AssetEditors/%%EditorName%%/Views/` |
| `%%AssetName%%EditorView.xaml.cs` | `sources/editor/Stride.Assets.Presentation/AssetEditors/%%EditorName%%/Views/` |
| `%%AssetName%%EditorViewModel.cs` | `sources/editor/Stride.Assets.Presentation.Wpf/AssetEditors/%%EditorName%%/ViewModels/` |
| `%%AssetName%%EditorView.xaml` | `sources/editor/Stride.Assets.Presentation.Wpf/AssetEditors/%%EditorName%%/Views/` |
| `%%AssetName%%EditorView.xaml.cs` | `sources/editor/Stride.Assets.Presentation.Wpf/AssetEditors/%%EditorName%%/Views/` |
2 changes: 1 addition & 1 deletion docs/editor/editors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Overview

All concrete asset editors live in `Stride.Assets.Presentation` under `sources/editor/Stride.Assets.Presentation/AssetEditors/`. Most editor folders contain a `ViewModels/` subdirectory and a `Views/` subdirectory; ScriptEditor and VisualScriptEditor are exceptions where files sit flat at the folder root. The table below is the entry point for locating any existing editor.
All concrete asset editors live in `Stride.Assets.Presentation.Wpf` under `sources/editor/Stride.Assets.Presentation.Wpf/AssetEditors/`. Most editor folders contain a `ViewModels/` subdirectory and a `Views/` subdirectory; ScriptEditor and VisualScriptEditor are exceptions where files sit flat at the folder root. The table below is the entry point for locating any existing editor.

## Editors

Expand Down
6 changes: 3 additions & 3 deletions docs/editor/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

| Type | Assembly | Purpose |
|---|---|---|
| `SelectionService` | `Stride.Core.Assets.Editor`<br/>`sources/editor/Stride.Core.Assets.Editor/Services/` | Owns the navigation stack; exposes `NavigateBackward` / `NextSelection`; registers observable collections to track |
| `SelectionService` | `Stride.Core.Assets.Editor.Wpf`<br/>`sources/editor/Stride.Core.Assets.Editor.Wpf/Services/` | Owns the navigation stack; exposes `NavigateBackward` / `NextSelection`; registers observable collections to track |
| `SelectionState` | same | Snapshot of all registered collection states at a point in time; `HasValidSelection()` checks whether the referenced objects still exist |
| `SelectionScope` | same | A group of `INotifyCollectionChanged` collections tracked together as a unit; always obtained from `RegisterSelectionScope()`, never constructed directly |
| `SelectionOperation` | `sources/editor/Stride.Core.Assets.Editor/Services/SelectionOperation.cs` | `Operation` subclass pairing a previous and next `SelectionState`; `Rollback` restores previous, `Rollforward` restores next |
| `SelectionOperation` | `sources/editor/Stride.Core.Assets.Editor.Wpf/Services/SelectionOperation.cs` | `Operation` subclass pairing a previous and next `SelectionState`; `Rollback` restores previous, `Rollforward` restores next |

## How It Works

Expand Down Expand Up @@ -49,4 +49,4 @@ The two systems share `ITransactionStack` and `Operation` from `Stride.Core.Tran

## Assembly Placement

`SelectionService`, `SelectionState`, `SelectionScope`, and `SelectionOperation` all live in `Stride.Core.Assets.Editor` at `sources/editor/Stride.Core.Assets.Editor/Services/`.
`SelectionService`, `SelectionState`, `SelectionScope`, and `SelectionOperation` all live in `Stride.Core.Assets.Editor.Wpf` at `sources/editor/Stride.Core.Assets.Editor.Wpf/Services/`.
12 changes: 6 additions & 6 deletions docs/editor/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ Assembly names match project names throughout; the "same" shorthand in the Assem
| `Stride.Core.Presentation` | same | No | MVVM base classes (`ViewModelBase`, `DispatcherViewModel`), service interfaces (`IDispatcherService`), commands, dirtiables |
| `Stride.Core.Presentation.Wpf` | same | Yes | WPF controls, converters, behaviors, `WpfDispatcherService` |
| `Stride.Core.Presentation.Quantum` | same | No | Quantum-to-ViewModel binding — `INodePresenter`, node presenter updater infrastructure; platform-agnostic layer consumed by the WPF property grid |
| `Stride.Core.Presentation.Graph` | same | Yes | Node-graph visualization controls (used by GraphicsCompositor editor) |
| `Stride.Core.Presentation.Dialogs` | same | Yes | Dialog services and file picker implementations |
| `Stride.Core.Assets.Editor` | same | Yes* | Base editor infrastructure: `AssetEditorViewModel`, `IEditorView`, `AssetsEditorPlugin`, `SelectionService`, `IUndoRedoService`, registration attributes; *project targets WPF but ViewModel base classes are platform-agnostic |
| `Stride.Assets.Presentation` | same | Yes | All concrete asset editors (ViewModels + Views), `StrideDefaultAssetsPlugin`, node presenter updaters |
| `Stride.Editor` | same | Yes | Core editor wiring and game-editor infrastructure |
| `Stride.Core.Presentation.Wpf.Graph` | same | Yes | Node-graph visualization controls (used by GraphicsCompositor editor) |
| `Stride.Core.Presentation.Wpf.Dialogs` | same | Yes | Dialog services and file picker implementations |
| `Stride.Core.Assets.Editor.Wpf` | same | Yes* | Base editor infrastructure: `AssetEditorViewModel`, `IEditorView`, `AssetsEditorPlugin`, `SelectionService`, `IUndoRedoService`, registration attributes; *project targets WPF but ViewModel base classes are platform-agnostic |
| `Stride.Assets.Presentation.Wpf` | same | Yes | All concrete asset editors (ViewModels + Views), `StrideDefaultAssetsPlugin`, node presenter updaters |
| `Stride.Editor.Wpf` | same | Yes | Core editor wiring and game-editor infrastructure |
| `Stride.GameStudio` | same | Yes | Shell, `AssetEditorsManager`, `PluginService`, main window |

## Where to Put New Code

- **New ViewModel code** → `Stride.Assets.Presentation`, under `sources/editor/Stride.Assets.Presentation/AssetEditors/%%EditorName%%/ViewModels/`
- **New ViewModel code** → `Stride.Assets.Presentation.Wpf`, under `sources/editor/Stride.Assets.Presentation.Wpf/AssetEditors/%%EditorName%%/ViewModels/`
- **New View / XAML code** → same project, `AssetEditors/%%EditorName%%/Views/`
10 changes: 5 additions & 5 deletions docs/editor/undo-redo.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Two layers sit between a mutation and the undo/redo stack:
| Transaction core | `Stride.Core.Design`<br/>`sources/core/Stride.Core.Design/Transactions/` | `ITransactionStack`, `Transaction`, `Operation`, `IMergeableOperation` | Generic bounded stack and reversible operation primitives |
| Presentation service | `Stride.Core.Presentation`<br/>`sources/presentation/Stride.Core.Presentation/` | `IUndoRedoService`, `DirtyingOperation`, `AnonymousDirtyingOperation`, `IDirtiable`, `DirtiableManager` | Service wrapper with human-readable names, dirty-flag integration, and save snapshots |

Editor-specific operations (`ContentValueChangeOperation`) live in `Stride.Core.Assets.Editor` (`sources/editor/Stride.Core.Assets.Editor/Quantum/`) and extend the base model with Quantum node references.
Editor-specific operations (`ContentValueChangeOperation`) live in `Stride.Core.Assets.Editor.Wpf` (`sources/editor/Stride.Core.Assets.Editor.Wpf/Quantum/`) and extend the base model with Quantum node references.

## `IUndoRedoService`

Expand Down Expand Up @@ -61,7 +61,7 @@ using (var transaction = UndoRedoService.CreateTransaction())
For operations used in multiple places or that benefit from consecutive-edit merging, subclass `DirtyingOperation`:

```csharp
// sources/editor/Stride.Assets.Presentation/YourFeature/%%OperationName%%Operation.cs
// sources/editor/Stride.Assets.Presentation.Wpf/YourFeature/%%OperationName%%Operation.cs
using Stride.Core.Presentation.Dirtiables;
using Stride.Core.Transactions;

Expand Down Expand Up @@ -108,7 +108,7 @@ internal sealed class %%OperationName%%Operation : DirtyingOperation, IMergeable

`DirtyingOperation` declares `protected abstract void Undo()` and `protected abstract void Redo()` — implement only those two. The `Dirtiables` constructor parameter is forwarded to the base class and used by `DirtiableManager`.

`IMergeableOperation` is optional. For the canonical implementation, see `ContentValueChangeOperation` at `sources/editor/Stride.Core.Assets.Editor/Quantum/ContentValueChangeOperation.cs` — it merges consecutive value edits on the same Quantum node index.
`IMergeableOperation` is optional. For the canonical implementation, see `ContentValueChangeOperation` at `sources/editor/Stride.Core.Assets.Editor.Wpf/Quantum/ContentValueChangeOperation.cs` — it merges consecutive value edits on the same Quantum node index.

## `IDirtiable` and Dirty Flags

Expand All @@ -135,5 +135,5 @@ Manual `PushOperation` is only required for mutations that bypass the node graph
| `ITransactionStack`, `Transaction`, `Operation`, `IMergeableOperation` | `Stride.Core.Design` | `sources/core/Stride.Core.Design/Transactions/` |
| `IUndoRedoService`, `DirtyingOperation`, `AnonymousDirtyingOperation` | `Stride.Core.Presentation` | `sources/presentation/Stride.Core.Presentation/Services/` and `Dirtiables/` |
| `IDirtiable`, `DirtiableManager` | `Stride.Core.Presentation` | `sources/presentation/Stride.Core.Presentation/Dirtiables/` |
| `ContentValueChangeOperation` | `Stride.Core.Assets.Editor` | `sources/editor/Stride.Core.Assets.Editor/Quantum/` |
| Your custom operation | `Stride.Assets.Presentation` | `sources/editor/Stride.Assets.Presentation/YourFeature/` |
| `ContentValueChangeOperation` | `Stride.Core.Assets.Editor.Wpf` | `sources/editor/Stride.Core.Assets.Editor.Wpf/Quantum/` |
| Your custom operation | `Stride.Assets.Presentation.Wpf` | `sources/editor/Stride.Assets.Presentation.Wpf/YourFeature/` |
2 changes: 1 addition & 1 deletion docs/launcher/cross-platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Both paths are implemented:

## Settings paths

All config paths go through `EditorPath` (linked file from `Stride.Core.Assets.Editor`). `EditorPath.UserDataPath` resolves to:
All config paths go through `EditorPath` (linked file from `Stride.Core.Assets.Editor.Wpf`). `EditorPath.UserDataPath` resolves to:

- `%LocalAppData%\Stride\` on Windows
- `$XDG_DATA_HOME/Stride/` (or `~/.local/share/Stride/`) on Linux
Expand Down
2 changes: 1 addition & 1 deletion docs/launcher/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ A few source files are linked (`<Compile Include="..." Link="..." />`) into `Str

| Linked file | Origin | Used for |
|---|---|---|
| `Editor/EditorPath.cs` | [sources/editor/Stride.Core.Assets.Editor/EditorPath.cs](../../sources/editor/Stride.Core.Assets.Editor/EditorPath.cs) | Resolves `EditorPath.UserDataPath`, `EditorPath.DefaultTempPath`, etc. for settings and the single-instance lock |
| `Editor/EditorPath.cs` | [sources/editor/Stride.Core.Assets.Editor.Wpf/EditorPath.cs](../../sources/editor/Stride.Core.Assets.Editor.Wpf/EditorPath.cs) | Resolves `EditorPath.UserDataPath`, `EditorPath.DefaultTempPath`, etc. for settings and the single-instance lock |
| `Packages/PackageSessionHelper.Solution.cs` | [sources/assets/Stride.Core.Assets/PackageSessionHelper.Solution.cs](../../sources/assets/Stride.Core.Assets/PackageSessionHelper.Solution.cs) | Parses `.sln` files to discover the Stride version used by a recent project |
| `Stride.Core.MostRecentlyUsedFiles.projitems` (Shared) | [sources/editor/Stride.Core.MostRecentlyUsedFiles](../../sources/editor/Stride.Core.MostRecentlyUsedFiles/) | Reads the Game Studio MRU list to populate the "Recent projects" tab |

Expand Down
Loading
Loading