Commit cb21e59
authored
Remove serialization from Table<T> and make TaggedValue only store tooling/widget node inputs (#4129)
* Add TaggedValue::TypeDefault to avoid baking placeholder Tables into saved documents
* Add TaggedValue::TypeDefault to avoid baking placeholder Tables into saved documents
* Migrate empty Vector/Raster/Graphic/Artboard placeholder values to TypeDefault on load
Documents written before the TypeDefault mechanism existed have empty Table<Vector>/<Raster>/<Graphic>/<Artboard> values baked into every unwired exposed input. Walk each migrated node's inputs and rewrite any such placeholder NodeInput::Value into the equivalent NodeInput::type_default, so re-saved documents shed the placeholder payloads. Marked with a TODO for eventual removal once enough documents have been re-saved.
* Re-save demo artwork
* Remove Graphic and Artboard placeholder containers from TaggedValue
* Remove Raster placeholder TaggedValue variant
* Simplify document migration
* Remove Vector placeholder TaggedValue variant
* Remove NodeIdTable from the TaggedValue
* Remove StringTable from the TaggedValue
* Remove F64Table in place of F64Array in TaggedValue
* Replace TaggedValue::Color(Table<Color>) with ::Color(Option<Color>)
* Replace TaggedValue::GradientTable(Table<GradientStops>) with ::Gradient(GradientStops)
* Replace TaggedValue::BrushStrokeTable(Table<BrushStroke>) with ::BrushStrokes(Vec<BrushStroke>)
* Make TaggedValue::DocumentNode runtime-only with TypeDefault placeholder
* Make TaggedValue::ContextFeatures runtime-only
* Remove Serialize/Deserialize from Table<T>
* Add a widget for TaggedValue::BrushStrokes to visualize strokes and samples
* Define a reusable list of TaggedValue::TypeDefault types for its generated methods
* Re-save demo artwork1 parent d97fe83 commit cb21e59
35 files changed
Lines changed: 616 additions & 938 deletions
File tree
- demo-artwork
- editor/src/messages
- portfolio
- document
- graph_operation
- node_graph
- utility_types/network_interface
- tool
- common_functionality
- tool_messages
- node-graph
- graph-craft/src
- document
- interpreted-executor/src
- libraries
- core-types/src
- graphic-types/src
- raster-types/src
- vector-types/src
- vector
- nodes
- brush/src
- text/src
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
1760 | 1761 | | |
1761 | 1762 | | |
1762 | 1763 | | |
1763 | | - | |
1764 | | - | |
1765 | | - | |
1766 | | - | |
1767 | | - | |
1768 | | - | |
| 1764 | + | |
1769 | 1765 | | |
1770 | 1766 | | |
1771 | 1767 | | |
| |||
1804 | 1800 | | |
1805 | 1801 | | |
1806 | 1802 | | |
1807 | | - | |
| 1803 | + | |
1808 | 1804 | | |
1809 | 1805 | | |
1810 | 1806 | | |
| |||
3349 | 3345 | | |
3350 | 3346 | | |
3351 | 3347 | | |
3352 | | - | |
| 3348 | + | |
3353 | 3349 | | |
3354 | 3350 | | |
3355 | 3351 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
0 commit comments