Commit f6a5433
susan101566
editor: DataEnum in library (#9603) 3df92e66a4
Please review commit-by-commit :)
This PR adds DataEnum as a publishable component. Then in the host file, you can drag the DataEnum into the stage. This DataEnum will appear in the Data sidebar, but will be read-only (no re-ordering or adding new values)


Then, in a view model in the host, you can use this DataEnum as if it's defined locally.
Some notes
1. A LibraryDataEnum extends DataEnum. The only difference is that it has an asset ID and a component ID. I think this approach makes it such that existing UI's will just work.
2. The runtime exporter now has a concept of what DataEnums are required from each file. This makes sure we always include the DataEnum's needed by the host file.
3. I changed the ID resolving logic into the runtime exporter's bindable hooks. Going forward, this is a unified place to remap ID's.
Tests:
1. I added some tests, and also manually verified that transitions understands library data enums. Here's a video: https://2dimensions.slack.com/archives/C07M7DQL4F2/p17464862460583991 parent bcd8b71 commit f6a5433
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Submodule rive-cpp updated from 00fc3d8 to 0484409
0 commit comments